[gdal-dev] VRT - using 8BPP palettized tiles

Oyvind Idland oyvind.idland at gmail.com
Wed Apr 11 05:33:09 EDT 2012


Thanks Chaitanya,

i forgot to add, that I was refering to an option in gdalbuildvrt, there is
no way of specifying expansion there ?
(otherwise, there is a lot of manual work to do in the XML)

Let me know if I am wrong !

I solved my problem by
  1) Creating a VRT on the original RGB tiles
  2) Creating a 20% size "sample.tif" RGB tiff from the VRT
  3) running rgp2pct on sample.tif
  4) running a new rgb2pct on all the tiles, using the result from 3) as
-pct option

That way I get the same colour table on all tiles, and it looks acceptable.


- oyvind


On Wed, Apr 11, 2012 at 10:55 AM, Chaitanya kumar CH <chaitanya.ch at gmail.com
> wrote:

> Oyvind,
>
> VRT does support colortable expansion.
> Check out the ComplexSource sub-topic in the vrt doc page[1].
>>
>> From the The ComplexSource supports fetching a color component from a
>> source raster band that has a color table. The ColorTableComponent value is
>> the index of the color component to extract : 1 for the red band, 2 for the
>> green band, 3 for the blue band or 4 for the alpha band.
>>
>
> [1]: http://www.gdal.org/gdal_vrttut.html
>
> On Wed, Apr 11, 2012 at 1:27 PM, Oyvind Idland <oyvind.idland at gmail.com>wrote:
>
>> Hello,
>>
>> I am fiddling with some old scanned (handmade) maps. In order to reduce
>> the size of the data, and since
>> the maps has a limited amount of colors, i figured that using palettized
>> 8BPP tiffs would be suitable in this
>> case.
>>
>> I got several tiles that make up the whole area, using rgb(0,0,0) as
>> nodata (making JPEG compression
>> unsuitable)
>>
>> The idea was to use VRT to join these together, but since they all have
>> different color tables,
>> this is not possible.
>>
>> Would it be an idea to implement support for an "expand option" in VRT,
>> e.g expanding to rgb/rgba ?
>>
>> Not sure how many would need this feature though.
>>
>>
>> -- oyvind
>>
>> _______________________________________________
>> gdal-dev mailing list
>> gdal-dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>>
>
>
>
> --
> Best regards,
> Chaitanya kumar CH.
>
> +91-9494447584
> 17.2416N 80.1426E
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20120411/3e957e3c/attachment.html


More information about the gdal-dev mailing list