I have a polyline that I am converting to a raster in arcpy. This is occuring within a loop and at each iteration I change the processing environment to a different area of interest. In this case it is a specific polygon (like below)
whereClause = '"FID" = ' + str(poly.FID) # Create a clause to select only the current record
arcpy.MakeFeatureLayer_management(shapefile, "currentPolygon", whereClause)
arcpy.env.extent = "currentPolygon"
At each iteration I would like to create a raster where cells containing the polyline are given a value of 1 and cells without polyline are given a 0 within the bounds of the env.extent.
What is the key to creating the 0 values?
Does it come from the arcpy.env.nodata parameter?
I can make the conversion in my loop but cannot quite get the binary format I am envisioning.
arcpy.FeatureToRaster_conversion("roadsLayer", "VALUE", "roadsGrid.tif",)