osmandapp / OsmAnd

OsmAnd
https://osmand.net
Other
4.69k stars 1.02k forks source link

Customise Limits of "Colour By Slope" #12954

Closed Dollarius closed 5 months ago

Dollarius commented 3 years ago

I find the new "colour by slope" feature for routes to be very useful! However, the colourscale is fixed (by default) to the range -25% and +100%. While this choice works (reasonably) well for hiking, I find it very limiting for road cycling. When cycling on the road, I would like to fix the range to something like -10% -> +20%, as paved roads above 20% gradient are very rare. Also, a gradient of even 2-3% is rather important and it would be nice to see it on the map.

Would it be possible to allow to manually set the range of the colourscale for each route? Thank you very much for the help! Giordano

tradavyvy commented 3 years ago

I think the same goes for car routes. At least for my (35 year old) motorhome, wich is severely speed-limited on gradients over +10% and simply stalls at +20%. Davy

scaidermern commented 2 years ago

There is a new coloring scheme suggested in #11775 / #12336. It makes slope changes in the lower range more clear. Maybe there is additional room for improvement.

letypequividelespoubelles commented 2 years ago

Suggested in #11975 too, but for the whole slope overlay (very usefull for planning ski trip to avoid avalanche). Maybe both could be done at the same time?

anastasiia936 commented 2 years ago

Request from user: Please make the "customize route line" gradient option more relevant to heavy vehicles by showing more colors to differentiate down hill slope at, say, 4%, 8%, 12%, 16% 20% and 25%. Anything greater than 25% slope is meaningless to any motor vehicle. White is the worst color for zero gradient since it blends in with white streets, and becomes completely unreadable when the map switches to night viewing mode.

michaelblyons commented 2 years ago

I think there's a good case for customizations per routing profile. There may be trouble making a useful UI for it on a phone screen, though. 😉 To bring together some of the use cases mentioned:

And different people will have different thresholds for each activity.

letypequividelespoubelles commented 2 years ago

There may be trouble making a useful UI for it on a phone screen, though.

What about UI proposed in #11975 ? I think it's very easy to customize the slope display for each profile with it !

michaelblyons commented 2 years ago

What about UI proposed in https://github.com/osmandapp/OsmAnd/issues/11975 ?

Good question. I don't think it's sufficient. The slope underlay/overlay limits are 0% to 60% (or something like that), where routes with directionality could be -100% to +100% or pretty close.

Aambro commented 2 years ago

Is there a temporary solution to override default values in xml file?

vshcherb commented 2 years ago

@Aambro Unfortunately no :-( It's hardcoded https://github.com/osmandapp/OsmAnd/blob/master/OsmAnd-java/src/main/java/net/osmand/router/RouteColorize.java#L47. Probably it could be free customized or some different styles to select generated. Not sure if rendering style is a good place for that. GPX itself might be better

Jon-Murray commented 2 years ago

The main issue I am facing with this, as someone else has mentioned earlier, is that white just doesn't work well at all for navigation in practise. What michaelblyons has suggested would work well, but for me there's simply too much variation. In a "normal" setting for cycling, the majority of roads would be somewhere between 0, +-3% gradient. Currently, this means the majority of my ride I'd end up looking at a white line. With the default osmand map, this makes it really hard to read.

I've attached two screenshots, one using the white "slope" and the other using the green "elevation":

elevation slope

The slope is hard to see here, albeit a bit contrived to illustrate my point. However, trying to birds-eye navigate this when my phone is out in front of me on a sunny day makes it extremely difficult (white on white/light grey surroundings). Basically, i'm just trying to write a really longwinded request to not make white the default, but instead go for green (or blue/grey/configurable). Purple being a negative gradient is a great idea, as it would free up the "green". I'd just remove white as an option altogether if it were up to me.

Cheers

michaelblyons commented 2 years ago

Jon's point is well-taken. May I suggest this spectrum without white:

Assuming that black is "too steep to use" on both ends, you can still have a symmetrical color spectrum.

ferpg81 commented 2 years ago

Hi. I came to github to propose a feature like that for a gpx trace on the map, when selecting color by slope. @Jon-Murray explained it perfectly, when you ride a bike on the road, normal values for slopes are < 5%, and when climbing, maybe a 10-20%, that are very hard to do. You will never (or rarely) ride more than that. The effect is that during all your ride, you always see a white colour or maybe a slight yellow... It would be much appreciated if we could adjust colours limiting max and min values, like the screenshots on #11975, and/or having a default values for each profile (hiking, riding, etc.), and the possibility to select different palettes, as @michaelblyons said. Thanks a lot.

anastasiia936 commented 2 years ago

Please add the ability to make the gradient line transparent so that you can see the street name on the map.

michaelblyons commented 1 year ago

In case you are only subscribed to this issue and not #12336, Victor has indicated that they're working on this! 🥳

vshcherb commented 6 months ago

Probably instead of special UI (which would take quite some time & efforts) we could use colorization plugin similar to approach here https://github.com/osmandapp/OsmAnd/issues/6636

vshcherb commented 6 months ago

Today we've introduced color palette for user defined (https://github.com/osmandapp/OsmAnd-resources/tree/master/color-palette). Task is not complete yet but should be ready to try. Files from color palette will be available in user folder (for export / import and editing). For example:

  1. slope_default.txt is responsible for colors for Slope Terrain
  2. slope_avalanche.txt is responsible for colors for Terrain Avalanche (new item will be added to the list)
  3. route_slope_default.txt is responsible for colors for route in slope
  4. height_altitude_0_200.txt is a new file which will color Terrain with colors of absolute altitude (so it should be a range of files that could be applicable for different regions) - dynamic scale is not planned yet.

We plan to improve selection for user palettes in settings and create plugins with some predefined palettes. Though we don't plan for now to create editor for the palette itself, probably later

vshcherb commented 5 months ago

Now it's possible to update existing palettes using import / export palette (and manually editing txt files). We're going to introduce inline palette editor later in the app