Subject: Re: [gdal-dev] gdaladdo, overviews and NODATA
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 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 they get values higher than 0 (0 is defined as NODATA). Using
> this type of data in mapserver leads to small black borders when the
> overviews are taken since the tag
> OFFSITE 0 0 0
> does not work anymore for the small border of now only "nearly-black"
> pixels.
>
> I tried to set the metadata NODATA of the images to 0 for each band but
> it had no effect. Only when I use resampling "nearest" then every NODATA
> pixel of the overviews retains the full black 0 0 0.
>
> Is there a way to force to exclude NODATA pixels during the "average"
> resampling so that they retain their NODATA values?
>
> Thanks
> Armin
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev@xxxxxxxxxxxxxxx
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
_______________________________________________
gdal-dev mailing list
gdal-dev@xxxxxxxxxxxxxxx
http://lists.osgeo.org/mailman/listinfo/gdal-dev
(C)2011 mailinglist-archive.com