logo separator

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

From Gerd Petermann GPetermann_muenchen at hotmail.com on Thu Feb 2 13:51:05 GMT 2017

Hi all,
Andrzejs findings sound logical to me. I propose to add a check which prints an error
message  if height is used with a target unit other then ft:
Error in style: Error: height filter reqires ft (feet) as target unit: 'ft=>m'

and I can add a corresponding hint in the doc.

OK?
Gerd




________________________________________
Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> im Auftrag von Andrzej Popowski <popej at poczta.onet.pl>
Gesendet: Donnerstag, 2. Februar 2017 14:06:22
An: mkgmap-dev at lists.mkgmap.org.uk
Betreff: Re: [mkgmap-dev] Is height: filter working as described?

Hi Carols,

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.

--
Best regards,
Andrzej

_______________________________________________
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