Trying to Automate Calculation of Road Reserve Widths using Polyline and Polygon

3080
13
Jump to solution
08-11-2019 05:01 PM
BenVan_Kesteren1
Occasional Contributor III

I have been asked to define the road widths of all our road reserves, and I am wondering if this is a simple process using the correct tools...

I have a road centreline POLYLINE layer, this is a single polyline that runs the entire length of any road.

I also have a road segment POLYGON layer, this is broken into road segments for asset management purposes.

Just to give you an indication, this is how they look, centrelines are dashed blue, and outlines red solid:

I know there will be some strange outputs no matter how I carry this out (court bowls etc), but as a starting point if I could use my road centreline, find perpendicular at the midpoint of the road centreline, and then extend outward until I intersect with a road outline, and return that distance, this would get me a result in the majority of cases.

Any rough ideas on how this could be achieved?

Cheers

0 Kudos
1 Solution

Accepted Solutions
RichardFairhurst
MVP Honored Contributor

1. Do both the centerlines and the road casing have street names that can be matched after running the Intersect tool?  If so that would allow you to select only the portions of centerline that match the road casing street name.

2. Use the Dissolve tool on the centerlines on the road casing name and FID to make sure the centerlines are a single segment within each road casing.

3.  Make each intersected and dissolved centerline into a linear referenced route with the Create Routes tool making the route name based on the road casing FID with measures that start at 0 based on length that use units of measure that work for you (feet, miles, meters, kilometers, etc) using lower left priority.

4. Add a double field for the half-way measure and calculate it using the Python expression:  !Shape!.lastPoint.M / 2

5. Export the route table view to create an event table (not a feature class).

6. Add double fields for X_Coord, Y_Coord and Offset_Dist to the table.

7. Calculate the Offset_Dist field to be a distance that will definitely fall outside ot the road casings in the units you prefer, i.e., 500 feet.

8. Use the Create Route Event Layer tool with the exported table to create a point layer, using both the angle and the compliment angle options.

9. Use the Geometry Calculator to calculate the X and Y coordinate values into the X_Coord and Y_Coord fields.

10. Export the table view to create a new table that has the Route ID (road casing FID), X, Y, offset, angle and complimentary angle values.

11.  Use the Bearing Distance to Line tool twice to create two line feature classes extending from the midpoint coordinate of the centerline perpendicular to the centerline for each side of the centerline by alternating the two different angle fields.  If the roads curve a lot and could create multiple intersecting segments with the casing, you may also want to Select By Location using the Route Event Layer points to be sure the segment touched that point of the centerline.

12. Intersect the perpendicular line features created in step 11 with the road casings and select the portions of lines that have the same road casing FID as the Route ID.

13.  The length of the selected lines are the distances to the edge of the road casing from the midpint of the centerline to either the right or left side of the centerline, depending on the angle field you used for that feature class.

View solution in original post

13 Replies
RichardFairhurst
MVP Honored Contributor

1. Do both the centerlines and the road casing have street names that can be matched after running the Intersect tool?  If so that would allow you to select only the portions of centerline that match the road casing street name.

2. Use the Dissolve tool on the centerlines on the road casing name and FID to make sure the centerlines are a single segment within each road casing.

3.  Make each intersected and dissolved centerline into a linear referenced route with the Create Routes tool making the route name based on the road casing FID with measures that start at 0 based on length that use units of measure that work for you (feet, miles, meters, kilometers, etc) using lower left priority.

4. Add a double field for the half-way measure and calculate it using the Python expression:  !Shape!.lastPoint.M / 2

5. Export the route table view to create an event table (not a feature class).

6. Add double fields for X_Coord, Y_Coord and Offset_Dist to the table.

7. Calculate the Offset_Dist field to be a distance that will definitely fall outside ot the road casings in the units you prefer, i.e., 500 feet.

8. Use the Create Route Event Layer tool with the exported table to create a point layer, using both the angle and the compliment angle options.

9. Use the Geometry Calculator to calculate the X and Y coordinate values into the X_Coord and Y_Coord fields.

10. Export the table view to create a new table that has the Route ID (road casing FID), X, Y, offset, angle and complimentary angle values.

11.  Use the Bearing Distance to Line tool twice to create two line feature classes extending from the midpoint coordinate of the centerline perpendicular to the centerline for each side of the centerline by alternating the two different angle fields.  If the roads curve a lot and could create multiple intersecting segments with the casing, you may also want to Select By Location using the Route Event Layer points to be sure the segment touched that point of the centerline.

12. Intersect the perpendicular line features created in step 11 with the road casings and select the portions of lines that have the same road casing FID as the Route ID.

