[gdal-dev] gdalwarp into an existing destination from python

Even Rouault even.rouault at spatialys.com
Wed Nov 27 11:28:56 PST 2019


Olivier,

> Is there a flag or something to achieve same behaviour as command line ? I
> looked carefully in the python api doc, but couldn't find it...

Not exacly a flag, but:

destDS = gdal.Open("dest.tif", gdal.GA_Update)
gdal.Warp(destDS, "source.tif", cutlineDSName="cutline.shp")

Cheers,

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the gdal-dev mailing list