I have two shapefiles: the first containing a route defined by a single polygon (black line in the image below), the second containing a series of between 1000 and 4000 small polygons located somewhere inside the larger polygon (green and pink boxes).
I would like to extend each of the small polygons in the direction perpendicular to the route, so that they become long polygons that end at the edge of the outer polygon. These new polygons don't necessarily have to span the entire width of the route polygon, for example where they appear on a bend, as shown below:
I am using ArcGIS 10.4.1 for Desktop with an Advanced license. I've also got access to a Spatial Analyst license. Is what I want possible, and if so how do I do it? I could also use any freely available software other than ArcGIS if that would make this possible.
-----Update-----
Following the suggestion from @Hornbydd and @FelixIP to use Arc's Euclidean Allocation tool (available with a Spatial Analyst license), I now have what I was aiming to produce, as shown in the image below:
Answer
For the simplest approach with zero coding I think @FelixIP has nailed it! Simply use the Euclidean Allocation tool, making sure you set your outer boundary as the mask and processing extent, then choose a sensible cell size to produce a smooth raster which you can then turn back into a polygon.
Here is the output of the Allocation tool built from the inner hashed polygons but constrained (masked) by the outer black line:
It would be a simple matter of converting the raster back to a polygon featureclass. This approach may introduce a slight zig-zag edge to the final polygons because they are derived from a raster, if you are prepared to accept that then this problem is reduced to running two tools, Euclidean Allocation then raster to polygon.
No comments:
Post a Comment