Author Topic: What are mileages based on?  (Read 1787 times)

0 Members and 4 Guests are viewing this topic.

Offline pderocco

  • Newbie
  • *
  • Posts: 41
  • Last Login:January 28, 2025, 03:15:22 am
What are mileages based on?
« on: January 20, 2025, 03:12:10 am »
I hope the lengths of segments aren't based on the lengths of the straight lines that are used to draw the segments. Are these something that are measured using some external tool like Google Maps, and then entered manually as attributes of each segment?

Offline Jim

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 2878
  • Last Login:Yesterday at 10:06:50 pm
Re: What are mileages based on?
« Reply #1 on: January 20, 2025, 05:34:52 am »
TM distances are approximate.  They are straight line distances between consecutive waypoints multiplied by 1.02112, though all of the trig is in there to compute them on a sphere not a plane.  I don't know why that particular number.  It was inherited when TM was created using the data (and that distance function) from the old CHM project.  If you look at TM route lengths vs. official sources that report lengths, they will be a little longer or shorter, depending on how straight or curvy the road is.

Offline bejacob

  • Full Member
  • ***
  • Posts: 243
  • Last Login:Yesterday at 09:27:33 pm
Re: What are mileages based on?
« Reply #2 on: January 21, 2025, 09:39:30 am »
On a somewhat related note, is there a way to easily determine the TM distance between two nonconsecutive waypoints on a route?

Let's say I wanted to know the distance between two relatively major intersections (highways/road that would be included in the HB) but there are one or more waypoints for less significant roads in between. I could manually add up the distance for each segment to find that distance. Is there less tedious way to calculate that mileage?

Offline michih

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 4976
  • Last Login:Yesterday at 02:52:34 pm
Re: What are mileages based on?
« Reply #3 on: January 21, 2025, 12:18:28 pm »
Do you mean a calculation of the "TM milage" for a segment between two wps in showroute?
If so, this idea could make the trick: https://github.com/TravelMapping/Web/issues/541 (you could deselect all segments and then just mark what you want to measure)

Offline bejacob

  • Full Member
  • ***
  • Posts: 243
  • Last Login:Yesterday at 09:27:33 pm
Re: What are mileages based on?
« Reply #4 on: January 21, 2025, 09:19:45 pm »
Do you mean a calculation of the "TM milage" for a segment between two wps in showroute?

I think that's right. Essentially what I would use it for would be in planning to drive parts of routes that I have not previously traveled. The full route length we have, as well as the miles currently traveled (easy to calculate the total portion not traveled) but what if my plans only allowed me to clinch part of what I haven't done yet?

I'll give an example.

Let's say I wanted to drive US1 in Florida (I've driven a little over half of it already), but perhaps on a future trip, I am only interested in the section from Vero Beach to Melbourne, just part of what I have not done yet. For this section the southern waypoint is FL60 and the northern one is US192. That looks like about 14 segments to me, with the only ones intersecting other TM routes being FL510 and FL514. Maybe in planning a hypothetical trip, I want to know the distance on US1 between FL60 and FL510, FL510 and FL514, and FL 514 and US192. I don't really care about any of the other waypoints, as I would probably use one of those routes as my entry/exit point. I can click on each segment of US1 and add up the individual mileage of the 6 segments between FL60 and FL510 which totals to 8.7 miles. I could do the same for the other parts as well. I think the entire stretch between FL60 and US192 is 34.39 miles (for my purposes, the approximation TM uses is fine). Adding up all the pieces by hand seems like a brute force/tedious way to find the distance between two points on a route.

Just wondering if there is an easy way to do it. Perhaps one already exists and I just don't know about it.

Hope that explains my initial comment.

Offline Jim

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 2878
  • Last Login:Yesterday at 10:06:50 pm
Re: What are mileages based on?
« Reply #5 on: January 22, 2025, 07:19:03 am »
A quick thought on this: it would be pretty easy to add a label to showroute's .list Toolbox popup to display how many segments are currently selected and the cumulative length of those.  The only downside I can think of is that it would make the popup a little larger and cover a tiny bit more of the map.

Offline bejacob

  • Full Member
  • ***
  • Posts: 243
  • Last Login:Yesterday at 09:27:33 pm
Re: What are mileages based on?
« Reply #6 on: January 22, 2025, 06:21:59 pm »
Whatever works. I don't know that the number of segments selected matters that much to anyone (I could be wrong), but I do think the mileage info would be useful (at least to me).  :)

This solution does sound like it would be the easiest to implement. As with all things on this site, I defer to the experts. The work the contributors do here is amazing.


Offline Jim

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 2878
  • Last Login:Yesterday at 10:06:50 pm
Re: What are mileages based on?
« Reply #7 on: January 22, 2025, 07:53:07 pm »
https://github.com/TravelMapping/Web/issues/810 (just an Issue to track this idea, not a Pull Request with an implementation).

Offline pderocco

  • Newbie
  • *
  • Posts: 41
  • Last Login:January 28, 2025, 03:15:22 am
