From 1cee6f31397f2a8f527000682f0aafa8947bc400 Mon Sep 17 00:00:00 2001 From: Arndt Brenschede Date: Fri, 20 Oct 2017 21:23:23 +0200 Subject: [PATCH] supress TRs with from or to not containiong via node --- .../main/java/btools/mapcreator/OsmNodeP.java | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/brouter-map-creator/src/main/java/btools/mapcreator/OsmNodeP.java b/brouter-map-creator/src/main/java/btools/mapcreator/OsmNodeP.java index 486a347..dde2704 100644 --- a/brouter-map-creator/src/main/java/btools/mapcreator/OsmNodeP.java +++ b/brouter-map-creator/src/main/java/btools/mapcreator/OsmNodeP.java @@ -174,13 +174,16 @@ public class OsmNodeP extends OsmLinkP RestrictionData r = getFirstRestriction(); while( r != null ) { - mc.writeBoolean( true ); // restriction follows - mc.writeShort( r.exceptions ); - mc.writeBoolean( r.isPositive ); - mc.writeInt( r.fromLon ); - mc.writeInt( r.fromLat ); - mc.writeInt( r.toLon ); - mc.writeInt( r.toLat ); + if ( r.fromLon != 0 && r.toLon != 0 ) + { + mc.writeBoolean( true ); // restriction follows + mc.writeShort( r.exceptions ); + mc.writeBoolean( r.isPositive ); + mc.writeInt( r.fromLon ); + mc.writeInt( r.fromLat ); + mc.writeInt( r.toLon ); + mc.writeInt( r.toLat ); + } r = r.next; } mc.writeBoolean( false ); // end restritions