Select to view content in your preferred language

NoData pixels in raster

1848
4
03-24-2023 09:51 AM
gherrman
Emerging Contributor

After exporting raster to 8 bit TIFF in ArcGIS Pro, NoData pixel cells show up as black in ArcGIS Earth. How does Earth handle NoData in different raster formats?

0 Kudos
4 Replies
jsphillips
Esri Contributor

@gherrman does your issue present itself with any 8 bit TIFF file? If not, could you please share an example file for us to evaluate the issue? Thanks in advance

John Phillips | Product Manager ArcGIS Earth
Esri | jphillips@esri.com | T 757 575 0786
0 Kudos
gherrman
Emerging Contributor

Sent. Since my first post, I've done some more experimenting and need to revise the problem. It's not a problem with NoData pixels; it's a broader problem with transparency. The issues seem to be: 1) the way ArcGIS writes NoData pixels as 0,0,0 (or some other user specified value) and 2) Earth not seeming to honor alpha band pixel values. ArcGIS Pro/Desktop deals with issue 1 by applying a mask to display background values as transparent. Now that I know more what the issue is, I guess that's a feature request I need to make.

Some background:

I'm primarily concerned with clipping and reducing file size for disconnected applications. I started with a 8GB MrSID, which had great compression, but I wanted to clip it. Clip and export to PNG worked from a transparency standpoint, but created a huge file size (13GB) due to low compression ratio.

Exporting to TIFF in a way that's compatible with Earth is tricky. First, you have to clip twice: once using Clip Raster (sets pixels outside or inside of clipping boundary to user-specified NoData value - 0,0,0 by default). Then, when exporting to TIFF, you have to use the built in clip function. Also, you have to check "Use Renderer" and "Force RGB" which limits compression options. With "Use Renderer" and "Force RGB" checked, the transparency is maintained, but results in ragged edge which doesn't display well in Earth. I set the NoData value to 255, and an inquiry in Earth showed that the pixels near the border were close to 255 (in the range of 250-255) presumably as a result of resample. If you only clip once (i.e. using the clip function in Export Raster), the pixels outside of the clipping boundary are set to the user-specified NoData value and an alpha band is added, but Earth doesn't have a mask for background values (typically 0,0,0 or 255,255,255) and seems to ignore the alpha band. Would really like Earth to use a background value mask like in ArcGIS Pro/Desktop.

White pixels near clipping edge. Used Clip Raster and then Export Raster. White pixels probably come from resampling.White pixels near clipping edge. Used Clip Raster and then Export Raster. White pixels probably come from resampling.Desired Earth feature.Desired Earth feature.

0 Kudos
jsphillips
Esri Contributor

I received the data. Thank you! I will pass along to the development team.

John Phillips | Product Manager ArcGIS Earth
Esri | jphillips@esri.com | T 757 575 0786
0 Kudos
Pål_Herman_Sund
Frequent Contributor

Hi @gherrman @jsphillips - found this discussion (thanks) and I am struggling with this issue also. Could of course be my limitations (they are many 🙂 ) Was this solved in ArcGIS Earth - so if I do things correct in ArcGIS Pro, Earth will display the TIFF's correct? 

I am running Pro 3.4.2 and Earth 2.3.0.4289. There is a client involved, they want to explore Earth for offline usage - they are full-stacked with ArcGIS

best
pH  

0 Kudos