Skip to main content
Question

Hi all, How to replace band values (0-28) with textual values from the mapping attribute {"0": "Value1", "1": "Value2", ... "28": "Value29"} in a GEOTIFF raster file?


egge
Contributor
Forum|alt.badge.img+14
  • Contributor

 I have opened the GEOTIFF file in Data Inspector (see screen capture below) and I do see the mapping attribute, containing a list with all the values.

So, I somehow 1) need to read out these values from the mapping attibute and 2) replace the band values with the textual value.

 

Sure FME can do this, but I did not yet figure out how... 😃

 

Any help will be appriciated.

 

TIA,

 

Egge-Jan

Untitled

3 replies

Forum|alt.badge.img+2
  • January 21, 2021

@egge​ What's the output that you want? Most raster formats do not handle a string value. FME can add a string to a raster but in most cases wouldn't have anywhere for it go...


egge
Contributor
Forum|alt.badge.img+14
  • Author
  • Contributor
  • January 21, 2021

Hi @Mark Stoakes​ ,

 

Tnx for your swift reply. Yes, I can explain where I want to go. I want to visualize the raster with a clear legend, more or less like shown in the screen capture below.

To accomplish this - using QGIS - I applied symbology to the the raster, but then the legend showed values 0 to 28 and I had to - manually!! - replace these with the 28 values. (Did not find a way to read out the values in the mapping... :-( )

So, I want to 1) recolor the raster and 2) assign the textual values to the cells. I guess it should be done somewhere between the Extract and Load steps, in the Transform phase of the process, right?

 

Capture


Forum|alt.badge.img+2
  • January 21, 2021
egge wrote:

Hi @Mark Stoakes​ ,

 

Tnx for your swift reply. Yes, I can explain where I want to go. I want to visualize the raster with a clear legend, more or less like shown in the screen capture below.

To accomplish this - using QGIS - I applied symbology to the the raster, but then the legend showed values 0 to 28 and I had to - manually!! - replace these with the 28 values. (Did not find a way to read out the values in the mapping... :-( )

So, I want to 1) recolor the raster and 2) assign the textual values to the cells. I guess it should be done somewhere between the Extract and Load steps, in the Transform phase of the process, right?

 

Capture

@egge​ this looks like something you have to do in QGIS. FME can easily use a lookup table (DatabaseJoiner), but I don't think you can save those values in the raster. It seems to me that it's QGIS that needs to be able to read the lookup table for the legend.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings