This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

How to overlay only the relations like transport map

0

Hi Guys,

I'm new with openstreetmap and I want to overlay on the map only the relations. Is there a way to do this using the renderTheme ?

Tanks

asked 09 Apr '13, 19:36

Thiago%20Lima's gravatar image

Thiago Lima
1111
accept rate: 0%

It's not entirely sure what you mean. A little web searching suggests that you might be asking about MapsForge - would it be possible to expand the question a bit?

(09 Apr '13, 19:48) SomeoneElse ♦

Yes,

I have an .osm file that has some tags called ralation. This tags represent buslines on the map. I need to make a renderTheme to highlight the "relations" on the map, however the renderTheme.xsd allows to make it only for "ways" and "nodes". In the openStreetMap official website it is possible to see a Transport Map. I want exactly that, but I don't see how to! =s

(09 Apr '13, 20:01) Thiago Lima

One Answer:

1

In OpenStreetMap, a relation is a collection of nodes and ways. A relation does not have a longitude or latitude, but the nodes and ways in, do have them. There are different types of relations, see https://wiki.openstreetmap.org/wiki/Relations.

When you created your .osm file with a Overpass Query, you can "extend" the relation so you retrieve the nodes and ways in it. https://wiki.openstreetmap.org/wiki/Overpass_API/Language_Guide. But it is also possible that your .osm file already has the nodes and ways in the relation.

answered 10 Apr '13, 04:32

escada's gravatar image

escada
19.0k16166302
accept rate: 21%

Yes,

My .osm file already have nodes and ways related with the relations. The problem is how to specify that the relations should be highlighted by the mapsforge engine. Currently I did a script to add special tags into the way tags, but I don't know if it's the better.

Thanks

(11 Apr '13, 17:58) Thiago Lima

Source code available on GitHub .