Skip to content

Commit

Permalink
Merge pull request #2769 from NaturalGIS/processing_fix_gdal_optional…
Browse files Browse the repository at this point in the history
…_parameters

[processing] fix a few GDAL/OGR optional parameters
  • Loading branch information
alexbruy committed Feb 9, 2016
2 parents a5ddf92 + 7072db4 commit 686ad24
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/gdal/ogr2ogrdissolve.py
Expand Up @@ -75,7 +75,7 @@ def defineCharacteristics(self):
self.addParameter(ParameterBoolean(self.STATS,
self.tr('Compute min/max/sum/mean for the following numeric attribute'), False))
self.addParameter(ParameterTableField(self.STATSATT,
self.tr('Numeric attribute to compute dissolved features stats'), self.INPUT_LAYER))
self.tr('Numeric attribute to compute dissolved features stats'), self.INPUT_LAYER, optional=True))
self.addParameter(ParameterString(self.OPTIONS,
self.tr('Additional creation options (see ogr2ogr manual)'),
'', optional=True))
Expand Down
6 changes: 3 additions & 3 deletions python/plugins/processing/algs/gdal/ogr2ogrtopostgis.py
Expand Up @@ -84,11 +84,11 @@ def defineCharacteristics(self):
self.addParameter(ParameterSelection(self.GTYPE,
self.tr('Output geometry type'), self.GEOMTYPE, 0))
self.addParameter(ParameterCrs(self.A_SRS,
self.tr('Assign an output CRS'), ''))
self.tr('Assign an output CRS'), '', optional=True))
self.addParameter(ParameterCrs(self.T_SRS,
self.tr('Reproject to this CRS on output '), ''))
self.tr('Reproject to this CRS on output '), '', optional=True))
self.addParameter(ParameterCrs(self.S_SRS,
self.tr('Override source CRS'), ''))
self.tr('Override source CRS'), '', optional=True))
self.addParameter(ParameterString(self.HOST,
self.tr('Host'), 'localhost', optional=False))
self.addParameter(ParameterString(self.PORT,
Expand Down
6 changes: 3 additions & 3 deletions python/plugins/processing/algs/gdal/ogr2ogrtopostgislist.py
Expand Up @@ -96,11 +96,11 @@ def defineCharacteristics(self):
self.addParameter(ParameterSelection(self.GTYPE,
self.tr('Output geometry type'), self.GEOMTYPE, 0))
self.addParameter(ParameterCrs(self.A_SRS,
self.tr('Assign an output CRS'), ''))
self.tr('Assign an output CRS'), '', optional=True))
self.addParameter(ParameterCrs(self.T_SRS,
self.tr('Reproject to this CRS on output '), ''))
self.tr('Reproject to this CRS on output '), '', optional=True))
self.addParameter(ParameterCrs(self.S_SRS,
self.tr('Override source CRS'), ''))
self.tr('Override source CRS'), '', optional=True))
self.addParameter(ParameterString(self.SCHEMA,
self.tr('Schema name'), 'public', optional=True))
self.addParameter(ParameterString(self.TABLE,
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/gdal/translate.py
Expand Up @@ -80,7 +80,7 @@ def defineCharacteristics(self):
self.addParameter(ParameterSelection(self.EXPAND,
self.tr('Expand'), ['none', 'gray', 'rgb', 'rgba']))
self.addParameter(ParameterCrs(self.SRS,
self.tr('Output projection for output file [leave blank to use input projection]'), None))
self.tr('Output projection for output file [leave blank to use input projection]'), None, optional=True))
self.addParameter(ParameterExtent(self.PROJWIN,
self.tr('Subset based on georeferenced coordinates')))
self.addParameter(ParameterBoolean(self.SDS,
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/gdal/warp.py
Expand Up @@ -64,7 +64,7 @@ def defineCharacteristics(self):
self.group, self.i18n_group = self.trAlgorithm('[GDAL] Projections')
self.addParameter(ParameterRaster(self.INPUT, self.tr('Input layer'), False))
self.addParameter(ParameterCrs(self.SOURCE_SRS,
self.tr('Source SRS'), ''))
self.tr('Source SRS'), '', optional=True))
self.addParameter(ParameterCrs(self.DEST_SRS,
self.tr('Destination SRS'), ''))
self.addParameter(ParameterString(self.NO_DATA,
Expand Down

0 comments on commit 686ad24

Please sign in to comment.