Web Design Discussion > General Web Design Discussion
What are mileages based on?
pderocco:
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?
Jim:
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.
bejacob:
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?
michih:
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)
bejacob:
--- Quote from: michih 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?
--- End quote ---
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.
Navigation
[0] Message Index
[#] Next page
Go to full version