# Calculating length of polyline next to polygons using ArcGIS for Desktop?

I searched a long time for the solution of my problem occurring during my diploma thesis. Maybe I am missing the right keywords for the correct search, but I need your help. I am using ArcMap 10.3.

I have a road network as lines and land use information as polygon layer. Sometimes the polygon overlays the line and sometimes its close it.

I need the length of the section of each line, where a polygon is overalying or next to the line (including a buffer distance of approx. 30m).

My aproaches where Buffering the lines -> then Clipping the Buffer Polygon and Landuse polygon. But additionally I need the length of the polyline within the polygon and next to the polygon.

The problem compared to the solved "normal" How do I calculate line segment lengths within a polygon? is that not all polygons overlay the polylines. The upside is that there is a specific ID with correctly works for a Join of tables.

Here I tried to specify my question. The red lines represent the length of the road going by specific land use.

• What is going to happen to segment 20 away from one landuse type and 25 M from another type? Apr 1, 2016 at 6:20
• Can you include a diagram of what you want (input and output)? This is very unclear. Apr 1, 2016 at 7:01
• Your question seemed to be all but focused on ArcGIS for Desktop so I removed QGIS from it to prevent it being placed On Hold as too broad.
– PolyGeo
Apr 1, 2016 at 7:14
• Thank your for editing. I just put QGIS into the tags, becuz i work simultaneously with both programs, but that doesnt matter i guess. Apr 1, 2016 at 13:41

Approximate solution:

Erase segments by polygons

Place points at equal interval and join them spatially to polygons. Calculate frequency per segment and landuse. Split total length pro rata.

Smaller interval gives more accurate estimate and takes longer to run

For the road segments that run inside the polygons, you can simply use the INTERSECT tool.

The others are harder. Is it acceptable to only test exactly at 30m, or do you need to look at <=30m? If just 30m, this should work, if you have ArcGIS advanced. First use ERASE to wipe out the road segments that go inside the polygons, so that you don't count them twice. Then buffer what's left by 30m. Then take the buffer output and use Polygon To Line (this is the step that needs the advanced license) so that the edge of the buffer is now a line feature class. Then go back to Intersect that with the land use.

Combine the two outputs of the intersect operations with append. Run whatever stats you need.

• Jersey Andy, thank you for your answer. Your post made me think again. It was not the solution for my problem but a very good shot at it. I accept it as answer, but i went with a different solution. Apr 5, 2016 at 7:53

As stated in the comment before, I considered the solution of Jersey Andy for the final approach. My question was to find the length/ portion of the segment going by certain landuse in a corridor of 30m around the street. I calculated the percentage of landuse polygon in the buffer polygon. This portion was multiplied with the segments length to get the equivalent.

• green = landuse
• red = buffer around streets (DIFFERENCE street width)
• CLIP both (areas with grid pattern)
• calculated \$area of buffer and \$area of clipped layers
• JOIN both
• calculate percentage of landuse\$area of buffer streets\$area ...