community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.

Length of overlap on motorway

Meteor

Hello community,

 

I'm currently stuck with achieving the following analysis:

 

I have a shapefile of motorways and power masts throughout a country.

Now I want to set a buffer of 2 km around the masts and calculate the length where motorway and the buffer radius overlap.

 

I used the Spatial Match Tool and "Where Target Is Within Universe" and got the visual result as shown on the picture.

targetiswithinuniverse.PNGVisual output

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

This is my corresponding Workflow.
workflow.PNG

 

 

 

 

 

 

 

 

 

I need to calculate the length of the red lines (=motorway). This is where I don't get results. Any idea how I could manage that?

 

Additionally the motorway from OSM (openstreetmap) contains both way, forth and back as separate sections. Is there a way to condense this information as I'm only interested in the total motorway length?

 

Appreciate any help!


Best

Konrad

Alteryx Certified Partner

I've attached a workflow to share a few ideas. 

 

- Instead of relying on the road segment being small enough to be captured within the polygon, I suggest returning any intersection and using a Spatial process tool to cut the road segments to exactly the overlapped length.

- Otherwise you could use the spatial match to return the intersection object directly from the roadways and polygons. (easier)

- I think the trickier part is to combine the roadways without using other information appended to the spatial objects. In my example, I created grids and used those grid centroids to create a simplified line. 

Meteor

Hi @CharlieS ,

 

thank you very much for your suggestion. I tried to apply it to my data but somehow failed getting length results.

I attached the workflow package. Do you know what might be the problem?

 

Best

Konrad

Meteor

I applied a different workflow to the data, and got closer to the solution. There is some problem with the length result in the end, it is clearly too much. Maybe someone is able to see where the issue is?

 

Alteryx Certified Partner

Thanks for sharing the input data. 

 

I took another shot at this and realized an important function of the Spatial Length calculation: if the object is a polygon, the perimeter will be used. This mean the combined objects must be converted to lines. In the updated workflow attached, I converted the combined objects to lines by using the two point furthest from the centroid of each object in different cardinal directions (the two most common directions from the centroid). 

Labels