I'm using Polygon to Raster tool to create a raster (10x10). The problem is that some cells of the output raster is not assigned any value.
My understanding is that the tool always uses the cell center to decide the value of a raster pixel.
Attached is the result when I overlay both the output raster and Input polygon on ArcMap. (Black is the NoData cell).
Anyway to include all those cells that fall within the polygon when generating the raster?
I tried to use Feature Vertices to Points to generate the point and convert the points to raster, but the vertex of the polygon that I used only have 1 vertex.
Another item to note is when using smaller cell size (1x1), the raster cell generated are good but when I resample it to 10x10, the output raster from resampling is the same as above raster.
Solved! Go to Solution.
It uses the center. The only way to overcome that is to use the Expand tool in the spatial analyst, but this will expand the whole raster by 1 cell which is not what you want. You cannot overcome the imposed conditions for using the tool. Your alternative is to create an array of your desired configuration and use numpyarraytoraster to generate the raster of your configuration.
Not sure what your problem is here.
It does look like the output raster is doing exactly as you described. Using the cell centre.
All the cells outside your rather artificial example will be no data.
What are you trying to achieve and why?
Currently based on the Polygon_To_Raster1 image, the area with the RED rectangle, when it converts to Raster, the cell is assigned as NoData, even though the polygon geometry actually cover that cell.
I would like to convert Polygon to Raster where as long as the polygon geometry overlap the cell (Not only cell center), the cell will be assigned with field value. I will have another script that will implement mathematical formula to each of the cell that is not NoData.
It uses the center. The only way to overcome that is to use the Expand tool in the spatial analyst, but this will expand the whole raster by 1 cell which is not what you want. You cannot overcome the imposed conditions for using the tool. Your alternative is to create an array of your desired configuration and use numpyarraytoraster to generate the raster of your configuration.