Select to view content in your preferred language

Need to convert zero values in a raster to "NoData"

4562
4
01-08-2015 03:43 PM
DuminduJayasekera
Regular Contributor

I need to convert zero values in my raster to "NoData" values. How can I perform using raster calculator?

Any help is appreciated.

0 Kudos
4 Replies
MikeCusi
Frequent Contributor

Try the Spatial Analyst "Set Null" tool.

0 Kudos
ChrisDonohue__GISP
MVP Alum

Mike has it - SetNull is the way to go.

If you don't want to run the SetNull Tool, but instead prefer to Raster Calculator, it can be done there also.  On the right side of the Raster Calculator will be a group of tools.  You can find SetNull under "Conditional".  It is visible in the picture they have at the start of this Help article:

Raster Calculator

ArcGIS Help 10.1

The syntax in raster calculator is something like this:

SetNull (in_conditional_raster, in_false_raster_or_constant, {where_clause})

Chris Donohue, GISP

0 Kudos
DuminduJayasekera
Regular Contributor

I prefer to use raster calculator and setted up something like this and it did not work. I need to converted "NoData" values and all other values in the output raster.

SetNull("%wcs_int.tiff%","%wcs_int.tiff%","Value == 0")

Thanks in advance,

0 Kudos
XanderBakker
Esri Esteemed Contributor

Try it without the double equal sign:

SetNull("%wcs_int.tiff%","%wcs_int.tiff%","Value = 0")

0 Kudos