[gdal-dev] Combining quantized png files in gdal2tiles

Andre Joost andre+joost at nurfuerspam.de
Fri Jun 14 07:55:22 PDT 2013


Am 14.06.2013 00:55, schrieb Phil Scadden:
> Okay, but how is the best way to fix it? Since pnqnq runs on individual
> tiles, I would not expect tiles to have the same palette.
>
> What is needed is to read the nq tiles into memory, convert to RGBA
> raster, then put that into overview tile. How tricky is this to do? Any
> pointers into the API that would help me.

I ran into the same problem when tiling paletted dutch top map tif files.
I created vrts with RGBA with the following command (on Windows):

for %%N in (D:\Karten\gdal\gdal2tiles\NL25\*.tif) DO gdal_translate -of 
vrt -expand rgba %%N D:\Karten\gdal\gdal2tiles\NL25\%%~nN.vrt

and then build an index and ran gdal2tiles on the index vrt:

gdalbuildvrt -allow_projection_difference index25.vrt NL25\*.vrt
gdal2tiles --s_srs EPSG:28992 --zoom 15-16 index25.vrt tiles

HTH,
André Joost




More information about the gdal-dev mailing list