[GIS] Dissolve using ogr2ogr gives ‘no such function: ST_union’

dissolveogr2ogr

I am trying to dissolve a shapefile using ogr2ogr but I am getting error no such function: ST_union:

Command:

C:\ms4w>ogr2ogr "C:\output\test-dissolved.sh p" "C:\input\test.shp"
-dialect sqlite -sql "SELECT ST_union(geometry) FROM test "

Error:

ERROR 1: In ExecuteSQL(): sqlite3_prepare(SELECT ST_union(geometry) FROM test ): no such function: ST_union

Best Answer

I should use GUnion instead of ST_Union, I tried it and it worked.

below is a list of all spatialite functions where it shows the ST & GEOS functions:
https://www.gaia-gis.it/gaia-sins/spatialite-sql-4.3.0.html

Related Question