logo separator

[mkgmap-dev] relation label patch

From Mike Baggaley mike at tvage.co.uk on Mon Nov 29 13:05:28 GMT 2021

Hi Gerd,

I do use --housenumbers. Is my name processing likely to be causing problems
in Wales? I only occasionally go to Wales, so probably wouldn't have noticed
any issue.

Cheers,
Mike

-----Original Message-----
From: Gerd Petermann [mailto:gpetermann_muenchen at hotmail.com] 
Sent: 29 November 2021 10:18
To: Development list for mkgmap <mkgmap-dev at lists.mkgmap.org.uk>
Subject: Re: [mkgmap-dev] relation label patch

Hi Mike,

OK, that's something I didn't think about before. You probably don't use the
--housenumbers option?

Gerd

________________________________________
Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> im Auftrag von Mike
Baggaley <mike at tvage.co.uk>
Gesendet: Montag, 29. November 2021 11:08
An: 'Development list for mkgmap'
Betreff: Re: [mkgmap-dev] relation label patch

HI Gerd, in Wales many of the names are put as dual nationality in the name
field with name:en and name:cy holding the English and Welsh variants. I use
just the English as the name if there is one, but also add the Welsh name as
another label for roads and places.

In my points and lines files I have:
# set English variant as main name and Welsh variant as secondary in Wales
name=* & name:en=* & name:cy!=* & name:en!=$name &
mkgmap:admin_level4='Wales' {set name:cy='${name}'}
name:cy=* & mkgmap:admin_level4!='Wales' {delete name:cy}
name:en=* & name:en!=$name & mkgmap:option:non-uk!=true {set
name='${name:en}'}
name=$name:cy {delete name:cy}

In my polygons and relations files I just have:
name:en=* & mkgmap:admin_level4='Wales' {set name='${name:en}'}

I don't think this can be achieved with --name-tag-list.

Cheers,
Mike

-----Original Message-----
From: Gerd Petermann [mailto:gpetermann_muenchen at hotmail.com]
Sent: 28 November 2021 17:18
To: Development list for mkgmap <mkgmap-dev at lists.mkgmap.org.uk>
Subject: Re: [mkgmap-dev] relation label patch

Hi Mike,

> I have statements to overwrite name with name:en
The nomal way is to use option --name-tag-list. What's the reason for this
trick?

Gerd

________________________________________
Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> im Auftrag von Mike
Baggaley <mike at tvage.co.uk>
Gesendet: Sonntag, 28. November 2021 17:59
An: 'Development list for mkgmap'
Betreff: [mkgmap-dev] relation label patch

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


_______________________________________________
mkgmap-dev mailing list
mkgmap-dev at lists.mkgmap.org.uk
https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev




More information about the mkgmap-dev mailing list