Tunnels - custom versus internal themes

Started by starous, January 26, 2014, 15:27:08

0 Members and 1 Guest are viewing this topic.

starous

Hello,

today I realized some stupid thing - tunnels are not rendered when some areas are over them - it looks to be problem of all "external" rendering themes.
I read some discussions on Mapsforge and Locus forums - it looks to be known "feature" of Mapsforge rendering.
I found some workarounds, more exactly only one: To use of TagTransform to change or delete "layer" before the MapWriter is used - i.e., to create Mapsforge map from modified OSM source.

BUT:
If I display the same map with Locus internal rendering theme, the tunnels are shown correctly!
(The map is my own, created without any modifications with TagTransform nor any other utility.)
So - how is it done? Are sources of internal Locus rendering themes available somewhere?
Or are there used some special internal Locus workarounds which are working only when internal rendering theme is used?

BR,
Ales
  •  

jusc

Can you give an example, maybe with a screenshot?
Regards J.
  •  

starous

#2
Quote from: jusc on January 26, 2014, 16:31:37
Can you give an example, maybe with a screenshot?
There is:
Missing_tunnel.png displays map with my rendering theme - the same result (according to tunnel...) I have for any "external" rendering theme.
Tunnel_OK.png displays exactly the same map with Locus internal rendering theme "Turistika" (probably "Hiking" in English) - the same result I see on any internal rendering theme.
Tha map is made via Mapsforge MapWriter from OSM map of Austria (from geofabric...) merged with SRTM data - without any modification via TagTransform. Modified tag-mapping.xml is used (to include more POI tags in *.MAP.
The place, shown on the my screenshots, is part of S6 higway (and also part of railway) near Semmering.
You can get it (approximately) via this link: http://www.openstreetmap.org/edit#map=16/47.6276/15.8181
Both tunnels (highway & railway) have these tags: ... layer=-1, tunnel=yes ...

BR,
Ales


Missing_tunnel.jpg


Tunnel_OK.jpg
  •  

voldapet

Hi,
I only guess because I don't have your theme, but can you check the rules for "wood" areas? Forest areas in internal themes are transparent and this is probably the reason why you can not see the tunnel with your theme.  Locus vector maps (from locus store) does not change the layer tag but I think that OpenAndroMaps has some additional logic and change the layer tag for tunnels during generation of the map.
  •  

john_percy

As Voldapet says, forest areas in internal themes are semi-transparent and you can see that in your screen shot. That's easy enough to achieve, either with a colour in the form <area fill="#7786CE67" /> or with a semi-transparent png.
Also to consider is the order of tags in your xml theme file. The standard order has tunnels rendered before woods, which means that woods will always appear on top of tunnels. That's a choice as to how intrusive you want tunnels to be. The other issue however is the layer tag in the map which you have no control over (unless you produce your own maps). A layer of -1 will always (I think) be covered by a "normal" layer of 0. OpenAndroMaps changes the layer tags, and relies on th eorder of rendering instead.
Voluntary and Velocity themes - https://voluntary.nichesite.org
  •  

voldapet

Quote from: john_percy on January 28, 2014, 09:17:13
A layer of -1 will always (I think) be covered by a "normal" layer of 0.
That's correct. Mapsforge render data according to layer value. So all elements in layer=-1 are render earlier/under then elements in layer=0. In this case the order in render theme has no effect.

  •  

starous

Thank you both for the answers!

I will test it, but it looks like the presented rendering difference is caused by transparent color of forest (and possibly some another areas), as wrote voldapet in the first answer - because: 1. rendering order should be OK in my theme (I changed and tried it many times); 2. the map is my own "homemade" map, ie. map is created really without any tag modification, layers are unchanged and are the same as in original OSM.
Possibility of transparency setting via RGB color code is new information for me, I was missing it - thanks again, it looks very helpful.

BR,
Ales
  •