[GIS] Eliminate 0 Values From Raster

arcgis-10.2arcgis-desktoparcmappolygonraster

Arcgis 10.2

I currently have a raster file that I want to turn into a set of polygons. This will help me to create specific buffers around certain points. The extent of my values are 0, and 1. When I change from raster into polygon, I end up with polygons for both 0 AND 1. I only want polygons for pixels with value 1. If I have polygons for values of 0, I end up capturing a bunch of empty space that it totally not necessary to the project.

Here is an image of what I am working on (white = 1, black = 0):

enter image description here

Best Answer

you can use raster calculator to set your 0 values to NoData. Con(condition, value if true, value if false) will set the false value to Nodata if it is left blank.

in your case, you could use

Con(raster== 1, 1)

a more generic code would be

Con(raster!=0, raster)

when you convert to polygon, NoData pixels will be ignored.

Note that you can make something equivalent to the vector buffer using "expand" on your raster.