IMAGINE Discussions

Discuss and share topics of interest using ERDAS IMAGINE the world’s leading geospatial data authoring system.
Showing results for 
Search instead for 
Do you mean 
Reply
Highlighted
Occasional Contributor
Posts: 5
Registered: ‎03-03-2016
Accepted Solution

Create ECW Transparency

This function is supposed to be able to apply an opacity layer onto an existing ecw file without having to create (and thus recompress) a new file. It does not seem to work. Using Imagine Essentials 2015. Any idea of the reason for this malfunction?  Bjørn

Highlighted
Technical Evangelist
Posts: 906
Registered: ‎10-01-2015

Re: Create ECW Transparency

Hi Bjørn,

 

Are there any error messages or other messages in the Session Log that might help trouble-shoot the issue? (File / Session / View Session Log to see the session log).

 

Cheers

Ian Anderson
Chief Product Owner, Desktop Remote Sensing
Hexagon Geospatial
Highlighted
Frequent Contributor
Posts: 153
Registered: ‎10-27-2015

Re: Create ECW Transparency

Best shots are:

 

1) Your ECW is in use or locked for editing otherwise

 

2) Projection in vector and raster has some mismatch

 

However as Ian says - error messages should give you some hint where problem lies

 

 

timo

Highlighted
Technical Evangelist
Posts: 906
Registered: ‎10-01-2015

Re: Create ECW Transparency

Timo is probably right - I bet you had opened the ECW v2  in a 2D View (or ImageInfo) first before trying to run the mask update? I just made exactly that mistake myself when I tried testing this. Make sure the file isn't already open (and therefore locked) before you run Create ECW Transparency.

 

Also remember that it has to be a v2 file (not ECW v3) and that you can't already have a mask present in the file.

 

Cheers.

Ian Anderson
Chief Product Owner, Desktop Remote Sensing
Hexagon Geospatial
Highlighted
Occasional Contributor
Posts: 5
Registered: ‎03-03-2016

Re: Create ECW Transparency

Hello Ian (and Timo),

 

thank you very much - this made the trick. And no - as you probably noticed also - there were no error messages or hints.

 

In the meantime I actually started re-exporting ECWs fromTIFF input (with application of "Alpha" layer this time!). When running this in batch for 817 orthophoto tiles (see script below) the batch stops occasionally with no warning or error message. I had to restart the batch 5-6 times to get trough all files. When it stops the CPU usage freezes and remains at 100% load.

 

Could this be a bug, or is there any limitation for number of files in such a script (probably not as the batch stops after processing different number of file each time), or could there be smarter ways of running this which might not provoke the program stopping?

 

/*
** IMAGINE Version 15.0 Batch Commands File
*/

exportecw -inputfilename G:/TIF/File01.tif -outputfilename D:/ee/ECW/File01.ecw -bands 1 2 3 -blocksize 256 -photointerp RGB -compratio 6 -ecwversion 2 -resample 'Bilinear Interpolation' -noDataColor Black -reportfile -nthreads 8 -encodeCaile02.tif -outputfilename D:/ee/ECW/File02.ecw -bands 1 2 3 -blocksize 256 -photointerp RGB -compratio 6 -ecwversion 2 -resample 'Bilinear Interpolation' -noDataColor Black -reportfile -nthreads 8 -encodeCache 80 -vecfile d:/ee/tzopp/metadata/test.shp

....etc...

 

Kind regards,

Bjørn

 

Highlighted
Frequent Contributor
Posts: 153
Registered: ‎10-27-2015

Re: Create ECW Transparency

[ Edited ]

Typically this failure comes that some file is different that another. Like one file is missing projection etc. and others have it. It is also possible that it juts fails but then it is harder to find the logics.

 

For Error messages Imagine does not always show one but most likely writes something on the log. Big part of Imagine is by nature a command line software having graphical user interface. So plenty of information appears in session log even though no error messages are displayed. Look from log does it write someting there when things fail. That is a number 1 step in all imagine failures.

 

File - Session - View session log.....that should give you more info.

 

timo

Highlighted
Technical Evangelist
Posts: 906
Registered: ‎10-01-2015

Re: Create ECW Transparency

When I ran the ECW Transparency utility (with the target image open in a 2D View), this is the message in the Session Log:

 

"09/08/16 08:29:34 H:/Hexagon/ERDAS IMAGINE 2016/bin/Win32Release/ecwopacity.exe -inputfile h:/temp/1_2_rect.ecw -vectorfile c:/temp/mask.aoi
09/08/16 08:29:34 eWkspace(6664): Unloading [ecwopacity.eml]...
09/08/16 08:29:44 ecwopacity: Error open the output file: iostream stream error
09/08/16 08:29:44 ecwopacity(10328): The mask file append failed. "

 

 

...which does indicate a file locking issue - the software was unable to open the output file for the write operation.

 

On the Batch issue I'm not sure what the problem might be. Are you running multiple jobs in parrallel and are you sure you have sufficient Engine licenses to support the parralel prociessing?

Ian Anderson
Chief Product Owner, Desktop Remote Sensing
Hexagon Geospatial