I have been wrestling with this for a while and couldn't find out how I can do this. I want each cell of a raster inside of a polygon boundary to have the value of the closest cell just outside of the polygon.
I think the closest answer was the one at this question, but I couldn't apply it!
My plan was:
- Use "Polygon to Raster" to change the polygon to a raster. The cells inside the polygon become 1 and the points outside of the polygon are nodata.
- Use Con(IsNull(Raster),0,NULL) and assign it to Raster2
- Add Raster1 and Raster2 to get nodata inside the polygon
- It should be easy from here with nodata inside the polygon. We just use "Euclidean Allocation" and it does the job.
I'm stuck at step 2 and get an error:
[SELECT * FROM VAT_Extent_RAS WHERE IsNull( "Value" )] Failed to execute (Con).
Do you have any thoughts? Is there an easier way to do this?
I'll try to summarize my progress here. I want to change all raster cells inside the polygon to "nodata" while the raster cells outside of the polygon remain the same. I used polygon to raster function first. This gives me a raster with 0 cell inside the polygon and "nodata" outside of the polygon. What do I do next?