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

Change assumed road surface value from "asphalt" to "paved" #1071

Merged
merged 1 commit into from
Oct 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ RELEASING:
- test config format and filetype to JSON
- docker `APP_CONFIG` argument to `ORS_CONFIG` ([#1017](https://github.com/GIScience/openrouteservice/issues/1017))
- default minimum `surface-type` for wheelchair to `sett` ([#1059](https://github.com/GIScience/openrouteservice/issues/1059))
- Default road surface value is now "paved" rather than "asphalt" ([#711](https://github.com/GIScience/openrouteservice/issues/711))
### Deprecated
- `ors_app_config` system property ([#1017](https://github.com/GIScience/openrouteservice/issues/1017))
- `app.config` ors configuration file name ([#1017](https://github.com/GIScience/openrouteservice/issues/1017))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -765,8 +765,8 @@ public void testExtrasDetails() {
.assertThat()
.body("any { it.key == 'routes' }", is(true))
.body("routes[0].containsKey('extras')", is(true))
.body("routes[0].extras.surface.values.size()", is(28))
.body("routes[0].extras.surface.values[18][1]", is(342))
.body("routes[0].extras.surface.values.size()", is(38))
.body("routes[0].extras.surface.values[18][1]", is(258))
.body("routes[0].extras.suitability.values[18][0]", is(521))
.body("routes[0].extras.steepness.values[10][1]", is(326))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -971,8 +971,8 @@ public void testExtrasDetails() {
.assertThat()
.body("any { it.key == 'routes' }", is(true))
.body("routes[0].containsKey('extras')", is(true))
.body("routes[0].extras.surface.values.size()", is(28))
.body("routes[0].extras.surface.values[18][1]", is(342))
.body("routes[0].extras.surface.values.size()", is(38))
.body("routes[0].extras.surface.values[18][1]", is(258))
.body("routes[0].extras.suitability.values[18][0]", is(521))
.body("routes[0].extras.steepness.values[10][1]", is(326))
.statusCode(200);
Expand Down Expand Up @@ -3132,9 +3132,9 @@ public void testAlternativeRoutes() {
.body("routes[1].summary.distance", is( 6435.1f))
.body("routes[1].summary.duration", is(801.5f))
.body("routes[0].way_points[-1]", is(223))
.body("routes[0].extras.surface.values[0][1]", is(223))
.body("routes[0].extras.surface.values[0][1]", is(3))
.body("routes[1].way_points[-1]", is(202))
.body("routes[1].extras.surface.values[6][1]", is(202))
.body("routes[1].extras.surface.values[4][1]", is(202))
.statusCode(200);

JSONObject avoidGeom = new JSONObject("{\"type\":\"Polygon\",\"coordinates\":[[[8.685873,49.414421], [8.688169,49.403978], [8.702095,49.407762], [8.695185,49.416013], [8.685873,49.414421]]]}}");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
import org.heigit.ors.routing.util.WaySurfaceDescription;

import java.util.HashSet;
import java.util.Iterator;
import java.util.Map.Entry;

public class WaySurfaceTypeGraphStorageBuilder extends AbstractGraphStorageBuilder {
public static final String TAG_HIGHWAY = "highway";
Expand Down Expand Up @@ -64,7 +62,7 @@ public void processWay(ReaderWay way) {
int surfaceType = way.hasTag(TAG_SURFACE) ? SurfaceType.getFromString(way.getTag(TAG_SURFACE)) : SurfaceType.UNKNOWN;
if (surfaceType == SurfaceType.UNKNOWN) {
if (wayType == WayType.ROAD || wayType == WayType.STATE_ROAD || wayType == WayType.STREET) {
surfaceType = SurfaceType.ASPHALT;
surfaceType = SurfaceType.PAVED;
} else if (wayType == WayType.PATH) {
surfaceType = SurfaceType.UNPAVED;
}
Expand Down