[Gdal-dev] Warping and resampling with gdal in python

Jose Luis Gomez Dans josegomez at gmx.net
Mon Feb 26 11:11:47 EST 2007


Hi Frank,
Thanks for your quick response

-------- Original-Nachricht --------
> You can also create the output file yourself with whatever extents and
> resolution you want, and then use gdal.ReprojectImage() instead of
> gdal.CreateAndReprojectImage().  If that doesn't give you the control
> you need, you are basically looking at using VRTs or shelling out to
> gdalwarp.

I tried this, but the Create() method doesn't let me choose the raster limits or the resolution. The definition goes like this:
def Create(self, filename, xsize, ysize, bands=1, datatype=GDT_Byte,               options = [])

While I can set the xsize and ysize, I would need to also set the extent of the window in the input file that will be considered. _gdal.Create() and friends don't let you do that (or am I wrong?).

In fact, I don't mind subsetting in the original dataset reference system, but other than by reading it in, storing it in an array and writing it out, I see no obvious way of doing this.

Cheers,
Jose
-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer



More information about the Gdal-dev mailing list