tr bike exceptions
This commit is contained in:
parent
e629a2b2b2
commit
f15c5b923e
8 changed files with 55 additions and 5 deletions
|
|
@ -149,7 +149,11 @@ final class OsmFile
|
|||
|
||||
int crcData = Crc32.crc( ab, 0, asize - 4 );
|
||||
int crcFooter = new ByteDataReader( ab, asize - 4 ).readInt();
|
||||
if ( ( crcData ^ 2 ) == crcFooter )
|
||||
if ( crcData == crcFooter )
|
||||
{
|
||||
throw new IOException( "old, unsupported data-format" );
|
||||
}
|
||||
else if ( ( crcData ^ 2 ) == crcFooter )
|
||||
{
|
||||
return reallyDecode ? new MicroCache2( dataBuffers, lonIdx, latIdx, divisor, wayValidator, waypointMatcher ) : null;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -136,6 +136,7 @@ public class OsmNode extends OsmLink implements OsmPos
|
|||
while( mc.readBoolean() )
|
||||
{
|
||||
TurnRestriction tr = new TurnRestriction();
|
||||
tr.exceptions = mc.readShort();
|
||||
tr.isPositive = mc.readBoolean();
|
||||
tr.fromLon = mc.readInt();
|
||||
tr.fromLat = mc.readInt();
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ package btools.mapaccess;
|
|||
public final class TurnRestriction
|
||||
{
|
||||
public boolean isPositive;
|
||||
public short exceptions;
|
||||
|
||||
public int fromLon;
|
||||
public int fromLat;
|
||||
|
|
@ -17,6 +18,11 @@ public final class TurnRestriction
|
|||
|
||||
public TurnRestriction next;
|
||||
|
||||
public boolean exceptBikes()
|
||||
{
|
||||
return ( exceptions & 1 ) != 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue