Solved

ECW absolute value problem

  • 27 February 2023
  • 2 replies
  • 6 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?

icon

Best answer by daveatsafe 27 February 2023, 17:25

View original

2 replies

Userlevel 2
Badge +17

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.

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.

Reply