Wednesday, 13 April 2016

arcgis desktop - How to generate polygons upto the edge of other polygons?


I am doing some work on a pipe network (blue lines) and I am trying to attribute the information about the street to the pipes. I have 2 polygon layers one of the blocks (green hatch) and one of intersections (yellow hatch). I am trying to create a set of buffers/polygons around the street segments (dark gray lines) that fill the space not already covered by either of the 2 other layers(white space). It would be nice to get the double wide streets to have their polygons meet at the mid point between the 2 segments. I have tried creating a buffer and erase what falls underneath the other two layers and with an over sized buffer but I end up with spill over into the cross streets. I need to do this for an entire city, so I can’t just make an undersized buffer and snaping to the other layers never gets far enough and then manually adjust the vertices takes too long. Plus with both methods I end up with overlapping polygons when it buffers around a double street segment which causes problems assigning the street information to the pipe segments. What would be the best way to accomplish this? Let me know if you would like more clarification. Example of two intersections



Answer



Been thinking on this since you asked, and I can still only solve part of the problem as you have framed it. It's a good approach and I'm not sure if there is a better one, but it did occur to me that you're trying to transfer attributes from the streets (gray lines - which I assume hold those attributes) to the pipes by creating an intermediate polygon layer. I don't know how cut up your pipes (or streets) are, but it's possible a Spatial Join or something using one may be an alternative. I know that there could be potential issues with crossing lines at intersections.



There are two ways I can think of to generate your polygons. The first would be to run Union on your two existing polygon layers with the no gaps option. This should be available at any license level since you're only using two layers.


The second would be very similar to John's answer and is something I used to use to generate 100% land coverage in digitizing. Create two new polygon features - streets and temp. Start editing temp, and copy into it blocks and intersections. Merge all of those polys, which should give you a massive multi-part polygon. Now in streets, draw a massive polygon (or copy in a city boundary if you have it). Then you can use erase (only available with Advanced license), or select the temp layer and use it to clip (on the editor toolbar dropdown, any leve) with a distance of 0, which should cut all of that out of streets (make sure your block and intersection layers have been removed or are not editable - clip will cut EVERYTHING that can be cut by that shape).


Either method may leave you with multipart polygons (I'm particularly not sure what will happen where you have a point on a curve like the right side of your image) which could be exploded. There may be some other issues as well depending on how clean the geometry in the two source layers are. You might use a Topology with rules like must share an edge with the other layers, not share an edge with itself, etc. to check or clean it up.


Now for the part I can't solve without extensive editing - your double-wide streets. If you have a layer with true centerline for the ROW, it would be easier, but if not you have to have something by which to cut all those polys in half. Now one thing that is convenient is your lane centerlines cross at the intersections (or so it appears), so if you were just referencing that layer you could use an intersection snap and only that snap to either draw cutting lines or just using the cut tool. I don't know how big the city is, or how many curves there are in those kinds of roads. If you had a long straight shot, you could select all the polygons, grab the cut tool, snap to the midpoint of the outside edge on the first one, and then snap to the midpoint on the outside edge of the last one, and cut them all at once. But I can't think of any way to do this to a full feature class automatically.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...