Novice with ArcGis, I would like to convert my Polyline dataset to a Raster with only 0s and 1s

To this end, I used the Gis command "Polyline to Raster" and set the cell size small enough, so that the lines features might be captured.

However, the Raster Attribute table that I got contained only positively coded cells (i.e. those crossed by a line and whose values correspond to the ID of the line.) while I would have liked to get an attribute table with all the cells.

Thus, I thought about using the "Raster calculator" tool and the following command :

Con(IsNull(raster), 0, 1) 

Unfortunately, this didn't work. I got a Raster with an attribute table containing 0 and 1 admittedly, but with only two values now.

Thus, I would like to ask for your help in order to be able to get a Raster with an Attribute table containing all the cells, coded as follows: 0 when no line crosses the cell, and 1 otherwise.

  • All sounds normal/as expected to me. Can you please specify your original purpose or show an example of what's your expectation?
    – fatih_dur
    Commented Aug 24, 2018 at 15:06

1 Answer 1


If I understand your issue I think you want the Reclassify tool. Classify your raster table so all positive values are in one class and then reclassify them to 1 and all nodata values to 0. Although I think that is the same thing the raster calculator running Con(IsNull(raster), 0, 1) did for you. If instead you need the "lines" to keep their value set the old value to a range out of the lines values and they will retain their current value.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.