[gdal-dev] How to specify extent of a VRTWarpedDataset in Python?

Even Rouault even.rouault at mines-paris.org
Thu Jun 2 05:19:01 EDT 2011


Le jeudi 02 juin 2011 09:22:37, Antonio Valentino a écrit :
> Hi Even,
> 
> Il 01/06/2011 13:58, Even Rouault ha scritto:
> > Selon Antonio Valentino <antonio.valentino at tiscali.it>:
> >>> Yes, with Dataset.Create() by specifying a SUBCLASS=VRTWarpedDataset
> >>> creation option. ... But I don't think it will help you much since the
> >>> GDALInitializeWarpedVRT() that is then used by gdalwarp to fill the
> >>> dataset isn't mapped to SWIG.
> >> 
> >> maybe the gdal.ReprojectImage could help, but I don't have the time to
> >> test it right now.
> > 
> > I don't think ReprojectImage() will work when outputing to a VRT dataset.
> 
> Thank you for the info.
> 
> Just for curiosity, there is a particular reason why
> GDALInitializeWarpedVRT has not been exposed to Python or simply no one
> got the time to do it?

I think it's because it's not straightforward to expose to Python because of 
the GDALWarpOptions * psWO argument. There's no mapping for GDALWarpOptions* 
right now. I've not evaluated precisely how complex it would be though. At 
first look, I'd say it would require writing a shadow class for it.

> 
> 
> regards


More information about the gdal-dev mailing list