Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Colour contour lines and Hillshade maps #6636

Closed
val24 opened this issue Mar 7, 2019 · 22 comments · Fixed by osmandapp/OsmAnd-core#747
Closed

Colour contour lines and Hillshade maps #6636

val24 opened this issue Mar 7, 2019 · 22 comments · Fixed by osmandapp/OsmAnd-core#747
Assignees
Milestone

Comments

@val24
Copy link
Contributor

val24 commented Mar 7, 2019

Hello,
I do some ski touring and avalanche risks depend on the steepness of the slopes (among other things).
It would be great to have a possibility to visualise the different slope steepness through different colours with an easy able / disable option and / or a way to set the level of transparency of that information.
I hope my request was clear enough.
Thanks for this great app which I use a lot when hiking.
Val

@scaidermern
Copy link
Contributor

I hope you will stick to official sources regarding avalanche risk during your tours. While a better visualization of slope steepness sounds interesting your use case sounds wrong.

@val24
Copy link
Contributor Author

val24 commented Mar 8, 2019 via email

@val24
Copy link
Contributor Author

val24 commented Mar 8, 2019 via email

@vshcherb vshcherb added the Nice to Have Should be fixed but there is no priority or no possibility to fix it within current horizon planning label Mar 18, 2019
@jroulleau
Copy link

I'll second this request. The use case is correct and follows best practice for anyone travelling in the mountains in winter away from secured areas.
The ability to easily identify on the map slopes steeper than 30, 35 and 40 degrees is a great help to prepare a tour that avoids potentially dangerous slopes based on the current conditions. Ski tourers already do that by measuring the distance between contour lines on paper maps and calculating the slope. This is tedious and not always very accurate. A quick visualisation on mobile the night before in the hut would help plan a safe tour for the following day. This is always used in conjunction with additional information about snow condition, weather forecast etc.

@jroulleau
Copy link

User story: As a ski tourers, I want to easily be able to identify slopes steeper than 30, 35and 40 degrees, so that I can plan a safe tour based on current snow conditions.

@vshcherb vshcherb changed the title feature request about Contour lines and Hillshade maps Colour contour lines and Hillshade maps Dec 11, 2019
@scaidermern
Copy link
Contributor

The request for steepness visualization is also part of #2349.

@cycore
Copy link

cycore commented Dec 10, 2020

the same user story was described again in #9283

@vascotenner
Copy link

Summary from #9283:

My usecase is as follows. I use these slope maps to estimate the avalanche danger when doing off-track skiing. In the most common used risk estimation framework (based on prm designed by Werner Muenter) three slope classes are distinct:

[30, 35)
[35, 40)
[40, 90)

For this reason many web based maps have a winter map showing these slopes, like the swiss maps , the french IGN maps, the outdooractive and bergfex maps. They all use the same colorscale for these maps.

Map data availability
This map-data is already present in the current osmand app, but is needs to be rendered differently. Possibily as a a separate layer: slope classes (instead of slopes). The size of the datasets will be very limited, as it only contains 4 values.

For europe, terrain data with a resolution of 25m is freely available. When needed, I can assist in parsing this data.

There exists also a dataset with 1m resolution, but I do not know how to access it, and what the licenses are.

Example from swisstopo
image

@vascotenner
Copy link

Earlier contributions have been done by: @veliymolfar and it seems that @vshcherb is also well informed.

What would be needed to implement this addition in terms of: decisions, programming? Who could help with that?

@vshcherb vshcherb added this to the next-backend milestone Feb 13, 2023
@vshcherb
Copy link
Member

To test:

To do:

@vshcherb vshcherb modified the milestones: next-backend, 4.8-backend May 14, 2024
@vshcherb vshcherb added map-data and removed Nice to Have Should be fixed but there is no priority or no possibility to fix it within current horizon planning labels May 14, 2024
@vshcherb vshcherb modified the milestones: 4.8-backend, 4.8-map May 14, 2024
@vascotenner
Copy link

@vshcherb thank you for picking this up.

I try to install the test version. I tried first to unpack the zip, but then the off file is not registered with Osmand+ on my phone, and I do not know how to import it. The off.zip is registered, and I can open that with Osmand+. However, I do not know how to test. It does not show up in plug-ins, and also not in map styles/terrain.

