[Gdal-dev] Cookie cutting shapefiles in OGR

Markus Neteler neteler at itc.it
Wed Jul 5 07:58:31 EDT 2006


On Sun, Jul 02, 2006 at 04:18:36PM -0400, Frank Warmerdam wrote:
...
> You might want to look at options for doing this in GRASS.  I believe it
> has some sort of layer overlay operation (perhaps done in the raster
> domain?).

You can do it both in the raster or vector domain.
Since vector was asked:
 http://grass.itc.it/grass61/manuals/html61_user/v.overlay.html
 http://grass.itc.it/grass61/manuals/html61_user/v.select.html

Operators are
    and : also known as 'intersection' in GIS
    or :  also known as 'union' in GIS (only for atype=area)
    not : features from ainput not overlayed by features from binput
    xor : features from either ainput or binput but not those from ainput overlayed 
          by binput (only for atype=area)

As a script solution, you can put everything into a shell script which
internally launches GRASS:
- v.in.ogr: import
- v.overlay: operation
- v.out.ogr: export

For details, see
 http://grass.gdf-hannover.de/wiki/GRASS_and_Shell

Regards,

 Markus



More information about the Gdal-dev mailing list