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?
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
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
SELECT ST_Collect(geom) FROM your30000features_table;
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 it directly by the 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.