Skip to main content

Hello,

I am trying to write an 8bit DEM to a GeoTIFF. The output is
supposed to have 2 bands. One gray or UINT8 and the other is an alpha8
band.

The problem is that the GeoTIFF writer seems to be refusing the
write out the alpha8. It keeps converting to UINT8. When I feed the
output from my last transformer (before the writer) into the inspector the
output looks exactly as it should and both bands are there. However when
I actually inspect the written dataset, the gray8 is there as expected but the
alpha8 is converted to UINT8.

System:

Desktop version is 2015.1. I have also tried this on 2014.

Windows 7

Any help is greatly appreciated.

Nenad K.

I can reproduce the problem on 2015.1.3.1, with both the tiff and geotiff writers, but sadly have no solution for you.


I can reproduce the problem on 2015.1.3.1, with both the tiff and geotiff writers, but sadly have no solution for you.

Hmm. Well at least it's encouraging that you can reproduce. Thanks for trying.


Hi,

I guess the Geotiff format has no ability to save interpretations for each band. In my observation, FME Geotiff reader seems to always interpret unsigned 8-bit integer bands with a constant rule like this.

  • 1 band: Gray8
  • 2 bands: Gray8, UInt8 (this is your case)
  • 3 bands: Red8, Green8, Blue8
  • 4 bands: Red8, Green8, Blue8, Alpha8
  • 5 bands or more: Red8, Green8, Blue8, Alpha8, UInt8, UInt8, ...

If you need to interpret the 2nd band as Alpha8, consider using the RasterSelector (Band and Pallete List: 1) and RasterBandInterpretationCoercer (Destination Interpretation Type: Alpha8) after reading the written data with the Geotiff reader.

Takashi


Yes, I find that too. I see a problem report on this that was fixed in 2013. I wonder if it included this scenario. Let me check with the developer and I'll get back to you.


Hi,

I guess the Geotiff format has no ability to save interpretations for each band. In my observation, FME Geotiff reader seems to always interpret unsigned 8-bit integer bands with a constant rule like this.

  • 1 band: Gray8
  • 2 bands: Gray8, UInt8 (this is your case)
  • 3 bands: Red8, Green8, Blue8
  • 4 bands: Red8, Green8, Blue8, Alpha8
  • 5 bands or more: Red8, Green8, Blue8, Alpha8, UInt8, UInt8, ...

If you need to interpret the 2nd band as Alpha8, consider using the RasterSelector (Band and Pallete List: 1) and RasterBandInterpretationCoercer (Destination Interpretation Type: Alpha8) after reading the written data with the Geotiff reader.

Takashi

I should have specified this in the question but I was actually already using the RasterBandInterpretationCoercer to try to force alpha8. My data is read in UINT8 and using the coercer I can force to either UINT8 or GRAY8 but not Alpha8. I am also convinced that it's not the reader but the writer that is the problem. When the data is read I can coerce to any type and it looks as it should if I feed it to inspector. However my written product is different so it's a question of if the GeoTIFF writer supports Alpha8. I know that the GeoTIFF format does.


Reply