@daxid
Copy link

daxid commented May 15, 2024

@vshcherb thank you for picking this up.

I try to install the test version. I tried first to unpack the zip, but then the off file is not registered with Osmand+ on my phone, and I do not know how to import it. The off.zip is registered, and I can open that with Osmand+. However, I do not know how to test. It does not show up in plug-ins, and also not in map styles/terrain.

Hi, you should extract the osf file and simply open it with OSMAnd. It will install the plugin.

I can see it in my plugin list but I cannot see what the plugin is actually doing.

@cycore
Copy link

cycore commented May 15, 2024

You need to wait for the next version that contains the code changes from #19872 or install the nightly build from https://osmand.net/docs/technical/build-osmand/osmand-builds#android-nightly-builds-nightly .
If you try the plugin in that version, you should see two new entries in the topo color scheme drop down. In addition to Hillshade and Slope, there appears Hillshadetest and Slopetest.
So far, the new modes do not actually change the coloring.

@vshcherb
Copy link
Member

vshcherb commented May 16, 2024

Forgot to post a comment ... Now it works with same cache as hillshade / slope (we need to improve cache still). Though it works, so if you select new custom style you will see new rendering scheme applied on Nightly Android. So please first clean up cache

@cycore
Copy link

cycore commented May 17, 2024

I tested it by clearing the cache and can confirm, that the new color scheme is applied.

Then I modified the plugin myself, to add another color scheme for avalanche relevant slopes, as described in the post above by @vascotenner #6636 (comment)
I added a file clr_avalanche.txt with these colors:

0,255,255,255,0
29.999,255,255,255,0
# yellow 
30,242,229,10,255
34.999,242,229,10,255
# orange
35,244,111,36,255
39.999,244,111,36,255
# red
40,222,5,91,255
44.999,222,5,91,255
# violet
45,200,137,187,255

It appears to work somehow. However, the slope values are far from accurate and it shows up a lot less dangerous than it is in reality. I added screenshots for comparison from

The skiable region north and bit east of the peak Gabler should show up as mostly safe (<30°) with some areas in yellow (30-35°). Is the DEM not accurate enough for this use case?

my avalanche color scheme integrated slope color scheme
avalanche layer from Alpenvereinaktiv slope layer from openslopemap.org
skitourenguru.ch

@xmd5a2
Copy link
Contributor

xmd5a2 commented May 17, 2024

I've manually made slope map from our source geotif data using QGIS and @cycore scheme:

No smooting Smoothing
Screenshot_2024-05-17_14-32-22 Screenshot_2024-05-17_14-32-50

@cycore
Copy link

cycore commented May 17, 2024

that looks great and like something I could work with while being out in the mountains! (the purple color which I took from the swiss maps turned out to be a bit pale).

So the DEM from the source geotif is accurate enough. But how to get the same picture within OsmAnd? Is it getting smoothed or downscaled too much during the processing?

@xmd5a2
Copy link
Contributor

xmd5a2 commented May 17, 2024

I've tried to increase our tifheightmap (3D terrain maps used in app, it is baked from original geotiffs) zoom from 14 to 15 (results in resolution increase) for a test. Looks like it is much better that zoom 14 for all Europe at least but file size is 3-4 times larger that before.

Zoom 14 Zoom 15
Screenshot_20240517_120338_OsmAnd Nightly Screenshot_2024-05-17-16-03-12-732_net osmand plus

@cycore
Copy link

cycore commented May 17, 2024

This looks a bit more detailed, however, it is still not showing those relevant yellow areas along the track north east of the peak Gabler. They are visible in your QGIS image.
Would that mean you would have to increase the zoom and file size even more?
maybe in this specific avalanche use case with only 5 colors, a precalculated raster tile approach might be more efficient regarding total file size.

@vshcherb
Copy link
Member

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

@xmd5a2
Copy link
Contributor

xmd5a2 commented May 24, 2024

osmandapp/OsmAnd-resources@4bb0797
Some color schemes added including avalanche. However we need to increase 3D height maps zoom at least to 15 to provide adequate details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.