Re: [gdal-dev] gdaladdo, overviews and NODATA

2012-02-22 Thread Ralf Suhr
Hi Armin, you can work around with removing the nodata value first, build the overviews and setting the nodata value again with gdal_edit.py. The script can be found in source directory gdal/swig/python/samples. Gr Ralf On Dienstag 21 Februar 2012 21:36:19 Armin Burger wrote: Hi all I

Re: [gdal-dev] gdaladdo, overviews and NODATA

2012-02-22 Thread Armin Burger
On 21/02/2012 22:36, Frank Warmerdam wrote: On Tue, Feb 21, 2012 at 1:17 PM, Armin Burgerarmin.bur...@gmx.net wrote: Then I tried to set the NODATA value to 0 using Gdal-Python, and afterwards they had Band 1 Block=3000x1 Type=Byte, ColorInterp=Red NoData Value=0 Band 2 Block=3000x1

[gdal-dev] gdaladdo, overviews and NODATA

2012-02-21 Thread Armin Burger
Hi all I have a question regarding the gdaladdo tool and NODATA pixels: When using resampling like average it seems that along the border of DATA and NODATA pixels there happens an averaging also of some of the original NODATA pixels (looks like 1-2 pixel width). This way in the overviews

Re: [gdal-dev] gdaladdo, overviews and NODATA

2012-02-21 Thread Frank Warmerdam
Armin, Reviewing the overview building code in gdal/gcore/overview.cpp it clearly tries to exclude nodata values from the averaging calculation. What does the gdalinfo report look like for the file before you run gdaladdo? Best regards, On Tue, Feb 21, 2012 at 12:36 PM, Armin Burger

Re: [gdal-dev] gdaladdo, overviews and NODATA

2012-02-21 Thread Armin Burger
Frank the original images showed ... Metadata: AREA_OR_POINT=Area Image Structure Metadata: INTERLEAVE=PIXEL ... Band 1 Block=3000x1 Type=Byte, ColorInterp=Red Band 2 Block=3000x1 Type=Byte, ColorInterp=Green Band 3 Block=3000x1 Type=Byte, ColorInterp=Blue Then I tried to set the NODATA

Re: [gdal-dev] gdaladdo, overviews and NODATA

2012-02-21 Thread Frank Warmerdam
On Tue, Feb 21, 2012 at 1:17 PM, Armin Burger armin.bur...@gmx.net wrote: Then I tried to set the NODATA value to 0 using Gdal-Python, and afterwards they had Band 1 Block=3000x1 Type=Byte, ColorInterp=Red  NoData Value=0 Band 2 Block=3000x1 Type=Byte, ColorInterp=Green  NoData Value=0