Skip to content

Commit 0c6a6e7

Browse files
committed
fix graph data export
1 parent ede0a22 commit 0c6a6e7

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

graphs/build-config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
areaVisibility: true
2+
"areaVisibility": true
33
}
44

src/main/java/org/opentripplanner/graph_builder/GraphBuilder.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,9 @@ public void run() {
149149
if (serializeGraph) {
150150
try {
151151
graph.save(graphFile);
152-
GraphCsvExport.exportEdgesToCsv(graph, "graphs/edges.csv");
153-
GraphCsvExport.exportNodesToCsv(graph, "graphs/nodes.csv");
152+
String basePath = graphFile.getAbsolutePath().replace("/./", "/");
153+
GraphCsvExport.exportEdgesToCsv(graph, basePath.replace("Graph.obj", "edges.csv"));
154+
GraphCsvExport.exportNodesToCsv(graph, basePath.replace("Graph.obj", "nodes.csv"));
154155
} catch (Exception ex) {
155156
throw new IllegalStateException(ex);
156157
}

0 commit comments

Comments
 (0)