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

Alteryx designer Discussions

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

Distance Tool -- Insane Difference Between "DistanceMiles" & "DriveDistanceMiles"

Asteroid

I'm working on a project to calculate various point distances from the Florence disaster area.  I'm noticing some very strange issues in my output.

 

When I run the distance tool comparing the centroid of 28206 (Charlotte NC) against a polygon of the disaster area, I get a result showing:

 

DistanceMiles - 33.7

Drivetime 243

DriveDistance 241.56

 

I'm also using TomTom Peak  

 

I understand the drive distance might be a little longer, but this seems absurd.

 

image.png

Alteryx Certified Partner
Alteryx Certified Partner
What does Google maps say for the drive time distance? Might be worth
looking at and sense checking.
Alteryx
Alteryx

Hi @BPurcell

 

Edit: Got the workflow to open and am investigating.

 

Alteryx
Alteryx

@BPurcell

 

So the drive time and drive distance are fine. The issue is the straight line distance being calculated due to the tool configuration. With the way you have the distance tool set up - you're measuring two different things.

 

  1. Start Point in Charlotte to the centroid of the disaster area via drive time/drive distance.
  2. Start point in Charlotte to the nearest edge of the disaster area via straight line.

 

Notice that only the drive time/drive distance option mentions centroid based calculations.

Distance_Tool.JPG

 

It may seem a bit unintuitive, but the way the Distance Tool works when measuring straight line distance from a Point-to-Polygon (and Point-to-Line) is to use the nearest edge.

 

https://help.alteryx.com/2018.3/Distance.htm

 

If you want to calculate the straight line distance and the drive time/drive distance to the centroid of the polygon - you'll need to use a spatial info tool to generate the centroid point first and then set that as your destination point.

Asteroid

Thanks Travis -- Ha, I need to read a little more carefully.

 

But, I'm looking for drivetime distance to the nearest edge of the polygon, not the centroid...is that an option?

Alteryx
Alteryx

@BPurcell Unfortunately that's not an option with the way the distance tool can currently be configured. If you'd like to see the tool revisited and these features added - you should post your idea to the Product Ideas forum. https://community.alteryx.com/t5/Alteryx-Designer-Ideas/idb-p/product-ideas

 

Off the top of my head there are a few work arounds to try to accomplish this. You could build an iterative macro that generates successively larger drivetime trade areas from your starting point until it meets the condition of intersecting the disaster area polygon. You'd have to use the option in the trade area tool to take the drivetime value from a field - then use a formula along the lines of [Starting Drivetime]+(([Engine.IterationNumber]+1)*10) to increase your successive drivetimes by 10 minutes.

Alteryx Certified Partner
Alteryx Certified Partner

As an alternative would it be possible to use the polysplit on the disaster polygon and then create the distance between all the points and keep the shortest?

 

Ben

Asteroid

Thanks Travis...that's a clever solution, but I'm afraid the processing would take forever.

 

I'll submit a product idea.

Magnetar
Magnetar

Not having the DriveTime datasets, I can't test these options, however, I want to ask a clarifying question:

Are you looking for the minimum drive distance, or the drive distance to the closest point via DistanceMiles?

If you are looking for the drive distance to the same point identified by DistanceMiles, you may be able to accomplish this with two sequential "Distance" Tools.  The first would only output the Distance, and you would enable the "Create Nearest Interior Point inside of the polygon" option.  Then, in the second Distance tool, you can match to the new "InteriorPt" field and enable the DriveTime option.


If you are looking for the minimum Drive distance, you could use @BenMoss' suggestion of the Poly-Split tool to create the outlining points, and then a Find Nearest tool to find the closest point, configured for Drivetime.

Labels