[GraphHopper] Android : IllegalStateException: Version of edges unsupported
Alex
azlist1 at gmail.com
Fri Jul 19 00:40:02 UTC 2013
Hi !
I 'm trying to integrate graphhopper in my android app. I'm pretty
confident i'm almost there but I have a strange error when trying to
initialize GraphHopper.
07-22 04:23:05.766: W/System.err(25784): java.lang.IllegalStateException:
Version of edges unsupported: 2, expected:1
07-22 04:23:05.766: W/System.err(25784): at
com.graphhopper.storage.StorableProperties.check(StorableProperties.java:133)
07-22 04:23:05.766: W/System.err(25784): at
com.graphhopper.storage.StorableProperties.checkVersions(StorableProperties.java:119)
07-22 04:23:05.766: W/System.err(25784): at
com.graphhopper.GraphHopper.load(GraphHopper.java:433)
07-22 04:23:05.766: W/System.err(25784): at ...
I imported the git repo as per instructions, then I created my own route
files using the following command in cygwin :
$ ./graphhopper.sh import barcelona_clean.osm.pbf
which resulted in the GH files being propperly created with the following
output in cygwin :
$ ./graphhopper.sh import barcelona_clean.osm.pbf
## using java 1.7.0_06 (64bit) from R:\JAVA\JDK7-x64
## using existing osm file barcelona_clean.osm.pbf
## now building graphhopper jar:
core/target/graphhopper-0.1-SNAPSHOT-jar-with-d
ependencies.jar
## using maven at C:/Program Files (x86)/Maven
cygwin warning:
MS-DOS style path detected: C:/Program Files (x86)/Maven/bin/mvn
Preferred POSIX equivalent is: /cygdrive/c/Program Files
(x86)/Maven/bin/mvn
CYGWIN environment variable option "nodosfilewarning" turns off this
warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
## now import. JAVA_OPTS=-XX:PermSize=60m -XX:MaxPermSize=60m -Xmx1000m
-Xms1000
m
2013-07-18 12:30:30,166 [main] INFO com.graphhopper.GraphHopper - version
0.1|2
013-07-18T12:29 (1,2,1,1)
2013-07-18 12:30:30,173 [main] INFO com.graphhopper.GraphHopper - graph
edges:0
(0), nodes:0(0), geo:1(0),
bounds:1.7976931348623157E308,-1.7976931348623157E308
,1.7976931348623157E308,-1.7976931348623157E308
2013-07-18 12:30:30,173 [main] INFO com.graphhopper.GraphHopper - start
creatin
g graph from barcelona_clean.osm.pbf
2013-07-18 12:30:30,177 [main] INFO com.graphhopper.GraphHopper - using
LevelGr
aphStorage|RAMDirectory|1,2,1,1, accepts:CAR, memory:totalMB:958,
usedMB:7
2013-07-18 12:30:31,480 [main] INFO graphhopper.reader.OSMReader -
creating gra
ph. Found nodes (pillar+tower):320 732, totalMB:958, usedMB:206
2013-07-18 12:30:32,004 [main] INFO graphhopper.reader.OSMReader - 811
208, now
parsing ways
2013-07-18 12:30:32,447 [main] INFO graphhopper.reader.OSMReaderHelper -
finish
ed way processing. nodes: 66666, osmIdMap.size:320732, osmIdMap:3MB,
osmIdMap.to
String:Height:3, entries:2502 totalMB:958, usedMB:173
2013-07-18 12:30:32,448 [main] INFO graphhopper.reader.OSMReader - Times
Pass1:
1302 Pass2: 968 Total:2270
2013-07-18 12:30:32,448 [main] INFO com.graphhopper.GraphHopper - start
finding
subnetworks, totalMB:958, usedMB:173
2013-07-18 12:30:32,506 [main] INFO routing.util.PrepareRoutingSubnetworks
- op
timize to remove subnetworks(246), zero-degree-nodes(0)
2013-07-18 12:30:32,544 [main] INFO com.graphhopper.GraphHopper - edges:
95567,
nodes 65950, there were 246 subnetworks. removed them => 716 less
nodes. Remain
ing subnetworks:1
2013-07-18 12:30:32,544 [main] INFO com.graphhopper.GraphHopper -
optimizing ..
. (totalMB:958, usedMB:184)
2013-07-18 12:30:32,544 [main] INFO com.graphhopper.GraphHopper - finished
opti
mize (totalMB:958, usedMB:184)
2013-07-18 12:30:32,544 [main] INFO com.graphhopper.GraphHopper - calling
prepa
re.doWork ... (totalMB:958, usedMB:184)
2013-07-18 12:30:33,209 [main] INFO
routing.ch.PrepareContractionHierarchies -
1, nodes: 65 950, shortcuts:0,
dijkstras:257 776, t(dijk):0, t(period):0, t(lazy
):0, t(neighbor):0,
meanDegree:1, totalMB:958, usedMB:39
2013-07-18 12:30:33,303 [main] INFO
routing.ch.PrepareContractionHierarchies -
2, nodes: 61 554, shortcuts:1
805, dijkstras:267 924, t(dijk):0, t(period):0, t(
lazy):0, t(neighbor):0,
meanDegree:0, totalMB:958, usedMB:47
2013-07-18 12:30:33,352 [main] INFO
routing.ch.PrepareContractionHierarchies -
3, nodes: 57 158, shortcuts:2
007, dijkstras:270 325, t(dijk):0, t(period):0, t(
lazy):0, t(neighbor):0,
meanDegree:1, totalMB:958, usedMB:51
2013-07-18 12:30:33,863 [main] INFO
routing.ch.PrepareContractionHierarchies -
4, nodes: 52 762, shortcuts:6
752, dijkstras:494 865, t(dijk):0, t(period):0, t(
lazy):0, t(neighbor):0,
meanDegree:1, totalMB:958, usedMB:157
2013-07-18 12:30:33,896 [main] INFO
routing.ch.PrepareContractionHierarchies -
5, nodes: 48 366, shortcuts:9
857, dijkstras:504 094, t(dijk):0, t(period):0, t(
lazy):0, t(neighbor):0,
meanDegree:1, totalMB:958, usedMB:163
2013-07-18 12:30:33,952 [main] INFO
routing.ch.PrepareContractionHierarchies -
6, nodes: 43 970, shortcuts:19
602, dijkstras:529 620, t(dijk):0, t(period):0, t
(lazy):0, t(neighbor):0,
meanDegree:1, totalMB:958, usedMB:178
2013-07-18 12:30:34,404 [main] INFO
routing.ch.PrepareContractionHierarchies -
7, nodes: 39 574, shortcuts:29
164, dijkstras:750 147, t(dijk):0, t(period):0, t
(lazy):0, t(neighbor):0,
meanDegree:2, totalMB:958, usedMB:36
2013-07-18 12:30:34,465 [main] INFO
routing.ch.PrepareContractionHierarchies -
8, nodes: 35 178, shortcuts:35
330, dijkstras:773 598, t(dijk):0, t(period):0, t
(lazy):0, t(neighbor):0,
meanDegree:1, totalMB:958, usedMB:51
2013-07-18 12:30:34,580 [main] INFO
routing.ch.PrepareContractionHierarchies -
9, nodes: 30 782, shortcuts:43
470, dijkstras:802 932, t(dijk):0, t(period):0, t
(lazy):0, t(neighbor):0,
meanDegree:2, totalMB:958, usedMB:75
2013-07-18 12:30:35,061 [main] INFO
routing.ch.PrepareContractionHierarchies -
10, nodes: 26 386, shortcuts:47
821, dijkstras:978 899, t(dijk):0, t(period):0,
t(lazy):0, t(neighbor):0,
meanDegree:2, totalMB:958, usedMB:183
2013-07-18 12:30:35,167 [main] INFO
routing.ch.PrepareContractionHierarchies -
11, nodes: 21 990, shortcuts:54
840, dijkstras:1 010 166, t(dijk):0, t(period):0
, t(lazy):0, t(neighbor):0,
meanDegree:2, totalMB:958, usedMB:204
2013-07-18 12:30:35,352 [main] INFO
routing.ch.PrepareContractionHierarchies -
12, nodes: 17 594, shortcuts:68
080, dijkstras:1 070 720, t(dijk):0, t(period):0
, t(lazy):0, t(neighbor):0,
meanDegree:2, totalMB:958, usedMB:243
2013-07-18 12:30:35,950 [main] INFO
routing.ch.PrepareContractionHierarchies -
13, nodes: 13 198, shortcuts:78
948, dijkstras:1 267 874, t(dijk):0, t(period):0
, t(lazy):0, t(neighbor):0,
meanDegree:2, totalMB:962, usedMB:106
2013-07-18 12:30:36,215 [main] INFO
routing.ch.PrepareContractionHierarchies -
14, nodes: 8 802, shortcuts:88
603, dijkstras:1 339 905, t(dijk):0, t(period):0,
t(lazy):0, t(neighbor):0,
meanDegree:3, totalMB:962, usedMB:152
2013-07-18 12:30:36,653 [main] INFO
routing.ch.PrepareContractionHierarchies -
15, nodes: 5 191, shortcuts:100
263, dijkstras:1 464 266, t(dijk):0, t(period):0
, t(lazy):0, t(neighbor):0,
meanDegree:3, totalMB:962, usedMB:225
2013-07-18 12:30:37,513 [main] INFO
routing.ch.PrepareContractionHierarchies -
16, nodes: 2 241, shortcuts:111
111, dijkstras:1 713 431, t(dijk):0, t(period):0
, t(lazy):0, t(neighbor):0,
meanDegree:3, totalMB:961, usedMB:93
2013-07-18 12:30:38,507 [main] INFO
routing.ch.PrepareContractionHierarchies -
new shortcuts 122345,
FASTEST|CAR, CAR, removeHigher2LowerEdges:true, dijkstras:
2015151,
t(dijk):0, t(period):0, t(lazy):0, t(neighbor):0, t(all):5, meanDegree:
1,
periodic:3, lazy:10, neighbor:20
2013-07-18 12:30:38,508 [main] INFO com.graphhopper.GraphHopper - flushing
grap
h edges:217 912(8), nodes:65 950(2), geo:441 702(2),
bounds:1.8359998651444882,2
.4119899215994014,41.23799986179173,41.58098995494075, totalMB:961,
usedMB:214)
2013-07-18 12:30:38,711 [main] INFO storage.index.Location2NodesNtree -
locatio
n index created in 0.16902746s, size:72 780, leafs:2 676,
precision:500, depth:3
, entries:[64, 16, 4], entriesPerLeaf:27.19731
2013-07-18 12:30:38,712 [main] INFO
routing.util.RoutingAlgorithmSpecialAreaTes
ts - Location2NodesNtreeLG
index. Size:1.0 MB, took:3.9024E-5
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
Picked up _JAVA_OPTIONS: -Djava.net.preferIPv4Stack=true
The files / GH directory are propperly found by my app on the android side
but somehow there seems to be a version mismatch somewhere ... I can't
figure out why ?
The commands used to load graphhopper is :
GraphHopper tmpHopp = new GraphHopper().forMobile();
tmpHopp.chShortcuts(true, true);
tmpHopp.load(app.getOpenedBookRoutingFolder() );
What am I doing wrong ?
Thanks a lot for helping : )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/graphhopper/attachments/20130719/eaedf2c2/attachment.html>
More information about the GraphHopper
mailing list