Select to view content in your preferred language

Extract by mask changing values outside mask to '0' instead of 'NoData'

693
1
11-08-2023 08:09 AM
MarinaMetes
New Contributor

When running 'Extract by Mask' in python, all of my values for the input raster that fall outside of the mask are changed to 0 instead of NoData. If I run the tool manually within the geoprocessing toolbox, with all the same settings, the output is correct, where all values that fall outside the mask are changed to 'NoData'.  However, I need to run this tool in batch which is why I need it to work correctly in python. Is there some sort of environment setting in arcpy that I need to change?

mask_example.jpg

1 Reply
DuncanHornby
MVP Notable Contributor

I can't replicate your problem so it suggests there is another issue. May be data type or default settings? When I run extract by mask from a python command line it works as expected.

0 Kudos