[gdal-dev] Re: gdal_retile and nodata
christian.mueller at nvoe.at
christian.mueller at nvoe.at
Tue May 25 08:52:00 EDT 2010
Hmm, jpeg is not a lossless compression, LZW is lossless. It appears
that we have a problem beyond our scope. I never use jpeg and prefer
LZW or png. I would go with LZW, this is the safe way.
4 GB are not dramatically. I store my tiles/pyramids in a database
prepared for geoserver, there are about 100 GBs of tiles in png
format, no problem.
Btw, I have seen another mail one the mailing list about problems
adding overviews to a gtiff with JPEG compression.
Quoting acangi <aca at ngi.be>:
>
> 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-tp5079895p5097559.html
> Sent from the GDAL - Dev mailing list archive at Nabble.com.
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
More information about the gdal-dev
mailing list