[gdal-dev] Re: gdal_retile and nodata
acangi
aca at ngi.be
Tue May 25 04:41:54 EDT 2010
Back from week-end, sorry for interrupting the conversation.
I tried setting a -a_nodata 255 value before creating the pyramid, the
result is exactly the same as with black nodata or without a nodata value.
The nodata value of the original geotiffs is ignored.
> First an image is created, large enough to hold the tile and its
> neighbors from level x-1
>
Is it possible this image has a black background color ?
> Third, the scaling takes place.
>
I guess the black background is interpolated with the border data and
produces nearly black pixels.
> The problem is, sometimes neighbors are missing, right ?
>
Right : my source data is not a rectangle.
> Do you have this problem already at level 1 or beginning with level 2 ?
>
Curiously, it starts at level 3. At levels 0, 1 and 2, the black remains
#000000
> Do you start from one big image or an already tiled image ?
>
My source data is made of several geotiff images.
In the past, I generated the same pyramid and didn't have this problem. The
parameters that changed are :
-pyramidOnly in the past, now no more
-ps 10000 10000 in the past, now 4096 4096
-co COMPRESS="LZW" in the past, "JPEG" now
- GDAL 1.6.0 in the past, now GDAL 1.7.2
The command I use now is :
gdal_retile.py -targetDir ../pyramid4096/ -levels 12 -v -s_srs
/mnt/webgisdata/geoserver/config/3812.prj -ps 4096 4096 -r bilinear -co
"COMPRESS=JPEG" -co "TILED=YES" -co "INTERLEAVE=PIXEL" -tileIndex orthocol
-tileIndexField location *.tif &
I gave a shot with LZW compression and the problem is gone away. But the
output data is 4 GB instead of 800 MB with JPEG compression.
Do you think I should use LZW compression ?
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/gdal-retile-and-nodata-tp5079895p5097462.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.
More information about the gdal-dev
mailing list