Alteryx Designer Discussions

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

Construct Entire Route / Spatial Tool

8 - Asteroid

Hi Everyone,


I have been trying to construct an entire route and find out the distance of the route rounded to the nearest mile.


what details I have.. 1 file with details like Point# , Longitude and Latitude.


Is there any we can do that using tool available in Spatial?






11 - Bolide

Unless you have the add on package to get street info, or you interface with google API or something, the spatial tools will only be able to tell you the distance "as the crow flies" between each point, not actual street distances which will be longer since they will never go the shortest path between each point.


Assuming your points are already arranged in the order you want to go in, then the easiest thing to do would be to put a Poly-build tool in, configure it to make a Sequence polyline. Add a recordID if you need to, to use as the sequence field (again you will already need to have the points in the order you want to go in). If you also need to figure out the shortest path between all of them, so you don't already know the order you want to go in... that's a much tougher problem.


Now that you have a polyline object, you can just put a Spatial Info tool after it and it should tell you the length of your line.

8 - Asteroid

thanks for the quick reply.


I didn't mention earlier data are in sequence order from starting point to endpoint.



Hi @Mukeshy12390 - Have a look at the following Weekly Challenge and its solutions: 

18 - Pollux
18 - Pollux

Hi @Mukeshy12390 


You can start by using the Create Point tool to build a Spatial [StartPoint] out of your lat-lon fields.  Order the points by [Point#] and use a multirow tool to copy the [StartPoint] from Row+1 as the [EndPoint] of Row.  Add a Formula tool to create [Line] from [StartPoint] to [EndPoint]  


Use a Poly-Build tool to create a Sequence Polyline using [Line] as the Source Field and [Point#] as the Sequence field.  A Spatial Info tool can then return the length of your new Polyline in either Miles or Kilometers.