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

Alteryx designer Discussions

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

Gather all 9 clues to complete the final Weekly Challenge on Dec 16!

Learn More

Length of tracks within trade area >x Miles -> count as new location

Meteor

Dear community,

 

I'm currently trying to solve the following analysis:

I have two objects, spatial line objects representing a track and trade areas. If a trade area covers more than 2 miles of tracks, I want it to be a "valid" trade area. In other words: if a trade area covers 2 miles of the tracks, it is worth considering it as a new location. If there are two trade areas that cover tracks, I want to choose the one that better suits, e.g. covers more.

 

My idea was to build the trade area and then do a spacial match in order to determine the track within the trade area. If this length is > 2 miles, consider it as a new location. The problem is that the track needs to be within the trade area completely - this is in many cases not correct but I still want to count the track length within the area. I tried grouping the lines so that connected/touching lines are seen as one. Is there a way to condense this information as I'm only interested in the total motorway length?

 

I attached my current workflow. 

Many thanks in advance

Konrad

 

Asteroid

Hi Konrad,

 

I'm not a spatial expert and may have misunderstood the question but have you tried using the summarise tool to group the lengths by trade area and then sum the distance?

 

Summarise does have spatial elements if you want to use it that way, or just a summarise at the end may achieve the same thing?

 

 

 

 

 

Nebula
Nebula

hi @konrade 

 

From looking at your workflow, you had your Spatial Match tool configure as "Where Target Within Universe".  The entire track has to be contained within the trade area, which automatically excludes any case where the trade area only covered part of the track.  This also renders your Spatial Process tool redundant since the intersection of an object completely contained within an other is always just the first object.

 

Change the Criteria in the Spatial Match tool to be "Where Target Intersects Universe".  This will return any overlap at all.  From there the Spatial Process tool will find the part where the track intersects the trade area, which you can then use to find the maximum overlap

 

Dan

 

 

 

 

 

Meteor

Hi @danilang,

 

thank your for the fast response. You are totally right, I changed the Spatial Match to "Where Target Intersects Universe" with "Output Intersection Object" - it does now return the correct overlaps.

When I calculate the sum of the "Matched" tracks and the "Unmatched" tracks I derive at a different sum compared to the initial length.  

I’m facing the problem that the sum of track length from “Match” and “Unmatch” does not match the initial sum of track inputs. I therefore inserted the "Unique" functions, however I'm not sure if that fixes the problem. Is there a different way to make sure that I sum up the unique length of the tracks within the trade areas? 

 

Nebula
Nebula

Hi @konrade 

 

I haven't downloaded your most recent version, but for the sum that you're calculating are you adding before the Spatial process tool or after?  If you're taking the sum after, the intersections don't have the length of the track that falls outside the trade area.   This could the amount you're missing

 

Dan

Labels