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
Contributor
Posts: 45
Registered: ‎05-11-2017

No data 255 to 0

Hi all,

 

I have orthophoto stored as single 4 band ECW file (~150 GB).

There is large areas with no data stored as 255 pixels.

 

Is there any way to change all 255 pixels to 0?

 

Best regards,

Mladen 

Technical Evangelist
Posts: 130
Registered: ‎07-04-2016

Re: No data 255 to 0

Hello Mladen,

 

It can be done using Spatial Modeler, mainly with the Replace No Data With operator.

 

If "255" value is defined as NoData, so model will look like below:

 

2018-05-25 13_30_19-Start.png

 

Let me know if that will work for you.

 

 

Kind Regards,
Marina Vardovska
Hexagon Geospatial Support
Technical Evangelist
Posts: 839
Registered: ‎10-01-2015

Re: No data 255 to 0

[ Edited ]

Remember to make sure you don't have any (valid) 0s in your imagery first! You'll probably also want to set 0 as the output NoData value to use in the Raster Output operator.

 

You may wish to review the various discussions on the topic of NoData before proceeding:

 

http://community.hexagongeospatial.com/t5/Spatial-Recipes/Handling-NoData-in-Spatial-Modeler/ta-p/95...

 

Cheers

 

Ian Anderson
Chief Product Owner, Desktop Remote Sensing
Hexagon Geospatial
Highlighted
Technical Evangelist
Posts: 839
Registered: ‎10-01-2015

Re: No data 255 to 0

That said - if your original image is an ECW I'm surprised that it's not using a Mask (as opposed to a data value) to store the NoData locations.. That would be the usual way to store NoData in ECW.

 

If it's not using a Mask have you tried adding one? If it's a v2 ECW you can add a mask after the file has been created (using Create ECW Transparency). You can't do this if it's a v3 ECW because a mask already exists in the file (ECW v3 is always created with a mask layer). Which means you probably have a v2 if the file has value-based NoData rather than mask-based. 

 

Cheers

 

Ian Anderson
Chief Product Owner, Desktop Remote Sensing
Hexagon Geospatial