Skip to content

Commit

Permalink
Adjustments in DEM parameters fro OTB algorithms
Browse files Browse the repository at this point in the history
  • Loading branch information
volaya committed May 2, 2013
1 parent 4dfa972 commit 1098560
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
7 changes: 2 additions & 5 deletions python/plugins/sextante/otb/OTBAlgorithm.py
Expand Up @@ -28,10 +28,8 @@
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from sextante.core.GeoAlgorithm import GeoAlgorithm
from sextante.parameters.ParameterTable import ParameterTable
from sextante.parameters.ParameterMultipleInput import ParameterMultipleInput
from sextante.parameters.ParameterRaster import ParameterRaster
from sextante.outputs.OutputRaster import OutputRaster
from sextante.parameters.ParameterVector import ParameterVector
from sextante.parameters.ParameterBoolean import ParameterBoolean
from sextante.parameters.ParameterSelection import ParameterSelection
Expand Down Expand Up @@ -87,11 +85,10 @@ def defineCharacteristicsFromFile(self):
line = line.strip("\n").strip()
if line.startswith("Parameter"):
param = ParameterFactory.getFromString(line)

# Hack for initializing the elevation parameters from Sextante configuration
if param.name == "-elev.dem.path":
if param.name == "-elev.dem.path" or param.name == "-elev.dem":
param.default = OTBUtils.otbSRTMPath()
if param.name == "-elev.dem.geoid":
elif param.name == "-elev.dem.geoid" or param.name == "-elev.geoid":
param.default = OTBUtils.otbGeoidPath()
self.addParameter(param)
elif line.startswith("*Parameter"):
Expand Down
8 changes: 4 additions & 4 deletions python/plugins/sextante/otb/description/KmzExport.txt
Expand Up @@ -4,10 +4,10 @@ Image to KMZ Export
Miscellaneous
ParameterRaster|-in|Input image|False
OutputFile|-out|Output .kmz product
ParameterNumber|-tilesize|Tile Size|None|None|0
ParameterNumber|-tilesize|Tile Size|None|None|256
ParameterRaster|-logo|Image logo|True
ParameterRaster|-legend|Image legend|True
ParameterSelection|-elev|Elevation management|dem;average|1
ParameterFile|-elev.dem.path|DEM directory|
ParameterFile|-elev.dem.geoid|Geoid File||
ParameterNumber|-elev.average.value|Average Elevation|None|None|0.0
ParameterString|-elev.dem|DEM directory|True
ParameterFile|-elev.geoid|Geoid File|
ParameterNumber|-elev.default|Average Elevation|None|None|0.0

0 comments on commit 1098560

Please sign in to comment.