Skip to main content
Question

Tiff to ECW problem due to BAND 0 being gray16


Forum|alt.badge.img

I have a number of 16bit RGB raster images which need to be converted to ECW format. The images are displayed perfectly in ArcGIS and have the following attributes.

rows and columns: 1506, 2051 No Bands: 3 Format: TIFF Pixel depth: 16 Bit Compression LZW

When I load the Tiff in FME 2017 and inspect it, it is rendered black with the following information:

rows and columns: 959, 250 BAND 0 (Gray 16) BAND 1 (UINT 16) BAND 2 (UINT16)

My translation to ecw fails due to "Unsupported band interpretation 'GRAY16'". How can I resolve this?

6 replies

david_r
Celebrity
  • January 9, 2018

According to the documentation, the ECW format support the following band interpretations: Red8, Green8, Blue8, Alpha8, Gray8. Notice that 16-bit bands are not supported.

You can coerce (re-interpret) the raster to RGB24 using the RasterInterpretationCoercer (or even the RasterBandInterpretationCoercer if you need more fine-grained control over the individual bands) before sending your raster to the ECW writer.


Forum|alt.badge.img

Thanks for your reply. I tried the RasterInterpretationCoercer using RGB24 but Band0 (RED8) is defined as nodata! Thus the image is rendered green. How can I define Band0 as red and why is this interpreted as GRAY16 in FME. In ArcGIS this is just a normal RGB.


david_r
Celebrity
  • January 9, 2018

You can use the RasterBandInterpretationCoercer on band 0 to force it to Red8, it that's what you need. Possible workflow:

  • RasterBandSeparator
  • TestFilter on "_band_index" to coerce the different bands to their respective types, e.g. Red8, Green8 and Blue8
  • RasterBandCombiner

takashi
Influencer
  • January 9, 2018
robertdbuckley wrote:

Thanks for your reply. I tried the RasterInterpretationCoercer using RGB24 but Band0 (RED8) is defined as nodata! Thus the image is rendered green. How can I define Band0 as red and why is this interpreted as GRAY16 in FME. In ArcGIS this is just a normal RGB.

I don't know why Nodata has been defined in the Band 0 in your case, but you can remove the Nodata definition with the RasterBandNodataRemover, or change it with the RasterBandNodataSetter.

 

 


fmelizard
Safer
Forum|alt.badge.img+18
  • Safer
  • January 9, 2018
Hi @robertdbuckley - Very odd (and rather concerning)to see the difference in the resolution here between ArcGIS and FME. Are you you 100% that the image is the same? If so can you please share a copy of the Tiff for us to take a look at. This sounds fishy to me...I'd love to try and reproduce this in ArcMap and FME.

 


helmoet
Forum|alt.badge.img+8
  • January 11, 2018

Hi, there's a perfect article on this from Mita:


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