Author Topic: Tunnels - custom versus internal themes  (Read 2954 times)

Offline starous

  • Newbie
  • *
  • Posts: 6
    • View Profile
  • Device: SAMSUNG Galaxy Ace (La Fleur)
Tunnels - custom versus internal themes
« on: January 26, 2014, 15:27:08 »
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
« Last Edit: June 09, 2016, 10:54:44 by gynta »
 

Offline jusc

  • Global Moderator
  • Professor of Locus
  • *****
  • Posts: 1898
  • Thanked: 19 times
    • View Profile
  • Device: Samsung Galaxy S2 and Note 2
Re: [Themes] Tunnels - custom versus internal themes
« Reply #1 on: January 26, 2014, 16:31:37 »
Can you give an example, maybe with a screenshot?
Regards J.
 

Offline starous

  • Newbie
  • *
  • Posts: 6
    • View Profile
  • Device: SAMSUNG Galaxy Ace (La Fleur)
Re: [Themes] Tunnels - custom versus internal themes
« Reply #2 on: January 27, 2014, 17:14:53 »
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
« Last Edit: January 27, 2014, 17:28:50 by gynta »
 

Offline voldapet

  • Administrator
  • Padavan of Locus
  • *****
  • Posts: 488
  • Thanked: 11 times
    • View Profile
Re: [Themes] Tunnels - custom versus internal themes
« Reply #3 on: January 27, 2014, 20:30:15 »
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.
 

Offline john_percy

  • Master of Locus
  • ****
  • Posts: 698
  • Thanked: 96 times
    • View Profile
  • Device: MotoG
Re: [Themes] Tunnels - custom versus internal themes
« Reply #4 on: January 28, 2014, 09:17:13 »
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.
 

Offline voldapet

  • Administrator
  • Padavan of Locus
  • *****
  • Posts: 488
  • Thanked: 11 times
    • View Profile
Re: [Themes] Tunnels - custom versus internal themes
« Reply #5 on: January 28, 2014, 10:53:32 »
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.

 

Offline starous

  • Newbie
  • *
  • Posts: 6
    • View Profile
  • Device: SAMSUNG Galaxy Ace (La Fleur)
Re: [Themes] Tunnels - custom versus internal themes
« Reply #6 on: January 28, 2014, 21:22:54 »
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