Re: [gdal-dev] help with resampling via python

2009-04-01 Thread Frank Warmerdam
Jose Gomez-Dans wrote: Hi Klokan, 2009/4/1 Klokan Petr Přidal mailto:klo...@klokan.cz>> gdal.RegenerateOverview() with 'average' and 'mode' algorithms. and gdal.ReprojectImage() with 'bilinear','cubic','cubicspline' and 'lanczos' algorithms. That's quite cool, but does Regener

Re: [gdal-dev] help with resampling via python

2009-04-01 Thread Jose Gomez-Dans
Hi Klokan, 2009/4/1 Klokan Petr Přidal > gdal.RegenerateOverview() with 'average' and 'mode' algorithms. > and > gdal.ReprojectImage() with 'bilinear','cubic','cubicspline' and > 'lanczos' algorithms. That's quite cool, but does RegenerateOverview() take into account NODATA values when doing t

Re: [gdal-dev] help with resampling via python

2009-04-01 Thread Chris Somerlot
That was the other method I was trying, reading the VRT file into memory using the new (to me) xml.etree.ElementTree lib. I was missing the tag, though, thanks. 2009/4/1 Klokan Petr Přidal > Hi Chris, > > You have two options in GDAL API for resampling via Python: > > gdal.RegenerateOverview()

Re: [gdal-dev] help with resampling via python

2009-04-01 Thread Jose Gómez-Dans
Hi, On Wednesday 01 April 2009 00:47:50 Chris Somerlot wrote: > Having trouble figuring out how to resample an image to a different cell > size from python. I looked over the VRT driver page and have been trying to > get this to work: I do this by reading in the data, and using numpy/scipy to cal

Re: [gdal-dev] help with resampling via python

2009-04-01 Thread Klokan Petr Přidal
Hi Chris, You have two options in GDAL API for resampling via Python: gdal.RegenerateOverview() with 'average' and 'mode' algorithms. and gdal.ReprojectImage() with 'bilinear','cubic','cubicspline' and 'lanczos' algorithms. Example of such functionality is in gdal2tiles.py in function GDAL2Tiles

[gdal-dev] help with resampling via python

2009-03-31 Thread Chris Somerlot
Having trouble figuring out how to resample an image to a different cell size from python. I looked over the VRT driver page and have been trying to get this to work: from osgeo import gdal gdal.AllRegister() src = gdal.Open('DOQ_test.TIF') drv = gdal.GetDriverByName('VRT') dst = drv.CreateCopy(