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

added pbf parser classes #64

Merged
merged 1 commit into from
May 30, 2013
Merged

added pbf parser classes #64

merged 1 commit into from
May 30, 2013

Conversation

NopMap
Copy link
Contributor

@NopMap NopMap commented May 30, 2013

transparently integrated pbf parsing into OSMInputFile
added dependencies for protobuf and osm-binary

transparently integrated pbf parsing into OSMInputFile
added dependencies for protobuf and osm-binary
@karussell
Copy link
Member

Yeah, my cores are now nearly saturated while import and germany takes 8minutes instead ~24! I'll test for world wide later on.

So far - a really nice improvement better than I hoped! Thanks again!

@karussell karussell merged commit f8bfd06 into graphhopper:master May 30, 2013
@karussell
Copy link
Member

I'll test for world wide later on.

oh it looks like planet data is only available in osm.bz2 http://planet.osm.org/planet/ !? So we need the threading also for osm files + the apache-compress thing (yet another 250kb)

What do you think about moving away the import stuff into a separate module? It'll complicate things a bit but the user running the script should notive about this. (also the integrations tests for the import will then be moved)

@woodpeck
Copy link

World-wide PBFs are available in the "pbf" subdirectory. - I came here becaue I received an error message trying to parse a PBF file with the 0.1 version ("java.lang.IllegalArgumentException: Input file is not of valid type europe.osm.pbf") - has the PBF reader code not yet been intgrated?

@karussell
Copy link
Member

I already found those planet pbfs and they should be no problem. E.g. you should be able to try

./graphhopper.sh import europe_germany_berlin.pbf

Are you sure the pbf location is correct?

@woodpeck
Copy link

If I run graphhopper.sh with the name of a non-existent file, it will either complain "input file cannot be empty", or if the file ends in .osm offer to download it. I have used the file name "europe.osm.pbf", which is present in the current directory, and it starts the parser and then immediately terminates:

2013-07-23 13:04:56,595 [main] INFO  com.graphhopper.GraphHopper - start creating graph from europe.osm.pbf
2013-07-23 13:04:56,600 [main] INFO  com.graphhopper.GraphHopper - using LevelGraphStorage|CAR|RAM_STORE|,,,,, memory:totalMB:958, usedMB:5
Exception in thread "main" java.lang.RuntimeException: Problem while parsing file
    at com.graphhopper.reader.OSMReader.preProcess(OSMReader.java:128)
    at com.graphhopper.reader.OSMReader.doOSM2Graph(OSMReader.java:77)
    at com.graphhopper.GraphHopper.importOSM(GraphHopper.java:418)
    at com.graphhopper.GraphHopper.importOSM(GraphHopper.java:384)
    at com.graphhopper.GraphHopper.importOrLoad(GraphHopper.java:368)
    at com.graphhopper.GraphHopper.main(GraphHopper.java:56)
Caused by: java.lang.IllegalArgumentException: Input file is not of valid type europe.osm.pbf
    at com.graphhopper.reader.OSMInputFile.decode(OSMInputFile.java:140)
    at com.graphhopper.reader.OSMInputFile.<init>(OSMInputFile.java:54)
    at com.graphhopper.reader.OSMReader.preProcess(OSMReader.java:97)

@karussell
Copy link
Member

Hmmh, would you create a new issue? Please append the information you already posted here and additionally I would like to know:

  • your OS + bash version
  • Will it trigger a download when you start ./graphhopper.sh import europe_germany_berlin.pbf
  • If it does not trigger a download. Please download berlin.pbf manually and let me know if it will work for berlin

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

Successfully merging this pull request may close these issues.

None yet

3 participants