Skip to content

Commit c4bc99b

Browse files
committed
Update transit README.md; fixes graphhopper#1973
1 parent 9bf2625 commit c4bc99b

File tree

3 files changed

+25
-10
lines changed

3 files changed

+25
-10
lines changed

reader-gtfs/README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,20 @@ non-highlighted alternatives have fewer transfers. They include a walk-only rout
1010
```bash
1111
git clone https://github.com/graphhopper/graphhopper
1212
cd graphhopper
13+
1314
# download GTFS from Berlin & Brandenburg in Germany (VBB) and the 'surrounding' OpenStreetMap data for the walk network
1415
wget -O gtfs-vbb.zip http://transitfeeds.com/p/verkehrsverbund-berlin-brandenburg/213/latest/download
1516
wget http://download.geofabrik.de/europe/germany/brandenburg-latest.osm.pbf
16-
./graphhopper.sh build
17+
18+
mvn clean package -DskipTests
19+
1720
# The following process will take roughly 5 minutes on a modern laptop when it is executed for the first time.
1821
# It imports the previously downloaded OSM data of the Brandenburg area as well as the GTFS.
19-
java -Xmx8g -Xms8g \
20-
-Ddw.graphhopper.datareader.file=brandenburg-latest.osm.pbf \
21-
-Ddw.graphhopper.gtfs.file=gtfs-vbb.zip \
22-
-Ddw.graphhopper.graph.flag_encoders=foot \
23-
-Ddw.graphhopper.graph.location=./graph-cache \
24-
-jar web/target/graphhopper-web-*.jar server config.yml
25-
# view the web UI e.g. via:
26-
firefox http://localhost:8989
22+
java -Xmx8g -jar web/target/graphhopper-web-*.jar server reader-gtfs/config-example-pt.yml
23+
24+
# Point your browser to
25+
# http://localhost:8989/maps/pt/
26+
# (make sure to include the trailing slash)
2727
```
2828

2929
# Graph schema

reader-gtfs/config-example-pt.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
graphhopper:
2+
datareader.file: brandenburg-latest.osm.pbf
3+
gtfs.file: gtfs-vbb.zip
4+
graph.location: graphs/brandenburg-with-transit
5+
graph.flag_encoders: foot
6+
7+
server:
8+
application_connectors:
9+
- type: http
10+
port: 8989
11+
bind_host: localhost
12+
admin_connectors:
13+
- type: http
14+
port: 8990
15+
bind_host: localhost

reader-gtfs/src/main/java/com/graphhopper/reader/gtfs/GraphHopperGtfs.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ protected void importPublicTransit() {
170170
t.transfer.min_transfer_time = (int) (t.time / 1000L);
171171
gtfsFeed.transfers.put(t.id, t.transfer);
172172
});
173+
LOGGER.info("Building transit graph for feed {}", gtfsFeed.feedId);
173174
gtfsReader.buildPtNetwork();
174175
readers.put(id, gtfsReader);
175176
});
@@ -217,7 +218,6 @@ private void insertTransfersBetweenFeeds(HashMap<String, GtfsReader> readers) {
217218
}
218219
}
219220
});
220-
LOGGER.info("Finished looking for inter-feed transfers");
221221
}
222222

223223
private Stream<TransferWithTime> getType0TransferWithTimes(String id, GTFSFeed gtfsFeed) {

0 commit comments

Comments
 (0)