mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-15 00:04:00 -04:00
[processing] don't quote geometry column name (fix #16122)
This commit is contained in:
parent
bb4c8c065f
commit
44698d4576
@ -110,7 +110,7 @@ class Ogr2OgrDissolve(GdalAlgorithm):
|
||||
arguments.append('sqlite')
|
||||
arguments.append('-sql')
|
||||
|
||||
sql = "SELECT ST_Union('{}')".format(geometry)
|
||||
sql = "SELECT ST_Union({})".format(geometry)
|
||||
|
||||
sqlOpts = ''
|
||||
if fields:
|
||||
@ -119,13 +119,13 @@ class Ogr2OgrDissolve(GdalAlgorithm):
|
||||
sqlOpts += ',{}'.format(field)
|
||||
|
||||
if count:
|
||||
sqlOpts += ", COUNT('{}') AS count".format(geometry)
|
||||
sqlOpts += ", COUNT({}) AS count".format(geometry)
|
||||
|
||||
if stats:
|
||||
sqlOpts += ", SUM('{0}') AS sum_diss, MIN('{0}') AS min_diss, MAX('{0}') AS max_diss, AVG('{0}') AS avg_diss".format(statsatt)
|
||||
sqlOpts += ", SUM({0}) AS sum_diss, MIN({0}) AS min_diss, MAX({0}) AS max_diss, AVG({0}) AS avg_diss".format(statsatt)
|
||||
|
||||
if area:
|
||||
sqlOpts += ", SUM(ST_Area('{0}')) AS area_diss, ST_Perimeter(ST_Union('{0}')) AS peri_diss".format(geometry)
|
||||
sqlOpts += ", SUM(ST_Area({0})) AS area_diss, ST_Perimeter(ST_Union({0})) AS peri_diss".format(geometry)
|
||||
|
||||
sql = '{}{} FROM {} GROUP BY {}'.format(sql, sqlOpts, layername, field)
|
||||
|
||||
|
@ -113,7 +113,7 @@ class MeanCoords(GeoAlgorithm):
|
||||
weight = 1.00
|
||||
|
||||
if weight < 0:
|
||||
raise GeoAlgorithmExecutionException(self.tr('Negative weight value found. Please fix you data and try again.'))
|
||||
raise GeoAlgorithmExecutionException(self.tr('Negative weight value found. Please fix your data and try again.'))
|
||||
|
||||
if clazz not in means:
|
||||
means[clazz] = (0, 0, 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user