Skip to content

Commit eaa11d3

Browse files
author
brushtyler
committedMar 23, 2011
Added the default color configuration file for DEM tool
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@15582 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 37f8037 commit eaa11d3

File tree

4 files changed

+27
-4
lines changed

4 files changed

+27
-4
lines changed
 

‎python/plugins/GdalTools/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def name():
2222
def description():
2323
return "Integrate gdal tools into qgis"
2424
def version():
25-
return "Version 1.2.24"
25+
return "Version 1.2.25"
2626
def qgisMinimumVersion():
2727
return "1.0"
2828
def icon():
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
FILE(GLOB INIT_FILE __init__.py)
21
FILE(GLOB PY_FILES *.py)
32
FILE(GLOB UI_FILES *.ui)
3+
FILE(GLOB COLOR_CONFIG_FILES terrain.txt)
44

55
PYQT4_WRAP_UI(PYUI_FILES ${UI_FILES})
66

77
ADD_CUSTOM_TARGET(gdaltools_tools ALL DEPENDS ${PYUI_FILES})
88

9-
INSTALL(FILES ${INIT_FILE} DESTINATION ${QGIS_DATA_DIR}/python/plugins/GdalTools/tools)
109
INSTALL(FILES ${PY_FILES} DESTINATION ${QGIS_DATA_DIR}/python/plugins/GdalTools/tools)
1110
INSTALL(FILES ${PYUI_FILES} DESTINATION ${QGIS_DATA_DIR}/python/plugins/GdalTools/tools)
11+
INSTALL(FILES ${COLOR_CONFIG_FILES} DESTINATION ${QGIS_DATA_DIR}/python/plugins/GdalTools/tools)

‎python/plugins/GdalTools/tools/doDEM.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ def __init__(self, iface):
2727
self.hillshadeAzimuthSpin.setValue(315.0)
2828
self.slopeScaleSpin.setValue(1)
2929

30+
# set the default color configuration file to terrain
31+
import os.path
32+
colorConfigFile = os.path.join(os.path.dirname(__file__), "terrain.txt")
33+
self.colorConfigFileEdit.setText(colorConfigFile)
34+
3035
self.outputFormat = Utils.fillRasterOutputFormat()
3136

3237
self.setParamsStatus(
@@ -88,7 +93,7 @@ def fillOutputFileEdit(self):
8893
self.outputFileEdit.setText(outputFile)
8994

9095
def fillColorConfigFileEdit(self):
91-
configFile = Utils.FileDialog.getOpenFileName(self, self.tr( "Select the color configuration file" ), "*")
96+
configFile = Utils.FileDialog.getOpenFileName(self, self.tr( "Select the color configuration file" ))
9297
if configFile.isEmpty():
9398
return
9499

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
-11000 0 0 0
2+
-500 0 0 30
3+
-100 0 0 200
4+
-1 150 150 255
5+
0 0 120 0
6+
100 0 150 0
7+
270 90 165 90
8+
300 90 175 90
9+
500 50 180 50
10+
500 70 170 70
11+
1000 70 145 75
12+
1000 70 155 75
13+
2000 150 156 100
14+
2800 220 220 220
15+
3000 255 255 255
16+
8850 255 255 255
17+
nv white
18+

0 commit comments

Comments
 (0)