logo separator

[mkgmap-dev] rounding hyper-accurate elevations ${ele}

From Gerd Petermann gpetermann_muenchen at hotmail.com on Wed Feb 12 13:23:07 GMT 2020

Hi J J
The default style uses this rule:

natural=peak {name '${name|def:}${ele|height:m=>ft|def:}'} [0x6616 resolution 24]

AFAIK it works fine?

Gerd

________________________________________
Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> im Auftrag von Gerd Petermann <gpetermann_muenchen at hotmail.com>
Gesendet: Mittwoch, 12. Februar 2020 14:09
An: Development list for mkgmap
Betreff: Re: [mkgmap-dev] rounding hyper-accurate elevations ${ele}

Hi,

I think the conv filter does what you want.

Gerd

________________________________________
Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> im Auftrag von J J <joern.de at gmail.com>
Gesendet: Mittwoch, 12. Februar 2020 13:42
An: Development list for mkgmap
Betreff: [mkgmap-dev] rounding hyper-accurate elevations ${ele}

I was slightly surprised when I discovered the altitude "241.934997558594" on my map. This is actually the hyper-accurate information from the database: https://www.openstreetmap.org/node/32969675 (there's any more such examples). Since I do not know the reason for this value, I don't want to change the database.
Does mkgmap provide a function similar to Math.round() or should I simply use ${ele|part:".:1"} to skip the decimals?
_______________________________________________
mkgmap-dev mailing list
mkgmap-dev at lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


More information about the mkgmap-dev mailing list