I'm trying to dissolve a shapefile according to a field using Python 2.7.10 and I don't want to use ArcPy.
Is there any way to do this using GDAL/OGR?
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It only takes a minute to sign up.Sign up to join this community
Using the QGIS Processing GDAL Dissolve algorithm and checking the log, you can find something like this:
ogr2ogr /tmp/OUTPUT.shp /tmp/points.shp -nlt PROMOTE_TO_MULTI -dialect sqlite -sql "SELECT ST_Union(geometry) AS geometry, \"DissolveID\" FROM \"points\" GROUP BY \"DissolveID\"" -f "ESRI Shapefile"