Reader gfts problem, please help me

Hi everyone,
I followed this https://github.com/graphhopper/graphhopper/tree/1.0/reader-gtfs

but doesn’t work.

the steps are:

  1. git clone https://github.com/graphhopper/graphhopper

  2. cd graphhopper

  3. git checkout 1.0

4)wget gtfs-vbb.zip

5)wget brandenburg-latest.osm.pbf
6)./graphhopper.sh build

  1. java -Xmx8g -Xms8g
    -Ddw.graphhopper.datareader.file=brandenburg-latest.osm.pbf
    -Ddw.graphhopper.gtfs.file=gtfs-vbb.zip
    -Ddw.graphhopper.graph.flag_encoders=foot
    -Ddw.graphhopper.graph.location=./graph-cache
    -jar web/target/graphhopper-web-*.jar server config.yml

the exception is java.lang.IllegalArgumentException: Unknown vehicle ‘car’ in profile: name=car|vehicle=car|weighting=fastest|turnCosts=false|hints={}. Make sure all vehicles used in ‘profiles’ exist in ‘graph.flag_encoders’
I understand this mistake. why doesn’t this example work?

I need just a simple example that show how i can use the public transit .

Ah, this is ugly and related to https://github.com/graphhopper/graphhopper/issues/1973

In config.yml you need to:

  • remove the profiles section
  • remove the profiles_ch section
  • include gtfs.file like so:
    graphhopper:
        gtfs.file: ""
    

Thanks, now works.

1 Like