How do I apply using this same concept, but simply merging all features into one?
ogr2ogr output.shp input.shp -dialect sqlite -sql
"SELECT ST_Union(geometry), dissolve_field FROM input GROUP BY dissolve_field"
How do I apply using this same concept, but simply merging all features into one?
ogr2ogr output.shp input.shp -dialect sqlite -sql
"SELECT ST_Union(geometry), dissolve_field FROM input GROUP BY dissolve_field"
In order to merge all features into one, you should do:
ogr2ogr output.shp input.shp -dialect sqlite -sql "SELECT ST_Union(geometry) AS geometry FROM input"
where geometry is the special field used in order to represent the geometry of the features in SQLite SQL dialect and input in the SQL statement is the input layer name.
– Steven Lutz Jul 07 '15 at 20:18ogr2ogr -f "ESRI Shapefile" output.shp 32768.shp -dialect sqlite -sql "select ST_union(geometry) from '32768'"
SELECT ST_Union(geometry) FROM inputI would think. – John Powell Jul 03 '15 at 08:54Warning 6: Normalized/laundered field name: 'ST_union(block)' to 'ST_union(b'
– Steven Lutz Jul 03 '15 at 19:53