[mkgmap-dev] Style rules and 'generated' tags
From Richard Fairhurst richard at systemeD.net on Thu Jul 2 08:46:59 BST 2009
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
- Previous message: [mkgmap-dev] Commit: r1072: Undo recent change that (potentially) could create a short arc.
- Next message: [mkgmap-dev] Style rules and 'generated' tags
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the mkgmap-dev mailing list