[gdal-dev] how to create an image with a colortable?

Chaitanya kumar CH chaitanya.ch at gmail.com
Wed Sep 26 05:27:47 PDT 2012


Sam,

datatype is handled by gdal. Can you provide the gdalinfo output of the
GeoTiff?

On Wed, Sep 26, 2012 at 4:28 PM, Samantha Goodchild-Brown <
samanthag at geograph.co.za> wrote:

>  After using gdal info to confirm my input image is a greyscale, using the
> FAQRaster intructions I used gdal_translate to create a VRT.
> I then opened it in crimson editor to edit the colorinterp and add in the
> colortable. I used
>
> <ColorInterp>Palette</ColorInterp>
> <ColorTable>
>        <11 c1="181" c2="69"  c3="15"/>
>        <12 c1="224"  c2="86"  c3="20"/>
>        <13 c1="229"  c2="130"  c3="21"/>
>
>
> AHA, I see my first error. I forgot to add the '/' to close the paragraph.
> I am VERY RUSTY at this.
>
> Gdal was complaining about not being able to close the file and refering
> me to </VRTRasterBand> and
> </VRTDataset> which confused me greatly as I didn't touch it at all.
>
> Now it runs, but fails because it tells me my datatype is not compatiable.
> This is a different issue I will take up separately as I expect has
> nothing to do with GDAL.
>
> Many thanks. Will keep at it.
>
>
>
> On 2012/09/26 11:54, Chaitanya kumar CH wrote:
>
> Sam,
>
> What did you do? What errors did you get?
>
> On Wed, Sep 26, 2012 at 12:23 PM, Samantha Goodchild-Brown <
> samanthag at geograph.co.za> wrote:
>
>> I need to change a greyscale image to Palette and specify the colors to
>> use for specific values.
>>
>> However I am getting very confused with all the 'comments' and references
>> and instructions
>>
>> eg.
>> In "
>> http://trac.osgeo.org/gdal/wiki/FAQRaster#Howtocreateormodifyanimagecolortable"
>> it is explained how to edit a VRT to make a new tif with a color palette of
>> your choice.
>> However in later 'fishings' I saw someone mention that this doesn't work
>> and that the only way to do it is with scripting or programming.
>>
>> I am now also trying as it seems to be the simplest method but I am also
>> failing.
>>
>> Other tickets etc that come close are in the region of 4 years old etc
>> and way over my head.
>>
>> Besides the obvious (gdal error messages), can anyone tell me why this is
>> happening? what I need to tweek? if a fix is on the way? is it still valid
>> that the only workaround is with scripting?
>> Does anyone know of another open source method that doesn't involve
>> scripting?
>>
>> Many thanks
>> Sam
>> _______________________________________________
>> 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
>
>
>


-- 
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/20120926/21d704d4/attachment.html>


More information about the gdal-dev mailing list