Skip to content

Commit 16087ed

Browse files
committed
test: use heidelberg file processed through osm-transform
1 parent fd89d42 commit 16087ed

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

ors-api/src/test/java/org/heigit/ors/apitests/routing/ResultTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2018,7 +2018,7 @@ void testWheelchairWidthRestriction() {
20182018
.then()
20192019
.assertThat()
20202020
.body("any { it.key == 'routes' }", is(true))
2021-
.body("routes[0].summary.distance", is(158.7f))
2021+
.body("routes[0].summary.distance", is(158.8f))
20222022
.body("routes[0].summary.duration", is(114.3f))
20232023
.statusCode(200);
20242024
}

ors-api/src/test/resources/application-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ors:
1212
maximum_intervals: 10
1313

1414
engine:
15-
source_file: ./src/test/files/heidelberg.osm.gz
15+
source_file: ./src/test/files/heidelberg.ors.pbf
1616
graphs_root_path: graphs-apitests
1717
elevation:
1818
cache_path: ./src/test/files/elevation

ors-engine/src/main/java/org/heigit/ors/routing/graphhopper/extensions/reader/borders/CountryBordersReader.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ public String getEngName(String name) {
343343
}
344344

345345
public String getName(short id) {
346-
return names.get(id);
346+
return names.getOrDefault(id, INTERNATIONAL_NAME);
347347
}
348348

349349
/**

ors-engine/src/main/java/org/heigit/ors/routing/pathprocessors/ExtraInfoProcessor.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,8 @@ public void processPathEdge(EdgeIteratorState edge, PointList geom) {
426426
coordinate.y = geom.getLat(0);
427427
CountryBordersPolygon[] countries = countryBordersReader.getCountry(coordinate);
428428
if (countries.length >= 1) {
429-
country1 = Short.parseShort(countryBordersReader.getId(countryBordersReader.getCountry(coordinate)[0].getName()));
429+
short country0 = Short.parseShort(countryBordersReader.getId(countryBordersReader.getCountry(coordinate)[0].getName()));
430+
country1 = country0;
430431
}
431432
}
432433
if (countryTraversalInfoBuilder != null && country1 != 0) {

0 commit comments

Comments
 (0)