How to handle Tunnels, Ruins, Toilets with <tag k="layer" v="-#"/>

84 views
Skip to first unread message

Christian Kernbeis

unread,
Aug 23, 2012, 6:49:03 AM8/23/12
to mapsfo...@googlegroups.com
I have lots of tunnels that do not render because of beeing tagged as <tag k="layer" v="-1"/>,
after removing the layer-tag the tunnels render fine.

In my understanding tunnels do not need a layer tag because they are already rendered different in the theme.

Walking through the OSM-Database of Austria I found several layer-tags with "-" values such as:
- cave_entrance
- toilets (??)
- ruins
- boundary
- etc

So my question: From which objekts can I remove the layer-tag save and
whats the usual way to handle this issue?


best regards
Christian


Christian Kernbeis

unread,
Aug 23, 2012, 11:24:41 AM8/23/12
to mapsfo...@googlegroups.com
I just checked the tunnels on the E6 in Norway, the road disappears where ever tunnels are,
and there are a lot. Especially in the north (lat of Bodo) this looks not very pleasant as the
road disappears in the wide nothing.

It's not that problem in crowded areas with major roads,
it is one where small paths/highways cross under railways/highways.

Cleaning the layer tag (setting it as dummy) from tunnels via tagtransform solves the problem as far as there are no objekts
with layer >0 rendered above. (like the Bellevuepark in Linz/Austria over the A1).

Here is the translation.xml for tagtransform:

<?xml version="1.0"?>
<translations>
 
  <translation>
    <name>Delete layer=-1 from tunnels</name>
    <description>Delete layer=-1 from tunnels</description>
    <match>
      <tag k="highway" v=".*"/>
      <tag k="tunnel" v="yes"/>
      <tag k="layer" v=".*"/>
    </match>
    <output>
      <copy-all/>
      <tag k="layer" v="dummy"/>
    </output>
  </translation>
 
</translations>

regards
Christian

Tommi

unread,
Aug 23, 2012, 12:30:07 PM8/23/12
to mapsfo...@googlegroups.com
Hi Christian,
with the original theme of mapsforge roads in tunnels are displayed with a kind of dashed line.

Greetings,
Tommi (from the locus forum)

Thilo Mühlberg

unread,
Aug 23, 2012, 1:13:01 PM8/23/12
to mapsfo...@googlegroups.com
In your own interest - please do not replace integer numbers with the
string "dummy" or something similar, just remove the layer tag
completely or write the value zero (0). Software tools like the
map-writer might fail if there is a string rather than a valid number.

Greetings,
Thilo
signature.asc

Christian Kernbeis

unread,
Aug 23, 2012, 1:58:15 PM8/23/12
to mapsfo...@googlegroups.com
Hi Tommi,

This ist true if the tunnel is on the default layer in OSM.
If the tunnel is tagged as layer=-1 the tunnel is not rendered at all.

I received a bug-report yesterday concerning this issue and have to agree after brief investigation,
and its not an issue with the theme, tunnels without layer tag render as expected.

best regards
Christian

Tommi

unread,
Aug 23, 2012, 2:09:10 PM8/23/12
to mapsfo...@googlegroups.com
Hi Christian,
you are the expert, I have no clue how the tunnels of Madeira are tagged. But let me tell you my observation:
Your map of Madeira, the highway from airport to Funchal:
cycle_hc theme: https://www.dropbox.com/s/0kn5vnt6pxf7cfo/2012-08-23%2020.03.57.png
osmarender theme: https://www.dropbox.com/s/ya6ccefoibpcewl/2012-08-23%2020.04.25.png

Cheers,
Thomas

Christian Kernbeis

unread,
Aug 23, 2012, 4:03:48 PM8/23/12
to mapsfo...@googlegroups.com
Some tunnels are working with the osmarender theme even tagged as layer=-1, some not.
One problem solved 2 new appear...

Seeing that there is no land_polygon for Northcape Isle,
I'v decided to leave all this behind for a few days and enjoy some days in the mountains.

No Smartphone, just my old ME45 !! ;-))

Christian
Reply all
Reply to author
Forward
0 new messages