Integrate access information in RoadInformation.
This commit is contained in:
@@ -154,7 +154,8 @@ public class BinaryGraphReaderInsa2018 extends BinaryReader implements GraphRead
|
||||
float dlon = (dis.readShort()) / 2.0e5f;
|
||||
float dlat = (dis.readShort()) / 2.0e5f;
|
||||
|
||||
points.add(new Point(lastPoint.getLongitude() + dlon, lastPoint.getLatitude() + dlat));
|
||||
points.add(new Point(lastPoint.getLongitude() + dlon,
|
||||
lastPoint.getLatitude() + dlat));
|
||||
}
|
||||
|
||||
points.add(nodes.get(destNode).getPoint());
|
||||
@@ -193,7 +194,12 @@ public class BinaryGraphReaderInsa2018 extends BinaryReader implements GraphRead
|
||||
private RoadInformation readRoadInformation() throws IOException {
|
||||
char type = (char) dis.readUnsignedByte();
|
||||
int x = dis.readUnsignedByte();
|
||||
return new RoadInformation(toRoadType(type), (x & 0x80) > 0, (x & 0x7F) * 5, dis.readUTF());
|
||||
int access = 0xFF00;
|
||||
if (getCurrentVersion() >= 6) {
|
||||
access = dis.readUnsignedShort();
|
||||
}
|
||||
return new RoadInformation(toRoadType(type), access, (x & 0x80) > 0, (x & 0x7F) * 5,
|
||||
dis.readUTF());
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user