[Ottawa_users] Clipping shapefiles with ogr2ogr

Tyler Mitchell (OSGeo) tmitchell at osgeo.org
Mon Feb 18 11:26:36 EST 2008


On 18-Feb-08, at 6:22 AM, Paul Spencer wrote:

> My first guess is that ogr2ogr doesn't clip, it uses the bbox as a  
> spatial selection and keeps anything that intersects with the  
> bbox.  Would this account for your results?

That's right, it cannot clip, but will select/return all features  
that fit in the area.  You can't use ogr2ogr for clipping but I  
believe you could write a Python script that calls the OGR and GEOS  
functions to do this job.

Tyler


More information about the Ottawa_users mailing list