Browse Source

Fix precision issue with real and as the crow flies length.

Mikaël Capelle 2 years ago
parent
commit
423e36fc65
1 changed files with 3 additions and 0 deletions
  1. 3
    0
      src/main/org/insa/graph/io/BinaryGraphReader.java

+ 3
- 0
src/main/org/insa/graph/io/BinaryGraphReader.java View File

@@ -249,6 +249,9 @@ public class BinaryGraphReader extends BinaryReader implements GraphReader {
249 249
                 }
250 250
                 maxLength = Math.max(length, maxLength);
251 251
 
252
+                length = Math.max(length, (float) Point.distance(nodes.get(node).getPoint(),
253
+                        nodes.get(destNode).getPoint()));
254
+
252 255
                 // Number of segments.
253 256
                 int nbSegments = dis.readUnsignedShort();
254 257
 

Loading…
Cancel
Save