Adjustments in DEM parameters fro OTB algorithms

This commit is contained in:
Victor Olaya 2013-05-02 23:54:14 +02:00
parent 4dfa97293d
commit 109856094c
2 changed files with 6 additions and 9 deletions

View File

@ -28,10 +28,8 @@ from qgis.core import *
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
@ -87,11 +85,10 @@ class OTBAlgorithm(GeoAlgorithm):
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"):

View File

@ -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