logo separator

[mkgmap-dev] Incorrect capitalisation of first letters of every word during mkgmap style processing

From Charlie Ferrero charlie at cferrero.net on Thu Apr 29 17:57:33 BST 2010

Hi list,

I use the following style rules to add more information to the names of 
mountain peaks:

natural=peak & ele ~'[\d\s]*m' {name '${name} (${ele})' | 'Peak 
(${ele})'} [0x6616 resolution 20]
natural=peak & ele ~'[\d\s]*ft' {name '${name} (${ele})'| 'Peak 
(${ele})'} [0x6616 resolution 20]
natural=peak {name '${name} (${ele}m)' | 'Peak (${ele}m)' | '${name}' } 
[0x6616 resolution 20]

This works as I would expect, except where the original tags include a 
space between the elevation and the "ft" or "m" suffix, eg:
natural=peak
name=Mount Gizmo
ele=1200 m

This gets processed by mkgmap into a POI with the name
"Mount Gizmo (1200 M)"

Similarly,
natural=peak
name=Mount Gizmo
ele=1200 ft

Gets turned into "Mount Gizmo (1200 Ft)"

The same problem crops up when mkgmap converts a postcode from the 
addr:postcode tab.  You end up with addresses like:
Place, Some Street, Some Town, UK Sw4 0jg when it should read
Place, Some Street, Some Town, UK SW4 0JG

Thus mkgmap is capitalising the first letter of all words in names and 
addresses and lower-casing the rest, even if they were upper-case to 
start with.  Is there any way of stopping mkgmap from doing this? 
Indeed, is there a reason for it to do this in the first place.

-- 
Charlie



More information about the mkgmap-dev mailing list