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


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


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

  • 1
    Your GDAL version is is probably compiled without Spatialite. You can test it with ogrinfo -dialect sqlite -sql "select spatialite_version() from test" test.shp. – user30184 Aug 1 '16 at 11:33

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:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.