[gdal-dev] Unions shapefiles using ogr

Even Rouault even.rouault at mines-paris.org
Mon Dec 17 06:39:49 PST 2012


Selon Paul Meems <bontepaarden at gmail.com>:

> Thanks Even.
>
> So this means I need to write my own application using the Union() from
> GEOS and I cannot use it on the command line using OGR VRT?
> That is OK, I can do that. Using existing utilities on the command line
> seemed easier ;)

You don't necesserarily need to write an application. You can use ogr2ogr -sql
"SELECT ST_Union(....)" -dialect sqlite if you have GDAL built with spatialite
support.

or if you can use Python for example, the OGR Layer algebra operations are
available. See
http://trac.osgeo.org/gdal/browser/trunk/autotest/ogr/ogr_layer_algebra.py for
example around line 119 (err = A.Union( B, C )). Writing a script that would use
those operations would be a good contribution if you are interested in.


More information about the gdal-dev mailing list