relief shading for my OpenAndroMap???

Started by hundundhund, March 11, 2014, 12:53:29 AM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

hundundhund

Hello,



I have a openandromap (=vector).

is it possible to relief shading over my Map.

perhaps there is a option to make this relief shading based from the .hgt-File. And then merge this with my Map?

i hope there is any solution for this problem.

srry, but my english is not so good :U



sonja

Maki

#1
At the moment it isn't possible. But we all dream about it. :-)

hundundhund

#2
who is the engineer who can make this`? or where can we suggest our wishes?



and i want to know if any such solution is in planing.

eartrumpet

#3
Quote from: "hundundhund"or where can we suggest our wishes?

You can do it here - http://www.oruxmaps.com/foro/viewforum.php?f=8">//http://www.oruxmaps.com/foro/viewforum.php?f=8 - or this thread should be moved there.



This is the major missing feature for me at the moment, and there are several ways how this could be solved:



- Generate from hgt files

- Combine offline maps - at the moment you can only combine online maps, but if you have a transparent hillshading offline map combined with another one it would be great.

- Allow PNGs in kml overlays



The main problem is probably that all those have the same projection.

hundundhund

#4
locus has a overlay-function "hillshading". but its only online available :(

..i think the relief shading based on the .hgt-file is better. because it is the smallest and it goes offline :)





- - how can we move this thread to the other group?

eartrumpet

#5
Quote from: "hundundhund"locus has a overlay-function "hillshading". but its only online available :(

OsmAnd has also a paid plugin which provides hillshading. I would happily buy another donate version (or more) of Oruxmaps just for this.


Quote..i think the relief shading based on the .hgt-file is better. because it is the smallest and it goes offline :)

It depends, because it has to be rendered live and would slow down your device. A transparent PNG layer also works offline, and would be the base of the other solutions.


Quote- - how can we move this thread to the other group?


Only Orux can as far as I know.

Maki

#6
I recently asked on mapsforge-dev about the possible inclusion of hill shading in the MF library, which would allow to control it in themes. Ludwig basically declined saying "Hillshading itself is probably better left to more powerful computers with download of hillshaded background tiles. This should already be possible with the Rescue concept of transparent layers". If I get this correctly it means that with the current version of mapsforge transparent layers aren't available, so you can't draw the map on top of the shades. Doing the inverse (semitransparent hills on top of the map) would IMHO look bad since it would change the colors of everything. I'd like roads to stay constant.



Anyway IMHO .hgt would be the way to go since you can control the shade generation in detail and intensity to fit different tastes and CPUs, caching on disk for faster rendering. Pre-rendered tiles would be huge and without control.



I would happily buy another donate version (or more) of Oruxmaps too. It really changes the perception of the map.

panda

#7
Hello,

is there an advance in this topic?



I would really enjoy this very much !  :D

orux

#8
Quote from: "panda"Hello,

is there an advance in this topic?



I would really enjoy this very much !  :D


Hi,



It is a heavy task for an android device;



It is similar to the 'relief map' that you can activate in settings--maps. This map uses the hgt files to draw the relief.



But you can check that it is very slow, even with new deviced.





orux

rvb

#9
there are relief shading tiles on osm maps.



i don't like them and they take more space then the maptiles.



http://wiki.openstreetmap.org/wiki/Relief_maps">http://wiki.openstreetmap.org/wiki/Relief_maps



you can download a map with that kind of relief.

eartrumpet

#10
Quote from: "orux"
It is a heavy task for an android device;



It is similar to the 'relief map' that you can activate in settings--maps. This map uses the hgt files to draw the relief.



But you can check that it is very slow, even with new deviced.


I think live rendering is not necessary; a great solution would be to pre-generate relief shading overlays from hgt files in advance, comparable to the map creator.

Maki

#11
Well, I don't find relief shading *that* slow, on a 3 years old device, but I wouldn't call it "realtime" either. Prerendering is a good idea.



Another approach, if with MF0.4 layers can indeed be transparent, is multilayer offline maps. From personal experience a DEM vith 10 meters grid is good to generate hillshading up to ZL16 with 256px tiles and up from there digital zoom is fine. Working with 30m DEM there is probably no need to go beyond ZL15 (or maybe 14) natively. Since there are no sharp transitions heavy JPEG compression can be used to keep size down without visible image degradation. So an mbtiles base layer with one Mapsforge on top could work well.

Maki

#12
This is not to pull Jose's foot, I was just playing yesterday with this stuff and couldn't resist building a mock-up of what it can be.

https://flic.kr/p/poxy2C">https://flic.kr/p/pouRCd">

Full resolution available on Flickr (click the image)



Some straight facts:

* rendering with gdaldem a 1x1 degree tile of 30m dem takes under 4 seconds on my 4 years old PC (i5 750). That's a 80x100 Km rectangle. So rendering a smaller portion on a phone could be probably done on the fly.

* the resulting .mbtiles file up to zoom level 13 takes around 5Mb, but it looks like it is already interpolated, so limiting to ZL12 could very well be under 2MB per tile, without any quality loss.



I noticed however that mixing contour lines from various sources there are differences, so generating the hillshade with one set of data and blending it with contours from another source isn't always good. So if this has to be done it's probably better to just use multilayer maps rather than rendering on the phone.

panda

#13
Hi Maki,

this is great stuff!!



Can you give more details how you did it, I#d like to try on my own.

Maki

#14
Hi Panda, it's a bit too long to explain in detail.

You can get elevation data from http://www.viewfinderpanoramas.org/dem3.html">//http://www.viewfinderpanoramas.org/dem3.html and generate the hillshading with a GIS software, like http://qgis.org">//http://qgis.org.

Then you import the generated geotiff in https://www.mapbox.com/tilemill/">//https://www.mapbox.com/tilemill/ and export it in mbtiles format that is recognised by OruxMaps.



If you want the quick and dirty solution you are almost done. Just take a screenshot of the map in the place you like, switch without moving to the hillshade and take another screenshot. Move the two screenshots to a PC and overlay the two in Photoshop/Gimp/Krita/whatever. Put the hillshade on top and set blending mode to "multiply" and then play with opacity. This method works, but applies the shade to everything, something that I don't particularly like.



The other approach is to split you favourite theme in two: one with the background you want to shade (typically landuse), the other with the foreground (roads, buildings etc.). Take the usual screenshots and assemble accordingly.



If you want some ready to use material grab this (my theme split in two, and a couple of shaded tiles) https://app.box.com/s/p8ra7k4suy1jy0954kn4">//https://app.box.com/s/p8ra7k4suy1jy0954kn4