[Gdal-dev] Release 1.4.0

Frank Warmerdam warmerdam at pobox.com
Tue Nov 14 10:55:02 EST 2006


Yves Jacolin wrote:
> Le Lundi 13 Novembre 2006 21:20, Frank Warmerdam wrote:
>> Folks,
>>
>> Following up on Ari's suggestion, I'd like to plan on a new GDAL
>> release by mid December, perhaps with a first official beta December
>> 1st.
>> [...]
> 
> Just a question/suggestion, is it possible to allow ogr to clip a region from 
> a box or from another vector file like gdal-translate does for raster ? May 
> be it already exists ?!

Yves,

The ogr2ogr program includes a -spat flag that allows you to select a
particular rectangular region of a vector layer.  However, it doesn't
actually clip the returned geometries to the rectangle.  It just selects
all features whose geometries MBR touches the indicated box.

It is possible to do clipping from Python using GEOS through OGR.  You
would need to use the Intersection() method to clip geometries to your
box area of interest.

Best regards,

-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org




More information about the Gdal-dev mailing list