Monday, 4 January 2016

arcgis desktop - Dissolve in ogr / python


I have a set of ~100,000 polygons (.shp format). Using python and ogr I would like to dissolve them to one feature class to speed up other downstream operations. The command I am using is:


ogr2ogr -f "ESRI Shapefile" dissolved.shp input.shp -dialect sqlite -sql "select ST_Collect(Geometry),common_attribute from input GROUP BY common_attribute"



The command takes some time to run (now over an hour, likely significantly longer). Doing the dissolve in ArcGIS and grouping by the common field results in the desired output in just a few seconds. My questions are (1) Why is ArcGIS so much faster? (2) How can I speed up this operation




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...