mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-06 00:07:29 -04:00
Make argument setting consistent
This commit is contained in:
parent
5302feb2dd
commit
0a3b7d36f8
@ -125,6 +125,13 @@ class OneSideBuffer(GdalAlgorithm):
|
|||||||
|
|
||||||
output, outputFormat = GdalUtils.ogrConnectionStringAndFormat(outFile, context)
|
output, outputFormat = GdalUtils.ogrConnectionStringAndFormat(outFile, context)
|
||||||
|
|
||||||
|
other_fields_exist = any(
|
||||||
|
True for f in fields
|
||||||
|
if f.name() != geometry
|
||||||
|
)
|
||||||
|
|
||||||
|
other_fields = ',*' if other_fields_exist else ''
|
||||||
|
|
||||||
arguments = [
|
arguments = [
|
||||||
output,
|
output,
|
||||||
ogrLayer,
|
ogrLayer,
|
||||||
@ -133,13 +140,6 @@ class OneSideBuffer(GdalAlgorithm):
|
|||||||
'-sql'
|
'-sql'
|
||||||
]
|
]
|
||||||
|
|
||||||
other_fields_exist = any(
|
|
||||||
True for f in fields
|
|
||||||
if f.name() != geometry
|
|
||||||
)
|
|
||||||
|
|
||||||
other_fields = ',*' if other_fields_exist else ''
|
|
||||||
|
|
||||||
if dissolve or fieldName:
|
if dissolve or fieldName:
|
||||||
sql = 'SELECT ST_Union(ST_SingleSidedBuffer({}, {}, {})) AS {}{} FROM "{}"'.format(geometry, distance, side, geometry, other_fields, layerName)
|
sql = 'SELECT ST_Union(ST_SingleSidedBuffer({}, {}, {})) AS {}{} FROM "{}"'.format(geometry, distance, side, geometry, other_fields, layerName)
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user