logo separator

[mkgmap-dev] Is height: filter working as described?

From Gerd Petermann GPetermann_muenchen at hotmail.com on Fri Feb 3 07:32:42 GMT 2017

I'd prefer not to change the syntax because that would break backward compatibility.

Attached is a small patch which allows to use height without an argument. If an arg is given it must use
ft or feet as target. The doc is changed accordingly.
I've also tried to fix a problem in the docu for conv.

If I hear no complains I'll commit this tomorrow.


Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> im Auftrag von Steve Ratcliffe <steve at parabola.me.uk>
Gesendet: Donnerstag, 2. Februar 2017 22:52:09
An: Development list for mkgmap
Betreff: Re: [mkgmap-dev] Is height: filter working as described?

Hi Andrzej

That is exactly right.

In particular I agree that it should be {ele|height:m} as it
has to have feet as the target unit.  Since the default unit in OSM
is meters even the :m part could be defaulted.


> some guessing on my part, hope someone corrects if I'm wrong.
> As I understand, elevations in img are stored in feet.
> Filters hight:m=>ft and conv:m=>ft indicate, that value from source has
> to be converted into feet, as expected by img format.
> When you look at map, you see height units according to settings in GPS.
> You can set meters or feet. So for hight:m=>ft, these values are correct:
> ele=500, map: ", 500 m" = 1650ft, default conversion
> ele=500m, map: ", 500 m" = 1650ft, converted form meters
> ele=500ft, map: ", 152 m" = 499ft, preserved feet
> Settings in GPS are valid only for some objects types and label content.
> Conversion in GPS is done, when label starts with numeric or numeric is
> prefixed by special separator (it is [0x1f] for cgpsmapper). I guess
> filter "hight:" adds separator and GPS converts it to ", ".
> Now filter hight:ft=>m seems to be kind of useless. It converts feet to
> meters, stores this value in img and adds a prefix, indicating that
> value is in feet. What we need here, is no conversion but separator
> only. Maybe something like this could work: {ele|height:ft=>ft}.
> Actually it always should be feet as a destination for height, we could
> simplify this filter like this: {ele|height:m} or {ele|height:ft},
> indicating only default unit in source data.

mkgmap-dev mailing list
mkgmap-dev at lists.mkgmap.org.uk
-------------- next part --------------
A non-text attachment was scrubbed...
Name: height.patch
Type: application/x-download
Size: 2114 bytes
Desc: height.patch
URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20170203/80b37d36/attachment.bin>

More information about the mkgmap-dev mailing list