[talk-au] Academic question about tags

Andy Townsend ajt1047 at gmail.com
Thu Apr 29 11:10:22 UTC 2021


On 29/04/2021 10:49, Bob Cameron wrote:
>
> Are there ever any problems "mixing/adding" what would commonly be 
> separate tags for the one entity?
>
Yes.  I can give you an example from the perspective of one map renderer.

The "amenity=pub; tourism=hotel" combination is pretty common in lots of 
places.  For a map that I created I had to decide what to show them as, 
so for pubs that are both I decided to show them as pubs.  The code that 
does this in my case is at 
https://github.com/SomeoneElseOSM/SomeoneElse-style/blob/ba9a9be18426fb776289e99758a055241fc7e194/style.lua#L1894 
(that's fairly easy to understand, even if you don't understand the 
language).

You'll notice that that also adds an "accommodation=yes" tag internally 
(not to the data in OSM), and that causes the "blue hotel-like roof" 
that you see on pubs such as like 
https://map.atownsend.org.uk/maps/map/map.html#zoom=20&lat=54.4356236&lon=-0.766422 
(https://www.openstreetmap.org/node/248811440 in OSM).

Obviously a map that was more interested in showing places to stay 
rather than places to drink would show something like that as a hotel 
rather than a pub.  OSM's "standard" map tiles are an example that shows 
that as a hotel rather than a pub.


>
> I am thinking in terms of rendering, mkgmap or other downstream uses. 
> I guess there would be an icon/avatar precedence issue but I wonder 
> what else.
>
>
If you're "counting hotels" and "counting pubs" and adding the two 
together than you'll get a higher number than "counting the things that 
are either hotels or pubs" - it's up to the person doing the counting to 
ensure that they don't make that mistake if they want an accurate number 
(of what is mapped in OSM so far).

If there are two POIs close together the count will be OK but renderers 
will still need to decide which to show.  They might have a concept of 
layers, or or concept of an order to display things within layers, but 
any automatic process will produce oddities.  Have a look at what cities 
appear in the Netherlands at 
https://www.openstreetmap.org/#map=7/52.308/4.724 at different zoom 
levels - the administrative capital (Den Haag) disappears and reappears, 
because it overlaps with other features.

Best Regards,

Andy






More information about the Talk-au mailing list