How do I change geotiff "no data" color to transparent rather than black using arcpy?

255
4
Jump to solution
01-19-2022 08:02 AM
ElizabetJaneRoot
New Contributor II

Hi Team,

 

I'm having an issue on having black background on tiff image created by ia.Merge using arcpy.

I want the black part to be transparent just like output data when I use sa.Reclassify(raster, "Value", remap, "NODATA")

ElizabetJaneRoot_0-1642607860305.png

Best regards,

Hiroshi

 

 

0 Kudos
1 Solution

Accepted Solutions
ElizabetJaneRoot
New Contributor II

Never mind, I found solution by myself using,
https://pro.arcgis.com/en/pro-app/2.8/tool-reference/data-management/mosaic.htm

 

nodata_value parameter let you specify a value what to change into NoData and it will make the background transparent

View solution in original post

4 Replies
Katherine_Clark
MVP Regular Contributor

I had to deal with something similar the other day. What worked for me was going into the symbology pane for the raster layer and changing the value under the "mask" menu:

Katherine_Clark_0-1642609067142.png

 

0 Kudos
ElizabetJaneRoot
New Contributor II

Thanks for the advise @Katherine_Clark 
However, I would like to know how to do it by using arcpy libraries because I'm building an automation process by python script.

Do you might have any ideas?

0 Kudos
ElizabetJaneRoot
New Contributor II

Never mind, I found solution by myself using,
https://pro.arcgis.com/en/pro-app/2.8/tool-reference/data-management/mosaic.htm

 

nodata_value parameter let you specify a value what to change into NoData and it will make the background transparent

Katherine_Clark
MVP Regular Contributor

I'm so glad to hear you got it figured out! And thanks for following up and posting your solution here, in case others reference this post in the future :)

0 Kudos