[gdal-dev] Merge all features in polygon shapefile with gdal
randre at gmail.com
Mon Jul 6 16:49:56 PDT 2015
Are you trying to do this via a spatially enabled database? In PostGIS,
the dissolve syntax looks like this:
"SELECT dissolve_field, ST_UNION(geometry) FROM table GROUP BY
On Mon, Jul 6, 2015 at 4:13 PM, Steven Lutz <steven at ruggedrocksoffroad.com>
> I've found some examples of how to dissolve features in a polygon using
> gdal but I'm not familiar with how to implement them.
> here is an example of what I've found, but I'm having trouble modifying it
> this is what I've come up with:
> ogr2ogr output.shp
> shp -dialect sqlite -sql
> "SELECT ST_Union(geometry), dissolve_field FROM input GROUP BY dissolve_field"
> it looks to me that it is trying to do this operation based on specific
> attribute entries but I'm looking to ignore the attribute entrie and make
> all features into one.
> This is what I've tried:
> the 32768.shp has an attribute named BLOCK and it's still not working..
> any ideas? >ogr2ogr -f "ESRI Shapefile" output.shp 32768.shp -dialect
> sqlite -sql "select ST_union(block) from '32768'" Warning 6:
> Normalized/laundered field name: 'ST_union(block)' to 'ST_union(b
> I am confused as to what I should be putting in the parenthasis of
> Please advise.
> Thank you
> Steven Lutz
> Rugged Rocks, LLC
> Sales & Support: (909)547-4651
> Nissan 4x4 Parts <http://ruggedrocks.com> / Off Road GPS Units & Maps
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gdal-dev