We have a very large shapefile with over 30000 features and want to merge it with a script on a server. Currently we try it with QGIS, but the processing takes way too much time.
Is there a way to do it with the GDAL/OGR Tools or Python?
|
|
In GIS context, the better is organize your data in a database (!). Then, many kinds of operations will be simple. With PostGIS (using PostgreSQL as database) the command that solves your problem is
And the commands are standard, see standard OGC functions ST_Collect and ST_Union. Using as input "OSM-Coastline Polygons", you are using POLYGON OGC types in the database. The ST_Collect(geom) of a set of POLYGONs will return a GEOMETRYCOLLECTION, but you can convert it into a MULTIPOLYGON, or produce ir directally by ST_Union function. |
|||||||||||
|
|
Not quite Python or GDAL but maybe you could try GRASS' v.extract function. It should let you extract and dissolve the features. You can access it through QGIS' SEXTANTE Toolbox. |
||||
|
|
i dont know whether arcmap Python scripting works for you or not but you can check out this topic about batch merging script here Beside this in python there is a library with the name of pyshp about reading and writing shapefiles. i hope if helps you... |
|||||
|