13.  The length of the selected lines are the distances to the edge of the road casing from the midpint of the centerline to either the right or left side of the centerline, depending on the angle field you used for that feature class.

BenVan_Kesteren1
Occasional Contributor III

Hey Richard Fairhurst‌, 

Thanks for the fantastic guide! I am working my way through it now. 

I have just now hit a hurdle, I have created the route at step 3 no worries:

I then try to add the field to the resultant table as instructed in step 4, but when I try to modify the table I get this error:

I am guessing the resultant table is not a 'normal' table? (note: I have not played much with routes before).

Do I need to do something special?

Cheers

0 Kudos
DanPatterson_Retired
MVP Emeritus

It could be because of this step

Not all types of tables have an ObjectID field. When such tables are used by this tool the resulting layer will not be selectable and cannot be used effectively by certain geoprocessing operations. Consider using the Make Query Table tool prior to this tool to add a virtual ObjectID field.
0 Kudos
RichardFairhurst
MVP Honored Contributor

Ben:

A Linear Referenced Route feature class is a standard feature class that is just M coordinate enabled (which is no different from a feature class with Z coordinates enabled) and when it is created in a file geodatabase it has an ObjectID, so there actually is nothing special about routes vs any other feature class.  I have not tried ArcGIS Pro for modifying tables, but in ArcMap you cannot use the Catalog view to edit a schema if the feature class is a layer in a map document, so maybe ArcGIS Pro is the same.  Anyway, in both ArcMap and ArcGIS Pro you should be able to use the Add Field tool even if the feature class is open in a map document.

Assuming you can get through all of the steps, please post back with pictures of the final results, especially if it didn't work out as expected or if you find that there are a lot of situations where this approach needs adjustment.  Although I have applied similar techniques to my own problems, I have never actually used this exact process myself with data like yours, so I am curious to see how well it worked.

0 Kudos
BenVan_Kesteren1
Occasional Contributor III

Just an update I am back on this project again, and I was able to get step 4 to work in ArcMap, but pro kept failing as per my previous post. I will keep you posted.

Cheers

0 Kudos
BenVan_Kesteren1
Occasional Contributor III

Hi Richard Fairhurst‌, thanks again for your help with this.

I am now in territory I have not been before, and with step 8 you say 'create route event', I am unsure how to populate the tool:

8. Use the Create Route Event Layer tool with the exported table to create a point layer, using both the angle and the compliment angle options.

I am now unsure as to what data goes into which parameter in the below options, can you please assist?

0 Kudos
RichardFairhurst
MVP Honored Contributor

Here is how I would set it up in ArcMap (I won't use Pro).  The Route Identifier Field for both the Input Route Features and the Event Table Properties is the "FID_segment_original" field.  The "halfway" field is the Measure field.  The "offset_dist" field is the Offset Field.  It appears that the compliment angle option changes the Angle field output rather than creating a second field with the compliment angle, so you may have to create a new field for the compliment angle and calculate it.  I would need to see examples of the output you get to give you the field calculator formula but basically it would involve adding or subtracting 180 degrees and correcting values that are lower than 0 degrees or higher than 360 degrees.

0 Kudos
BenVan_Kesteren1
Occasional Contributor III

Hey Richard Fairhurst

Just want to clarify step 10:

10. Export the table view to create a new table that has the Route ID (road casing FID), X, Y, offset, angle and complimentary angle values.

So am I right clicking, export to geodatabase table the points feature class created at step 10? This feature class contains all the fields you mentioned. I am just confirming this output should be a table, not a feature class?

Thanks

0 Kudos
BenVan_Kesteren1
Occasional Contributor III

Just to elaborate on my above post, I think I am doing something incorrect between step 8 through 10, as my bearings do not seem to look correct, this is how things are looking at step 11. I am thinking I am not understanding how the 

Note in the screenshot you can see the actual data being contained in the tables along the way. Anything stick out as being incorrect?

These are the settings used:

8. 

9. I right clicked the column headers in the attribute table, and calculated geometries for x and y fields:

10. Right clicked on the Step8 Point table, and exported table (not feature class), this resulted in no geometry being created in step 11, so I re-run this step but created a feature class instead of table, and that is how I was able to create the linework in my original screenshot, albeit not pointing in the direction expected, I got close!

11. Bearing Distance to Line tool, you mention this is to be run twice, using each of the bearing fields, but I only have a single field, can you please elaborate how to get the second?

I feel like I am getting very close, then I hit another hurdle!

I greatly appreciate you time, 

Cheers

0 Kudos