Hi all,
Ive been trying to work on some style rule files and am running into
a few problems.
The rules Im using (in lines) are this:
ncn_ref=* { set ncn=yes; echo 'Converting from ${ncn_ref}'; }
( highway=bridleway | highway=byway | highway=cycleway |
highway=track | highway=footway) & ( ncn=yes | rcn=yes )
{ set offroad='yes'; echo 'Offroad route'; }
ncn=yes { echo 'Is NCN'; }
offroad=yes { echo 'Is offroad'; }
ncn=yes & offroad=yes { echo 'NCN Offroad'; set highway=ncn_offroad; }
ncn=yes & offroad!=* { echo 'NCN Onroad'; set highway=ncn_onroad; }
(As you can see I added an echo statement to aid debugging... thats
about the limit of my Java. :) )
Unfortunately, the penultimate rule (NCN Offroad) never fires.
Instead, the next one (NCN Onroad) always does.
The debug output for one way looks like this:
31346279: Is NCN
testing for offroad <-- debug statement from get in Tags
testing for offroad
31346279: NCN Onroad
31346279: Converting from 5
testing for offroad
set offroad yes <-- debug statement from perform in AddTagAction
31346279: Offroad route
31346279: Creating NCN on-road with 5 <-- highway=ncn_onroad [0x01]
31346279: Is NCN
testing for offroad
testing for offroad
31346279: NCN Onroad
31346279: Is offroad
31346279: Creating NCN on-road with 5
So although the Is offroad test is working, the next line isnt. The
fact its iterating over the rules a couple of times is a bit odd, too.
From what I can tell, get (in Tags.java) isnt coping very well with
the ExtraEntry tags. But despite poking around for a couple of hours,
Ive not pinned it down - like I say my Java knowledge is verging on
non-existent. Or maybe Im just doing something stupid with the rules.
Any clues?
cheers
Richard
_______________________________________________
mkgmap-dev mailing list
[email protected]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev