On vendredi 3 février 2017 10:45:37 CET Johan Van de Wauw wrote:
> Hi all,
> 
> We are using the new python function gdal.VectorTranslate which should
> work similar to ogr2ogr.
> 
> We were able to use spatFilter to select only elements that intersect
> (like the [-spat xmin ymin xmax ymax] operator.
> 
> But we failed to clip to the extent, similar to the
> [-clipsrc [xmin ymin xmax ymax] option in ogr2ogr. Is this possible
> with this function?
> 

Johann,

it indeed doesn't look like this was mapped to a friendly Python argument. But 
you can 
always use the generic options keyword to specify the command line parameters 
like you do 
with ogr2ogr (note that if you use options, all other dedicated parameters will 
be ignored).

Contributions to add a dedicated argument for clipSrc are welcome. Hint: edit
the VectorTranslateOptions() method in swig/include/python/gdal_python.i

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com
_______________________________________________
gdal-dev mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to