Hi Ranko,

1) type=boundary relations are not kept complete by splitter unless you set 
corresponding options. Incomplete relations have rather unpredictable shapes.
2) the tag mkgmap:admin_level2 is set by the LocationHook. This calculates the 
center of the polygon and looks up the tags for that point. If the center is 
not inside the polygon this will fail.

There is a rule in relations which adds tag mkgmap:boundary_name. No idea if 
this can be used in polygons, it is used in lines to render the borders.

Gerd

________________________________________
Von: mkgmap-dev <[email protected]> im Auftrag von Ranko 
Jaksic <[email protected]>
Gesendet: Freitag, 19. Februar 2021 20:52
An: mkgmap-dev
Betreff: [mkgmap-dev] using mkgmap:admin_level2 in polygons

Hi,

I wanted to "display" counties using invisible polygons (so names are displayed 
when hovering in BC or GPSr).
It is a multi-country map and county definitions differ from country to country 
so I tried using mkgmap:country (mkgmap:admin_level2).

In the style manual mkgmap:admin_level2 is defined as "Name of the 
boundary=administrative relation/polygon with admin_level=2 the element is 
located in"
However, when I used the following rule in my style polygons file some counties 
were skipped:

mkgmap:admin_level2=HRV & boundary=administrative & admin_level=6 & name=* 
[0x16 resolution 14]

Using echotags I found that mkgmap:admin_level2 was set.
However, some of the counties had it set to neighbouring country codes (SVN, 
BIH, SRB) and didn't pass.

Example county:
https://www.openstreetmap.org/relation/226749

Actually, splitter splits the map into more then one tile, so the county gets 
split too.
In some of the tiles mkgmap:admin_level2 gets set to HRV (as expected), but in 
others it is set to BIH

I used the latest bounds file (20210212) and a custom OSM-map area, but the 
same happened when testing with croatia-latest.osm.pbf

What am I missing?

regards,
Ranko

_______________________________________________
mkgmap-dev mailing list
[email protected]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________
mkgmap-dev mailing list
[email protected]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Reply via email to