Re: What are mileages based on?
« Reply #8 on: January 24, 2025, 03:14:37 am »
Let's say I wanted to drive US1 in Florida (I've driven a little over half of it already), but perhaps on a future trip, I am only interested in the section from Vero Beach to Melbourne, just part of what I have not done yet. For this section the southern waypoint is FL60 and the northern one is US192. That looks like about 14 segments to me, with the only ones intersecting other TM routes being FL510 and FL514. Maybe in planning a hypothetical trip, I want to know the distance on US1 between FL60 and FL510, FL510 and FL514, and FL 514 and US192. I don't really care about any of the other waypoints, as I would probably use one of those routes as my entry/exit point. I can click on each segment of US1 and add up the individual mileage of the 6 segments between FL60 and FL510 which totals to 8.7 miles. I could do the same for the other parts as well. I think the entire stretch between FL60 and US192 is 34.39 miles (for my purposes, the approximation TM uses is fine). Adding up all the pieces by hand seems like a brute force/tedious way to find the distance between two points on a route.
I find Google Maps to be a very good tool for this, if you go to Saved->Maps->Open My Maps->Create a new map, and then use the line tool, Create Driving Route. If you've never done this, it will take a little sleuthing to figure out how this tool works, but it allows you to draw any route, and if it chooses the wrong route, you can grab the line and drag a waypoint to wherever you want. In the end, you can choose Step-By-Step Instructions from the layer containing the route, and it will give you a much more accurate mileage. You can also save the entire map as .kml or .kmz, if you want. So I don't think TM needs this function for planning trips.

Offline bejacob

  • Full Member
  • ***
  • Posts: 243
  • Last Login:Yesterday at 09:27:33 pm
Re: What are mileages based on?
« Reply #9 on: January 24, 2025, 01:07:43 pm »
I think you might be misunderstanding the way I would use such a feature were it to be added to TM.

Before hitting the road, I often grab a screenshot of the area I plan to visit. I then print it out and jot down the mileage along all the routes visible. I would omit the routes I've already driven unless I think I would need to traverse them in the process of covering previously undriven routes. On a recent trip to Jacksonville, I took over a dozen such printouts with me, all calculated and labeled by hand with routes and mileage I was thinking of driving.

The attachment is an example of a screenshot from TM near Ashland, OH when I was heading up there last fall. After grabbing the image, I would have written in the route numbers and mileage between junctions with particular note of the untraveled portions so I might be able to figure out in advance what I wanted to cover.

As noted originally, I currently do this by adding up the mileage of each segment. All I'm wondering is if there is a faster way or if one could be added. If not, I'll keep doing it by hand. No problem.

On a side note, I use Google Maps frequently when on the road and review/update the "Your Timeline" feature.

As for the accuracy of the mileage, for my purposes, the TM approximation is sufficient. It's more of a guide as to whether I want to drive a couple miles out and back or dozens of miles. Sometimes it's not worth the time commitment just to clinch a road. Other times, getting that clinch might justify the drive.

Offline michih

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 4976
  • Last Login:Yesterday at 02:52:34 pm
Re: What are mileages based on?
« Reply #10 on: January 24, 2025, 02:04:47 pm »
The attachment is an example of a screenshot from TM near Ashland, OH when I was heading up there last fall. After grabbing the image, I would have written in the route numbers and mileage between junctions with particular note of the untraveled portions so I might be able to figure out in advance what I wanted to cover.

Why don't you highlight "Untraveled routes"? I think that's better to spot the relevant routes on the road.
I do the planning in advance. The exact route is in my GPS. I just follow it on the road. I'd love to see the new mileage per route in showroute when mapping the travel after the trip. If possible with %. The number of segments is irrelevant for me.

Offline bejacob

  • Full Member
  • ***
  • Posts: 243
  • Last Login:Yesterday at 09:27:33 pm
Re: What are mileages based on?
« Reply #11 on: January 24, 2025, 05:22:52 pm »
Depending on the trip, I do sometimes highlight the "untraveled routes." You're right that it can be especially helpful spotting the relevant routes especially very short ones. I've definitely found a few I would have missed otherwise by switching between "traveled" and "untraveled."

Like you, the bulk of my planning is done in advance and put into my route plan (I use CoPilot GPS by Trimble). If I have extra time to grab a few miles, I can change course on the fly which is where having this info at my fingertips comes in handy. It's not always easy to do on my phone when behind the wheel, especially in bad weather or heavy traffic, though I've pulled up the TM site often enough while in transit.

This is more of "nice to have" request that a need. Everyone has their method to figure out a driving plan. This one works for me.

I agree that the number of segments is irrelevant.

Offline Duke87

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 1030
  • Last Login:Yesterday at 08:23:12 pm
Re: What are mileages based on?
« Reply #12 on: January 28, 2025, 09:07:00 pm »
TM distances are approximate.  They are straight line distances between consecutive waypoints multiplied by 1.02112, though all of the trig is in there to compute them on a sphere not a plane.  I don't know why that particular number.  It was inherited when TM was created using the data (and that distance function) from the old CHM project.

When the interstate system was drafted as the first component of CHM, the calculated total length of it using straight line distances from wpt files was found to differ from the official FHWA total by a factor of... 1.02112.

So that's been the fudge factor for everything ever since.

Naturally this means the lengths of very straight routes are slightly overestimated while the lengths of very curvy routes with lots of mountain switchbacks and whatnot are inevitably lowballed, sometimes substantially.

Offline vdeane

  • Sr. Member
  • ****
  • Posts: 437
  • Gender: Female
  • Last Login:Yesterday at 09:43:22 pm
    • New York State Roads
Re: What are mileages based on?
« Reply #13 on: January 28, 2025, 09:20:42 pm »
I'm guessing that number is a little dated, given that shaping points weren't a thing when the CHM Highway Browser was first created.
Please note: All comments here represent my own personal opinion and do not reflect the official position of NYSDOT or its affiliates.