Opened 4 years ago

Closed 4 years ago

#2227 closed enhancement (fixed)

wcst_import - creates colorPatetteTable automatically if input tif file contains this metadata

Reported by: Bang Pham Huu Owned by: Bang Pham Huu
Priority: major Milestone: 10.0
Component: wcst_import Version: 9.8
Keywords: Cc: Dimitar Misev, Vlad Merticariu
Complexity: Medium

Description

Currently, one needs to provide a valid rasql colorPaletteTable as a file to import to coverage's global metadata with general recipe. For example:

"colorPaletteTable": "color_palette_table_rasql_READY.cpt"

In the case of TIFF file, if it contains palette table in band 1, e.g:

Band 1 Block=67x65 Type=Byte, ColorInterp=Palette
  Metadata:
    COLORINTERP=Palette
  Color Table (RGB with 256 entries)
    0: 0,0,0,255
    1: 0,0,0,255
    2: 0,0,0,255
    ...

wcst_import should collect it by default ("colorPaletteTable" option is not specified in the ingredient file) or in case

"colorPaletteTable": "auto"

and transfer it to valid rasql colorPaletteTable and import to coverage's metadata.

In case, one does not want to add this colorPaletteTable, then he can set in the ingredient file:

"colorPaletteTable": ""

Attachments (1)

extract_ctable.py (458 bytes ) - added by Vlad Merticariu 4 years ago.

Download all attachments as: .zip

Change History (3)

comment:1 by Vlad Merticariu, 4 years ago

Attached is a python script that I use to extract this info with gdal.

by Vlad Merticariu, 4 years ago

Attachment: extract_ctable.py added

comment:2 by Bang Pham Huu, 4 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.