Construct Entire Route / Spatial Tool
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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?
Thanks,
Mukesh
- Labels:
- Data Investigation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
thanks for the quick reply.
I didn't mention earlier data are in sequence order from starting point to endpoint.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @Mukeshy12390 - Have a look at the following Weekly Challenge and its solutions: https://community.alteryx.com/t5/Weekly-Challenge/Challenge-266-Mother-s-Day-Bouquet/td-p/753922
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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]
ST_CreateLine([StartPoint],[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.
Dan
