Skip to main content
Solved

ECW absolute value problem

  • February 27, 2023
  • 2 replies
  • 27 views

Hi,

 

I need to have parts of an othophoto in ECW format with absolute values. Previewing the raster in FME shows that the pixels have my preferred value of 0,0,0. When I write to geotif it works and I get the desired black areas with exactly 0,0,0, but not when I use an ECW writer. The black areas in the ECW have the black areas replaced with 1,0,1 or something similar. 

 

TIF with mask at 0,0,0:

TIF 

ECW with mask at 0,0,0:

ECW 

I have tried disabling the compression on the writer and removing the alpha band, but the result it the same. Any suggestions?

Best answer by daveatsafe

Hi @leif​,

The ECW compression is lossy, even when target compression percentage is set to 0, so it will not be possible to get exactly the same values back in all cases. I would recommend writing to GeoTIFF instead, using a lossless compression like LZW. You can configure the GeoTIFF writer to organize the image into tiles and overviews that will speed reading the images at different zoom levels, similar to ECW.

View original
Did this help you find an answer to your question?

2 replies

daveatsafe
Safer
Forum|alt.badge.img+19
  • Safer
  • Best Answer
  • February 27, 2023

Hi @leif​,

The ECW compression is lossy, even when target compression percentage is set to 0, so it will not be possible to get exactly the same values back in all cases. I would recommend writing to GeoTIFF instead, using a lossless compression like LZW. You can configure the GeoTIFF writer to organize the image into tiles and overviews that will speed reading the images at different zoom levels, similar to ECW.


  • Author
  • February 28, 2023

Thank you, @daveatsafe​!

 

I was hoping to use ECW since it's simple and fast to setup, but I will go the GEOTIFF route. More manual optimization required, but it is worth it in the end with increased compatibility and flexibility.


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