Re: [gdal-dev] translating palettes in geotiff - followup

2013-04-24 Thread Jukka Rahkonen
David Strip stripfamily.net> writes: > > In my previous email, I laid out a process that seems to work for me. > Now I realize that while this works for a single input file, how do I > generalize it to work on a set of tiles? > At first I naively thought I could just replace the SourceFileName

[gdal-dev] translating palettes in geotiff - followup

2013-04-23 Thread David Strip
In my previous email, I laid out a process that seems to work for me. Now I realize that while this works for a single input file, how do I generalize it to work on a set of tiles? At first I naively thought I could just replace the SourceFileName and re-run the gdal_translate -of gtiff step, bu

Re: [gdal-dev] translating palettes in geotiff

2013-04-23 Thread David Strip
From Even's advice, I was able to piece together this workflow. Given an input geotiff image.gtif gdaltranslate -of image.gtif image.vrt Then open image.vrt in a text editor and look for the color table by searching for the tag (actually you probably don't need to search, it's near the top) R

Re: [gdal-dev] translating palettes in geotiff

2013-04-23 Thread Jukka Rahkonen
David Strip stripfamily.net> writes: > > On 4/23/2013 2:12 PM, Jukka Rahkonen wrote: > > rgb2pct.py utilityhttp://www.gdal.org/rgb2pct.html is doing kind of similar > > thing with the -pct option. > > > > -Jukka Rahkonen- > > I looked at the reference, but don't see how this would work. Seems

Re: [gdal-dev] translating palettes in geotiff

2013-04-23 Thread David Strip
On 4/23/2013 2:12 PM, Jukka Rahkonen wrote: rgb2pct.py utilityhttp://www.gdal.org/rgb2pct.html is doing kind of similar thing with the -pct option. -Jukka Rahkonen- I looked at the reference, but don't see how this would work. Seems like I would have to first translate the geotiff to an RGB,

Re: [gdal-dev] translating palettes in geotiff

2013-04-23 Thread David Strip
On 4/23/2013 2:11 PM, Even Rouault wrote: Le mardi 23 avril 2013 21:52:39, David Strip a écrit : I have a paletted geotiff that I want to modify by mapping palette entries to a new palette. Thus, I have an input palette, an output palette, and a geotiff. I have a mapping (many to 1, if it matte

Re: [gdal-dev] translating palettes in geotiff

2013-04-23 Thread Even Rouault
Le mardi 23 avril 2013 22:36:10, David Strip a écrit : > On 4/23/2013 2:11 PM, Even Rouault wrote: > > Le mardi 23 avril 2013 21:52:39, David Strip a écrit : > >> I have a paletted geotiff that I want to modify by mapping palette > >> entries to a new palette. > >> Thus, I have an input palette, an

Re: [gdal-dev] translating palettes in geotiff

2013-04-23 Thread Jukka Rahkonen
David Strip stripfamily.net> writes: > > I have a paletted geotiff that I want to modify by mapping palette > entries to a new palette. > Thus, I have an input palette, an output palette, and a geotiff. I have > a mapping (many to 1, if it matters) from the input palette to the > output pale

Re: [gdal-dev] translating palettes in geotiff

2013-04-23 Thread Even Rouault
Le mardi 23 avril 2013 21:52:39, David Strip a écrit : > I have a paletted geotiff that I want to modify by mapping palette > entries to a new palette. > Thus, I have an input palette, an output palette, and a geotiff. I have > a mapping (many to 1, if it matters) from the input palette to the > o

[gdal-dev] translating palettes in geotiff

2013-04-23 Thread David Strip
I have a paletted geotiff that I want to modify by mapping palette entries to a new palette. Thus, I have an input palette, an output palette, and a geotiff. I have a mapping (many to 1, if it matters) from the input palette to the output palette. Each pixel in the output geotiff will have a va