logo separator

[mkgmap-dev] relation label patch

From Mike Baggaley mike at tvage.co.uk on Sun Nov 28 16:59:31 GMT 2021

Hi Gerd,

Please find attached a small patch that allows a node tagged with a role of
label or admin_centre to be still used if it has no name defined, rather
than only if it matches the name on the relation. Also an improvement in the
diagnostic message when a role label node is not being used.

An example relation that has an unnamed role label is
http://www.openstreetmap.org/relation/10090341
An example of a relation having a differently named label role node is :
http://www.openstreetmap.org/relation/7218222

I'm getting a warning that role node
http://www.openstreetmap.org/node/2642288017 is being ignored because it has
a different name than http://www.openstreetmap.org/relation/58437

They both have name=Cymru / Wales, name:en=Wales and name:cy=Cymru, so
should match. However, at the beginning of my points, lines and relations
files I have statements to overwrite name with name:en. This gives me
name=Wales for the relation, but because at the time of processing the label
node it hasn't been processed by the points file, the name of the node is
still Cymru / Wales, thus they don't match and the role label is ignored.

It's only a minor problem, but I'm wondering whether the solution is to
introduce an optional names file (or other named file) that could be read
before reading points lines and relations and also when handling the
admin_centre and label nodes. Not sure whether there are any other places
that this approach would be beneficial.

Cheers,
Mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: relationlabel.patch
Type: application/octet-stream
Size: 1427 bytes
Desc: not available
URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20211128/80372c80/attachment.obj>


More information about the mkgmap-dev mailing list