Select to view content in your preferred language

Colormap identifies value as 0 while it is NoData

1025
3
Jump to solution
03-03-2023 02:42 PM
monikat
New Contributor

I have two rasters that have been cropped and masked. One with a colortable (test_ctb.tif), the other without (test_nctb.tif). For the NoData pixels, the one with colortable (test_ctb.tif) identifies its value as 0 while it should show NoData. When I switch to unique values,  then both rasters show correctly NoData for that pixel. The color table works fine in ArcMap 10.8.2 though! 

 

ArcPro.png

ArcMap.png

 

0 Kudos
1 Solution

Accepted Solutions
MelanieM
Esri Contributor

Hello @monikat

Esri is now aware of the issue and there has been a bug logged for this specific issue. The bug number is BUG-000156484. There is also a workaround for this problem. 

Workaround: 

  • In ArcGIS Pro, open the Geoprocessing pane and search for 'Con' (Image Analyst Tools)
  • Select the Con tool and fill out the parameters appropriately
    • Identify the raster layer in 'Input conditional raster'
    • No expression
    • Select the same raster as above for 'Input true raster or constant value'
    • Insert '0' for 'Input false raster or constant value'
    • Choose an appropriate name for 'Output raster'
    • Run tool
  • Export the colormap from the original data layer
    • Navigate to the symbology pane with the original data layer selected
    • Select more options on the top right corner of the pane
    • Select 'Export colormap'
  • Import the colormap into the new layer
    • Navigate to the symbology pane with the new layer selected
    • Select more options on the top right corner of the pane
    • Select 'Import colormap'
    • Select the correct colormap to be imported 

Thank you for letting us know! 

Melanie M
Support Analyst

View solution in original post

3 Replies
Omar_A
by Esri Contributor
Esri Contributor

Hi, 

You may need to modify the colortable of the raster with the incorrect NoData values in the "Colormap" pane > Edit "Colormap" > Check the "Use values" checkbox and enter the NoData value for the raster. This is to be the same value used by the other raster that has correct NoData values. Try these steps; it might solve the issue.

Thanks,

Omar

0 Kudos
monikat
New Contributor

Hi Omar,

Thanks for the post! I do not see any "Use values" checkbox under Symbology for Colormap? And neither edit option for the Colormap? When I click file Properties > Raster Information NoData Value is 255 which is correct. 

Screenshot 2023-03-06 093012.png

And I added that yellowish under the Mask to Nodata, so it correctly finds that NoData, but displays incorrectly its value. 

Screenshot 2023-03-06 093504.png

0 Kudos
MelanieM
Esri Contributor

Hello @monikat

Esri is now aware of the issue and there has been a bug logged for this specific issue. The bug number is BUG-000156484. There is also a workaround for this problem. 

Workaround: 

  • In ArcGIS Pro, open the Geoprocessing pane and search for 'Con' (Image Analyst Tools)
  • Select the Con tool and fill out the parameters appropriately
    • Identify the raster layer in 'Input conditional raster'
    • No expression
    • Select the same raster as above for 'Input true raster or constant value'
    • Insert '0' for 'Input false raster or constant value'
    • Choose an appropriate name for 'Output raster'
    • Run tool
  • Export the colormap from the original data layer
    • Navigate to the symbology pane with the original data layer selected
    • Select more options on the top right corner of the pane
    • Select 'Export colormap'
  • Import the colormap into the new layer
    • Navigate to the symbology pane with the new layer selected
    • Select more options on the top right corner of the pane
    • Select 'Import colormap'
    • Select the correct colormap to be imported 

Thank you for letting us know! 

Melanie M
Support Analyst