Hey Kevin, I tried to go to the link you posted but it says that video is not available anymore 😩 When I tried searching for Michael Marz and QGIS I found some blog posts mentioning his name but it's like he disappeared from the face of the Earth! Do you remember what the gist of the process was?
Michael Marz posted a straight-forward method for solving this issue at https://www.youtube.com/watch?v=t6gGrv3vRoM. Yes, it's done in QGIS, but the same tools are available in ArcGIS (I used Erase where he used the QGIS Difference tool). I tried both the method suggested in this thread as well as Michael's, and found his to be easier and cleaner by far. I didn't need to do any manual cleanup or selection/deselection with Michael's method, which makes it very easy to build an automated process in Model Builder. I had about 5000 road segments in my data.
Hi Richard, is the tool/script to run based on centerline available? I'd like to be added to the list of interested people to use this workflow too. Looking forward to hearing from you soon. Thanks.
I'm lost! What tool did you use to create the Buffer with flat ends? The regular Buffer(Analysis) tool?
Here's a link on how to send a message in here. Messages
Thanks to Lisa Turner who posted this on another related thread.
That is good to know that you are almost done. Is there a way to get in touch with you via email? because I am very much interested in the tool. Please let me know.
Thanks
Glad you figured out the issue for the coordinates.
I did base my process on a Centerline layer I had. The centerlines determine the angles to use for the intersection cuts.
I have not yet placed my tool in a location where it can be accessed by others. The interest in it seems to be growing, so I will try to find some time to develop an interface this week so it can be released for testing. The tool used my centerline layer to create the left and right buffer polygons I showed in the picture in post 4 of this thread.
The intention is to create idealized and over-bounded buffers that contained the centerline data and intersect those buffers with the actual road casements based on parcels or aerials. Alternatively,, with an advanced license the intersections X and Y cuts can be extracted using the Polygon to Line tool and retain only the lines that do not have -1 for the left side (the sides of roads would all have -1 for the left FID).
Below is an image of my parcel road casements on top of a 50 foot buffer surrounding my centerlines. Where you see solid red fill and black outlines the buffer over-bounds the casement. Intersecting the road casement polygons with the buffers would cut them at the X and Y cuts that are ghosted inside the intersections. Only cul-de-sac bulbs create a special case that my tool does not deal with. The test shown below took 2 minutes and 18 seconds to create the left and right buffers for over 5,000 centerlines (over 10,000 buffers).
One of the potential enhancements I may consider in the future is to vary the buffer width based on a field value for each centerline so that I could do different buffers according to the road classifications.
I figured it out..I was using decimal degrees when I should have been using meters.
I am going to back trace a bit here...So my goal is to cut road polygons that I have (See Image).
I want to cut these polygons very similar to yours (See Image)
So at every intersection cut them into triangles. So my question is did you have a centerline that you started from? Which you then buffered?
In my case I have the polygons and I created the centerlines using Vectorization. Will these steps work for me?
How may I access your tool that you are working on?
The Frequency field get created by the geoprocessing tools at some stage in the process (probably during a Dissolve for the buffer). The X_COORD and Y_COORD fields are double fields that you can calculate for the points using the geometry calculator or the field Python calculations !Shape.Centroid.X! and !Shape.Centroid.Y!. The X_Y_LINK concatenation can be as simple as doing the python calculation: Round(X_COORD, 😎 + ";" + Round(Y_COORD, 8). You should round to some level of precision acceptable to you, since you don't want extremely minor variations in the coordinate values to be interpreted as different points. I do a more sophisticated calculation to make sure all X and Y coordinates are always 12 characters long with a fixed decimal position that maintains 4 digits after the decimal, but for this exercise that is not necessary.
If your polygons are buffers of the Centerlines, rather than centerlines created to match preexisting polygons, then I am actually in the process of creating an Add-In tool that creates buffers like this much more easily and faster. It also populates the buffer polygons with the ObjectID of the source lines and optionally their attributes and splits the buffers on the left and right sides of the centerline (which is easy to merge into a single polygon per centerline using the centerline ObjectID field). It also creates sharp corners at knuckles, not rounded corners. See the attached picture. Unfortunately, it is not yet ready for general release, since the user interface has not been created. Let me know if you are interested in that tool.
Hi Richard,
Can you explain to me how you would create X_Y_LINK, FREQUENCY, X_COORD and Y_COORD fields?
So I have road polygons that I need to split at the intersection very similar to what you have done in the image. I have created center-lines based on the polygons and now I am just trying to cut the polygons. You help will be greatly appreciated.
Here is the majority of the solution using a geoprocessing approach without scripting. It requires an Advanced license to use all of the tools listed here. A script may be able to bypass the need for so many tools, but the basic steps to get from a set of lines to a divided buffer should more or less follow this process.
I do know that the first step is to get a buffer shape that will form the overall outline to be segmented. That shape will dissolve all lines together without any attributes dividing the segments. I would use Flat ends. See the resulting exterior boundary of the buffer shown in the picture at the bottom (interior lines are created in the rest of this process):
It is that buffer which must be divided at the joints and the resulting divided set of polygons must be attributed by the original divided lines.
Next I need the intersection point at every line junction where the attributes change and there are separate lines. Preferably unnecessary pseudo nodes have been eliminated. I would use the Intersect tool with the POINT option on the segmented lines to extract those points. This does not create a box at 4 way intersections, it creates an X, which is the only way to have polygons that only cover one line. A box would have to be created a different way and a manual choice would have to be made to assign only one line's attribute set.
Next I added two double fields for the X and Y coordinates of the intersection points and a text field with a concatenation of the points. Then I do a Summary Statistics with the XY concatenation as the unique case value and the MIN_X and MIN Y coordinate summary to get an XY Event table of the points. Make that table into an XY Event layer.
Create a fairly small buffer around these XY Event Layer intersection points. I used 20 feet and kept the X_Y_LINK, FREQUENCY, X_COORD and Y_COORD fields.
Then I used the Features to Lines tool to convert the outer circular buffer boundaries around the intersections to lines as a SHAPEFILE You cannot output to a file geodatabase because it will use true curve arcs which won't work for the steps that follow.. Dissolve these arcs keeping the X_Y_LINK, FREQUENCY, X_COORD and Y_COORD fields to rejoin overlapping buffer outlines that are split up by the Features to Lines tool back to their circular shape.
Next extract the end point of the circular lines to find the position where the circle will split that does not touch the original lines using the Feature Vertices to Point tool with the START option.
Now I can intersect these circular lines with the original lines and use the POINTS option to get all positions on the circle cut by the original lines.
I can then use the Split Line at Points tool on the circular lines with these latest points where the circle is cut by the intersecting original lines. I used a search tolerance of about .01
Now select all of the points that were at the start of the circle. Do a Search by Location to Remove from the Current Selection all points that are within about 1 foot of the points that cut up the circle. This may miss some very small arcs where a line and the circle start are close together, which may need to be cleaned up manually after the next step.
The remaining circle ends should select the cut up lines on the circle outline to find the pair that should merge together that are not intersected by an original line. Dissolve these lines keeping the X_Y_LINK, FREQUENCY, X_COORD and Y_COORD fields and use the Unsplit lines option to create a new feature class. You may delete these arcs from the cut up circle outlines. Now clean up any small arcs where the start of the circle was close, but not on an original line manually.
For the remaining arcs that were not touched by a circle starting point use the Feature Vertices to Points tool with the MID option on the remaining circle portions. Do the same with the Dissolved circle portions and append the two point feature classes together. This will only work correctly if the circular arcs are in a shapefile and not a file geodatabase.
Add an X_TO and a Y_TO double field to these latest bearing points and calculate the coordinates of these new points into them.
Use the XY To Line tool to make the X_COORD and Y_COORD the start of the line and the X_TO and Y_TO the end of the line.
Convert the original buffers of the dissolved lines to lines using the Features to Line Tool.
Copy these buffer outline into the Bearing lines feature class. Save the edit.
Now use the Extend tool and extend double or triple the distance of the original buffer and use the Extend to Extensions rule. Examine the result for anomalies involving arcs that are greater than 180 degrees or intersection points within the buffer of each other.
Use the Features to Polygons to convert the extended lines to polygons. Use the bearing lines to select polygons that actually enclose lines, the reverse the selection and delete the polygons from the buffer holes.
Use the Spatial Join tool to transfer the attributes of the original lines to the points that divided the intersection circles. .Use these points to Spatial Join attributes to the polygons. The end result looks like the picture below:
If certain roads were supposed to take away the triangular areas and you wanted a box intersection, a separate process would have to be developed by only buffering those roads with their attributes and cutting the intersection again and reassigning the triangular pieces to that line segment. The circle would only divide on those lines to form the bearing cut angles that would divide the box. However, without a way to classify the road that takes priority at the intersection, I cannot think of a way to get the box effect easily Wither way attributes would not divide the buffer on a through road at the intersections., but the lines segment end points would divide the circle and create the cuts at the center of the intersection genearly in line with the cross street.
Jim,
I'm just curious if you've found an automated solution to this, as I've recently posted the same question.
If you haven't, it's possible to do it manually through a series of steps using 'copy parallel' rather than buffer and creating polygons from lines.
As for an automated process, I haven't discovered one yet.
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.