Bug report #19307
Processing OGR Dissolve having problems with blanks in filename
|Affected QGIS version:||3.3(master)||Regression?:||No|
|Operating System:||Easy fix?:||Yes|
|Pull Request or Patch supplied:||Yes||Resolution:|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||27135|
When trying to dissolve a layer which has a blank in the filename, the OGR Dissolve tool produces an error.
Blanks in the path are handled correctly.
The OGR Buffer Vectors tool works in both cases.
2018-06-29T10:09:48 INFO ogr2ogr C:/Users/andreas.wicht/AppData/Local/Temp/processing_487fcaefef2c4ca0912034dbbe57979c/cf3b5d9bffb748ccb6d9f060d02ee4e4/OUTPUT.shp "C:/temp/hexbins2 2.shp" -dialect sqlite -sql "SELECT ST_Union(geometry) AS geometry, gid FROM hexbins2 2 GROUP BY gid" -f "ESRI Shapefile" 2018-06-29T10:09:48 INFO GDAL execution console output ERROR 1: In ExecuteSQL(): sqlite3_prepare_v2(SELECT ST_Union(geometry) AS geometry, gid FROM hexbins2 2 GROUP BY gid): near "2": syntax error
I guess quotes at the table name are missing in the sqlite SQL statement.
[processing][gdal] Add unit tests for Dissolve algorithm
Thanks to @agiudiceandrea:
Statistics were erroneously computed on the dissolve field, rather than on the statistic attribute field as it should be.
Handle filenames with white spaces (in the same way as Buffer, OffsetCurve, OneSideBuffer, PintsAlongLines algs).
#2 Updated by Andrea Giudiceandrea almost 2 years ago
- Pull Request or Patch supplied changed from No to Yes
if you want to fix the Dissolve alg for your installation of QGIS 3.2, you can directly modify [QGIS install dir]\apps\qgis\python\plugins\processing\algs\gdal\Dissolve.py replacing every occurrence of