Show road grade along with altitude

Hrvoje Nikšić shared this idea 8 years ago
Gathering feedback

Being a cyclist, I often look at elevation at the "cross-hair" position at the center of the displayed area of the map. It would be great to be able to customize this display so it shows the grade of the road (when the cross-hair is over a road) as a percentage.


Currently it is not easy to get this information - while the dashboard has the ability to show grade (slope), there seems to be no such ability for points and tracks.

Replies (5)

photo
1

Nice idea. Maybe the calculation could take into account the zoom level too? Eg. when zoomed in close the calculation would be position +/-10m, zoomed out a little further the calculation is +/-100m. Maybe use width of ruler. I only mention this "averaging" because calculation at a single point gives wildly inaccurate grade values in my experience. I don't display grade on dashboard anymore for this reason.

photo
1

Thanks for your comment, Andrew. Personally I think I would prefer if the road grade calculation were not affected by zoom level because it would yield inconsistent results depending on how you look at the map. I expect that the grade calculation could be made reliable, since routing sites such as ridewithgps.com already provide grade data for routes. (Perhaps the grade shown on the dashboard is inaccurate because it relies on GPS readings?)

photo
photo
1

How should it work?? Grade is calculated between two points. Which points?

And IF it works: The altitude values are very(!) inaccurate.

So, most of time you will get unusable results.

Use a dice - You will get the same good results.

I think (!)

photo
1

I agree with gynta. Grade is not at the point of your finger, but between two points. Hrvoje how would you specify which two points to use?

photo
1

@gynta If the calculated grade were indeed (as good as) random, I would also argue against its inclusion in Locus. Fortunately, it is easy to check the grades calculated by existing routing software, which does manage to calculate a usable grade. In my experience, the reported grade is not random, it strongly correlated with the slope observed in the field.


For example, take a look at https://ridewithgps.com/routes/13050338 (or any other route on that site). You can hover over any point on the route, or on the elevation graph, and the software reports the grade. It can even draw the grade along with the elevation, display maximal grade in the statistics, etc. And none of this is specific to that mapping site; AFAIK all apps for cycle planning are able to report road grade at a point on the route. Just try a route in an area you are familiar with, and see if the calculated grades are useful.


Currently to obtain the grade of the road in Locus, I am forced to find the altitude lines in the vicinity and try to assess the slope based on their distance and the chosen zoom level. This kind of task is what machines excel at.

photo
1

On https://ridewithgps.com the grade is also changing between two trackpoints on the given trackline. Zoom in and look! (or see attached clip)

Your topic sounds like "show me grade on any place (road) under my crosshair". Maybe my fault.

Anyway to to clarify your idea: "Snap crosshair on exists track and show grade". right?

Well ok, should we discuss about meaningfulness of this values now?

photo
1

Hrvoje - you make new important qualification - you want grade displayed around tapped point on existing route (like RideWithGps) - that now makes more sense - the two points, one either side of your tap maybe (assuming tap on route point) is not two random points, but two points on the chosen route. Your original post didn't mention anything about a route. I like the idea again.

photo
1

@Andrew OK, this is just a misunderstanding. :) The proposal is indeed to show grade on any road, not just one with a track in it. The ridewithgps link is only to show that useful road grade can (in my experience) be calculated using the existing map altitude information, which Locus has access to.


@gynta The ridewithgps software does display the grade only along a route, but that is because it is primarily tracking software. Since you can plan a route along any road, it is clear that a mapping software *can* calculate grade of an arbitrary point on a road. (If nothing else, it could internally pretend there is a route going there, and calculate the grade at that point of the invisible route.)


The question is whether users consider such an option useful enough to warrant a new Locus feature. I personally do miss being able to inspect road grades while looking at alternative routes in Locus.

photo
1

I can see how it would be calculated for a point on a route (like RWG), but how could it work for any point not on a existing route/ track? There are an infinite number of directions around the point you tap in which the grade between 2 points could be calculated.

photo
1

Of course, the idea is to show grade while over a *road*, not at an arbitrary point. (See the original description, and the follow-ups - a "road" is always mentioned.)

photo
photo
1

Folks... it's really not that hard... why do you keep misunderstanding each other? :-)

You tap somewhere on a map.

Locus finds out if the tapped place is "something like a track" by querying the OSM servers.

Locus downloads the tapped features vector data (which is basically a track).

Locus calculates and shows the grade of the downloaded feature at the tapped point, just as if it was a track in its own database.

photo
1

If this feature didn't work off-line, it would be much less useful, at least to me. Are you saying that Locus basically doesn't know what piece of map represents a road (or track, etc.), in off-line mode?

photo
photo
1

ahh another new important qualification

I am always using Locus offline so no use anymore to me

photo
1

Then you are indeed out of luck. The path data is not stored anywhere inside any of Locus offline maps (neither in sqlite pixel maps nor in mapsforge vector maps as far as i know). It would only work when you're online.

photo
1

Then you are indeed out of luck. The path data is not stored anywhere inside any of Locus offline maps (neither in sqlite pixel maps nor in mapsforge vector maps as far as i know). It would only work when you're online. Obviously, you could cache that stuff locally... but that leads a bit too far.

Supporting the online query on the other hand should be relatively easy to implement. It could even be done by a 3rd party with a clever URL and a couple php lines, if only Locus supported external thingies better.

photo
1

It could work offline if the tapped point was on a route or track.

photo
1

offline:

I never received accurate altitude values from GPS or hgt files.

+- 20 Meters ? (compared with real values)

Wrong values will be also stored in saved track/points.

Most time(!), we have a calculation between two inaccurate altitude values.

So - how accurate/useful is the result?

It's again a question of "(coding)effort and benefit"

photo
1

Calculating grades for existing tracks in the database isnt exactly rocket science. Obviously you have to deal with funky data errors... but hey... that has been done since ages. Just look at one of your altitude profiles... if your eyes and brain can sort of figure out how steep it is at a certain point, so can a software.


The trick is to get this track data realtime then you tap your map anywhere. OSMs overpass-API can be used to find out what is below (or sufficiently close) to your tap. If there is a "way" (osm slang for track), it returns all the "nodes" (osm slang for points) that make up the (part of) road/path/whatever. You'd then query their alitude values either from offline srtm data or online and could render an instant profile... or display the grade at the current point...


You can do the same thing manually right now... find some start and end points that match your thingy... calculate a track with brouter or whatever... store it... fill in altitudes... check out the profile... etcpp. Super complex... nobody does it just to quickly check out an interesting trail on a map.


Locus could automate this with the overpass-api into a single menu item on long tap... like "evaluate current path". It will never happen though... because neither menion nor 90% of the geocaching-infested locus crowd is interested in altitudes :-).

photo
1

you are right

photo
photo
1

For an example, go to https://overpass-turbo.eu/ and click on RUN. You will see how "vectorized" track data appears on top of the current map. This data could be used for instant grade-on-tap calculation.

Leave a Comment
 
Attach a file