File tree Expand file tree Collapse file tree 3 files changed +8
-5
lines changed
src/main/java/de/jetsli/graph Expand file tree Collapse file tree 3 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ elif [ "$FILE" = "germany" ]; then
28
28
LINK=http://download.geofabrik.de/osm/europe/germany.osm.bz2
29
29
30
30
# For import we need a lot more memory. For the mmap storage you need to lower this in order to use off-heap memory.
31
- JAVA_OPTS_IMPORT=" -XX:PermSize=20m -XX:MaxPermSize=20m -Xmx2700m -Xms2700m"
31
+ JAVA_OPTS_IMPORT=" -XX:PermSize=10m -XX:MaxPermSize=10m -Xmx2700m -Xms2700m"
32
32
JAVA_OPTS=" -XX:PermSize=20m -XX:MaxPermSize=20m -Xmx2700m -Xms2700m"
33
33
SIZE=35000000
34
34
else
Original file line number Diff line number Diff line change 15
15
*/
16
16
package de .jetsli .graph .reader ;
17
17
18
- import de .jetsli .graph .routing .DijkstraBidirectionRef ;
18
+ import de .jetsli .graph .routing .DijkstraBidirection ;
19
19
import de .jetsli .graph .storage .Storage ;
20
20
import de .jetsli .graph .util .CalcDistance ;
21
21
import de .jetsli .graph .routing .Path ;
@@ -128,8 +128,8 @@ public void doDijkstra(int runs) throws Exception {
128
128
Location2IDIndex index = new Location2IDQuadtree (g ).prepareIndex (20000 );
129
129
double minLat = 49.484186 , minLon = 8.974228 ;
130
130
double maxLat = 50.541363 , maxLon = 10.880356 ;
131
- RoutingAlgorithm algo = new DijkstraBidirectionRef (g );
132
- // RoutingAlgorithm algo = new DijkstraBidirection(g);
131
+ // RoutingAlgorithm algo = new DijkstraBidirectionRef(g);
132
+ RoutingAlgorithm algo = new DijkstraBidirection (g );
133
133
// RoutingAlgorithm algo = new DijkstraSimple(g);
134
134
// RoutingAlgorithm algo = new AStar(g);
135
135
Original file line number Diff line number Diff line change @@ -126,8 +126,11 @@ private void ensureEdgePointer(int pointer) {
126
126
private void ensureNodeIndex (int index ) {
127
127
if (index < size )
128
128
return ;
129
+
129
130
size = index + 1 ;
130
-
131
+ if (size <= lats .length )
132
+ return ;
133
+
131
134
int cap = Math .max (10 , Math .round (size * FACTOR ));
132
135
// TODO deletedNodes = copy(deletedNodes, cap);
133
136
lats = Arrays .copyOf (lats , cap );
You can’t perform that action at this time.
0 commit comments