[QGIS Commit] r15582 - in trunk/qgis/python/plugins/GdalTools: . tools

svn_qgis at osgeo.org svn_qgis at osgeo.org
Wed Mar 23 12:57:22 EDT 2011


Author: brushtyler
Date: 2011-03-23 09:57:22 -0700 (Wed, 23 Mar 2011)
New Revision: 15582

Added:
   trunk/qgis/python/plugins/GdalTools/tools/terrain.txt
Modified:
   trunk/qgis/python/plugins/GdalTools/__init__.py
   trunk/qgis/python/plugins/GdalTools/tools/CMakeLists.txt
   trunk/qgis/python/plugins/GdalTools/tools/doDEM.py
Log:
Added the default color configuration file for DEM tool


Modified: trunk/qgis/python/plugins/GdalTools/__init__.py
===================================================================
--- trunk/qgis/python/plugins/GdalTools/__init__.py	2011-03-23 16:08:19 UTC (rev 15581)
+++ trunk/qgis/python/plugins/GdalTools/__init__.py	2011-03-23 16:57:22 UTC (rev 15582)
@@ -22,7 +22,7 @@
 def description():
   return "Integrate gdal tools into qgis"
 def version(): 
-  return "Version 1.2.24" 
+  return "Version 1.2.25" 
 def qgisMinimumVersion():
   return "1.0"
 def icon():

Modified: trunk/qgis/python/plugins/GdalTools/tools/CMakeLists.txt
===================================================================
--- trunk/qgis/python/plugins/GdalTools/tools/CMakeLists.txt	2011-03-23 16:08:19 UTC (rev 15581)
+++ trunk/qgis/python/plugins/GdalTools/tools/CMakeLists.txt	2011-03-23 16:57:22 UTC (rev 15582)
@@ -1,11 +1,11 @@
-FILE(GLOB INIT_FILE __init__.py)
 FILE(GLOB PY_FILES *.py)
 FILE(GLOB UI_FILES *.ui)
+FILE(GLOB COLOR_CONFIG_FILES terrain.txt)
 
 PYQT4_WRAP_UI(PYUI_FILES ${UI_FILES})
 
 ADD_CUSTOM_TARGET(gdaltools_tools ALL DEPENDS ${PYUI_FILES})
 
-INSTALL(FILES ${INIT_FILE} DESTINATION ${QGIS_DATA_DIR}/python/plugins/GdalTools/tools)
 INSTALL(FILES ${PY_FILES} DESTINATION ${QGIS_DATA_DIR}/python/plugins/GdalTools/tools)
 INSTALL(FILES ${PYUI_FILES} DESTINATION ${QGIS_DATA_DIR}/python/plugins/GdalTools/tools)
+INSTALL(FILES ${COLOR_CONFIG_FILES} DESTINATION ${QGIS_DATA_DIR}/python/plugins/GdalTools/tools)

Modified: trunk/qgis/python/plugins/GdalTools/tools/doDEM.py
===================================================================
--- trunk/qgis/python/plugins/GdalTools/tools/doDEM.py	2011-03-23 16:08:19 UTC (rev 15581)
+++ trunk/qgis/python/plugins/GdalTools/tools/doDEM.py	2011-03-23 16:57:22 UTC (rev 15582)
@@ -27,6 +27,11 @@
       self.hillshadeAzimuthSpin.setValue(315.0)
       self.slopeScaleSpin.setValue(1)
 
+      # set the default color configuration file to terrain
+      import os.path
+      colorConfigFile = os.path.join(os.path.dirname(__file__), "terrain.txt")
+      self.colorConfigFileEdit.setText(colorConfigFile)
+
       self.outputFormat = Utils.fillRasterOutputFormat()
 
       self.setParamsStatus(
@@ -88,7 +93,7 @@
       self.outputFileEdit.setText(outputFile)
 
   def fillColorConfigFileEdit(self):
-      configFile = Utils.FileDialog.getOpenFileName(self, self.tr( "Select the color configuration file" ), "*")
+      configFile = Utils.FileDialog.getOpenFileName(self, self.tr( "Select the color configuration file" ))
       if configFile.isEmpty():
         return
 

Added: trunk/qgis/python/plugins/GdalTools/tools/terrain.txt
===================================================================
--- trunk/qgis/python/plugins/GdalTools/tools/terrain.txt	                        (rev 0)
+++ trunk/qgis/python/plugins/GdalTools/tools/terrain.txt	2011-03-23 16:57:22 UTC (rev 15582)
@@ -0,0 +1,18 @@
+-11000 0 0 0
+-500 0 0 30
+-100 0 0 200
+-1 150 150 255
+0 0 120 0
+100 0 150 0
+270 90 165 90
+300 90 175 90
+500 50 180 50
+500 70 170 70
+1000 70 145 75
+1000 70 155 75
+2000 150 156 100
+2800 220 220 220
+3000 255 255 255
+8850 255 255 255
+nv white
+



More information about the QGIS-commit mailing list