logo separator

[mkgmap-dev] style file reader error

From Gerd Petermann GPetermann_muenchen at hotmail.com on Fri Jul 28 07:46:12 BST 2017

Hi Mike,

I agree that both rules should either produce the same result or the 1st should produce an error message.
The current code changes the 1st rule to
highway=* & (highway!=.... )
while the 2nd one is changed to
name=* & (name~ ... )

I am not sure why the 1st rule is changed like that, I found no hint in the documentation that 
highway!=something   implies  highway=*
and I think it makes no sense.
It would probably be better to treat highway!=something  like highway!=* when it appears as first term ?

Gerd

________________________________________
Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> im Auftrag von Mike Baggaley <mike at tvage.co.uk>
Gesendet: Donnerstag, 27. Juli 2017 18:53:28
An: mkgmap-dev at lists.mkgmap.org.uk
Betreff: [mkgmap-dev] style file reader error

Hi, I seem to have found a bug in the style file reader - it does not appear
to work correctly if the first term is a not equals term. For example, with
the following two rules only the latter one correctly triggers:

highway!=bus_stop & name~'(?i)ferry terminal' {echotags 'Trigger 1'}
name~'(?i)ferry terminal' & highway!=bus_stop {echotags 'Trigger 2'}

returning as an example
PolygonPOINode generated from 100221082 [amenity=parking,
mkgmap:admin_level7=Pembroke Dock, mkgmap:area2poi=true, name=Ferry
Terminal] Trigger 2

I think it is failing to match when there is no highway tag at all.
If you start with highway!=* as your first term in a rule, the style reader
throws it out as not valid with "Cannot start rule with tag!=*" and I think
this may be related.

Regards,
Mike

_______________________________________________
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