I am writing a script that converts features to a binary raster based on presence/absence in a cell.
In practice, when converting polylines to raster using "Polyline to Raster (conversion)", any cell through which a line passes is counted as data in the output raster. However, (and here is my problem), when converting polygons to raster using "Polygon to Raster (conversion)", only cells whose center is overlapped by the polygon are counted as data in the output.
My problem is that I want the polyline to raster functionality when executing polygon to raster, i.e. I want any cell for which the polygon overlaps at all to be turned into data in the output. Is there a way to do this?
To illustrate the problem: [ATTACH=CONFIG]19440[/ATTACH]
Notice that the sliver that sticks down in the original polygon is missing in the polygon to raster, but is present in the polyline to raster (bottom row). What I would like is to have the output in the bottom-right, but for the values inside the raster border to have the same value as the border.
Edit: I know that you can change the polygon to raster behavior to use "maximum area", but this still registers NoData if the cell area covered is <50%. My example illustrates how polygon to raster still fails.
Viz., If priority is specified, and: The feature in question overlaps the cell by less than 50%, and: - The priority is greater than zero, then it is considered. - The priority is equal to zero, then the feature is not considered.
Add a field to your polygon feature class and populate it with 1's and use this as the priority field.
BTW, from ArcGIS 10 onwards, FeatureToRaster internally calls Point, Polyline or Polygon to Raster.
Viz., If priority is specified, and: The feature in question overlaps the cell by less than 50%, and: - The priority is greater than zero, then it is considered. - The priority is equal to zero, then the feature is not considered.
Add a field to your polygon feature class and populate it with 1's and use this as the priority field.
BTW, from ArcGIS 10 onwards, FeatureToRaster internally calls Point, Polyline or Polygon to Raster.
Ah, I did not pay close enough attention when reading that the first several times. I'll give the priority field a try and see how it fairs. Thanks for the help.