mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-01 00:46:20 -05:00
[processing][gdal] Spatial extent filter for import to postgis
should be optional
This commit is contained in:
parent
846400cb70
commit
2d4a465212
@ -122,7 +122,7 @@ class OgrToPostGis(GdalAlgorithm):
|
||||
self.tr('Maximum distance between 2 nodes (densification)'),
|
||||
defaultValue='', optional=True))
|
||||
self.addParameter(QgsProcessingParameterExtent(self.SPAT,
|
||||
self.tr('Select features by extent (defined in input layer CRS)')))
|
||||
self.tr('Select features by extent (defined in input layer CRS)'), optional=True))
|
||||
self.addParameter(QgsProcessingParameterBoolean(self.CLIP,
|
||||
self.tr('Clip the input layer using the above (rectangle) extent'),
|
||||
defaultValue=False))
|
||||
@ -203,8 +203,6 @@ class OgrToPostGis(GdalAlgorithm):
|
||||
simplify = self.parameterAsString(parameters, self.SIMPLIFY, context)
|
||||
segmentize = self.parameterAsString(parameters, self.SEGMENTIZE, context)
|
||||
spat = self.parameterAsExtent(parameters, self.SPAT, context)
|
||||
if spat.isNull():
|
||||
spat = inLayer.sourceExtent()
|
||||
clip = self.parameterAsBool(parameters, self.CLIP, context)
|
||||
where = self.parameterAsString(parameters, self.WHERE, context)
|
||||
wherestring = '-where "' + where + '"'
|
||||
|
@ -183,7 +183,6 @@ class Ogr2OgrToPostGisList(GdalAlgorithm):
|
||||
# to get credentials input when needed
|
||||
uri = GeoDB(uri=uri).uri
|
||||
|
||||
inLayer = self.parameterAsSource(parameters, self.INPUT, context)
|
||||
ogrLayer, layername = self.getOgrCompatibleSource(self.INPUT, parameters, context, feedback, executing)
|
||||
shapeEncoding = self.parameterAsString(parameters, self.SHAPE_ENCODING, context)
|
||||
ssrs = self.parameterAsCrs(parameters, self.S_SRS, context).authid()
|
||||
@ -201,8 +200,6 @@ class Ogr2OgrToPostGisList(GdalAlgorithm):
|
||||
simplify = self.parameterAsString(parameters, self.SIMPLIFY, context)
|
||||
segmentize = self.parameterAsString(parameters, self.SEGMENTIZE, context)
|
||||
spat = self.parameterAsExtent(parameters, self.SPAT, context)
|
||||
if spat.isNull():
|
||||
spat = inLayer.sourceExtent()
|
||||
clip = self.parameterAsBool(parameters, self.CLIP, context)
|
||||
where = self.parameterAsString(parameters, self.WHERE, context)
|
||||
wherestring = '-where "' + where + '"'
|
||||
|
Loading…
x
Reference in New Issue
Block a user