logo separator

[mkgmap-dev] Changes to Osm5XmlHandler for binary format

From Felix Hartmann extremecarver at googlemail.com on Fri Sep 10 21:47:59 BST 2010

  On 10.09.2010 21:27, Steve Ratcliffe wrote:
> Hi
>> I think that the cycleway=opposite handling would better be implemented
>> in a style definition. If I remember correctly, the special code in
>> Osm5XmlHandler was added before "continue" or "continue_with_actions"
>> were implemented in the style processor. Doing it in the style file
>> should take less code and be easier to understand and fine-tune.
> I agree it would be better.  Can it be done with the style code as it
> is, or are changes needed?
> ..Steve
Yes it can be done (by using simple continue command (NOT continue 
with_actions). There is no need for the old code (and I doubt anyone is 
using it).

The rule would look like e.g.:

highway=residential & oneway=yes & ( cycleway=opposite | 
cycleway=opposite_lane | cycleway=opposite_track ) {set oneway=reverse) 
[0x07 road_class=..... continue]
highway=residential & oneway=reverse & ( cycleway=opposite | 
cycleway=opposite_lane | cycleway=opposite_track ) {set oneway=yes) 
[0x07 road_class=..... continue]

The only disadvantage is, that you have to do this for every 0x?? type 
seperaty, or define an invisible roadtype in the .TYP-file and use that 
one unilaterally. The big advantage, and reason why the old code is crap 
anyhow is, that you can assign different road_class/road_speed if it is 
reverse direction, because usually such ways are only good for short 
distances, but you would not like to cycle against oneway streets for 
several kilometers (cars from intersecting streets usually don't watch 
for opposite direction cyclists, so it is very dangerous, or better you 
have to ride much more careful).
> _______________________________________________
> 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