supress TRs with from or to not containiong via node

This commit is contained in:
Arndt Brenschede 2017-10-20 21:23:23 +02:00
parent 638ce5bbd7
commit 1cee6f3139

View file

@ -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