Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while importing pbf #18

Open
ugochirico opened this issue Jul 1, 2017 · 4 comments
Open

Error while importing pbf #18

ugochirico opened this issue Jul 1, 2017 · 4 comments

Comments

@ugochirico
Copy link

I checked out the head version of graphhopper-ios and followed the instructions in readme.
I downloaded the pbf from geofabrik.de but when I run import-sample.sh I got this error:

666-Mac:graphhopper-ios ugos$ FILE=sud-latest.osm.pbf JAVA_OPTS="-Xmx4096m -Xms1000m -server" ./graphhopper-ios-sample/import-sample.sh
Note: checking out 'origin/master'.
....
## using java 1.8.0_131 (64bit) from 
## using existing osm file graph-data.osm.pbf
## existing jar found tools/target/graphhopper-tools-0.10-SNAPSHOT-jar-with-dependencies.jar
## now import. JAVA_OPTS=-Xmx4096m -Xms1000m -server
2017-07-01 18:31:12,500 [main] INFO  com.graphhopper.reader.osm.GraphHopperOSM - version 0.10|2017-06-25T19:47:35Z (5,14,4,3,3,2)
2017-07-01 18:31:12,513 [main] INFO  com.graphhopper.reader.osm.GraphHopperOSM - graph CH|car|RAM_STORE|2D|NoExt|,,,,, details:edges:0(0MB), nodes:0(0MB), name:(0MB), geo:0(0MB), bounds:1.7976931348623157E308,-1.7976931348623157E308,1.7976931348623157E308,-1.7976931348623157E308, CHGraph|fastest|car, shortcuts:0, nodesCH:(0MB)
2017-07-01 18:31:12,597 [main] INFO  com.graphhopper.reader.osm.GraphHopperOSM - start creating graph from graph-data.osm.pbf
2017-07-01 18:31:12,597 [main] INFO  com.graphhopper.reader.osm.GraphHopperOSM - using CH|car|RAM_STORE|2D|NoExt|,,,,, memory:totalMB:958, usedMB:25
Exception in thread "main" java.lang.RuntimeException: Problem while parsing file
	at com.graphhopper.reader.osm.OSMReader.preProcess(OSMReader.java:202)
	at com.graphhopper.reader.osm.OSMReader.readGraph(OSMReader.java:146)
	at com.graphhopper.GraphHopper.importData(GraphHopper.java:672)
	at com.graphhopper.GraphHopper.process(GraphHopper.java:641)
	at com.graphhopper.GraphHopper.importOrLoad(GraphHopper.java:619)
	at com.graphhopper.tools.Import.main(Import.java:31)
Caused by: java.lang.IllegalArgumentException: Input file is not of valid type graph-data.osm.pbf
	at com.graphhopper.reader.osm.OSMInputFile.decode(OSMInputFile.java:129)
	at com.graphhopper.reader.osm.OSMInputFile.<init>(OSMInputFile.java:56)
	at com.graphhopper.reader.osm.OSMReader.openOsmInputFile(OSMReader.java:309)
	at com.graphhopper.reader.osm.OSMReader.preProcess(OSMReader.java:163)
	... 5 more
Previous HEAD position was a2d421c4... i18n: updated several languages
Switched to branch 'ios-compat'
Your branch is up-to-date with 'origin/ios-compat
@karussell
Copy link
Member

Thanks!

To potentially answer #19 I have a question: did you use 0.9.0 to compile the project and did it work without modifications or were you using 0.8.2?

@ugochirico
Copy link
Author

ugochirico commented Jul 3, 2017

I cloned the head revision with --recursive option but it didn't cloned the dependencies recursively. So I had to clone the graphhopper repository in the "graphhopper" folder.
If I run ./graphhopper-ios-sample/import-sample.sh I get the error above.
If I run ./graphhopper.sh import sud-latest.osm.pbf I get a compilation error.
I'm completely lost and I cannot go ahead with my project

@clns
Copy link
Contributor

clns commented Jul 3, 2017

After cloning, switch to the 0.8.2 tag since master is using GraphHopper 0.9.0, but we're not there yet.

git checkout tags/0.8.2
git submodule update --recursive

@ugochirico
Copy link
Author

it doesn't work. After git submodule update --recursive nothing happens:

666-Mac:~ ugos$ git clone --recursive https://github.com/graphhopper/graphhopper-ios.git
Cloning into 'graphhopper-ios'...
remote: Counting objects: 1923, done.
remote: Total 1923 (delta 0), reused 0 (delta 0), pack-reused 1923
Receiving objects: 100% (1923/1923), 16.34 MiB | 1.09 MiB/s, done.
Resolving deltas: 100% (1141/1141), done.
fatal: No url found for submodule path 'dependencies/hppc' in .gitmodules
666-Mac:~ ugos$ cd graphhopper-ios/
666-Mac:graphhopper-ios ugos$ git checkout tags/0.8.2
Note: checking out 'tags/0.8.2'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at 8f71b20... Update GraphHopper to 0.8.2
666-Mac:graphhopper-ios ugos$ git submodule update --recursive
666-Mac:graphhopper-ios ugos$ 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants