Skip to content

Commit

Permalink
perf(isochrones): improve isochrones performance (#1607)
Browse files Browse the repository at this point in the history
  • Loading branch information
aoles authored Jan 30, 2024
2 parents dbb1756 + 341ee7d commit 5c58ceb
Show file tree
Hide file tree
Showing 5 changed files with 150 additions and 195 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ RELEASING:
- fix IN1-JAVA-ORGMOZILLA-1314295 ([#1627](https://github.com/GIScience/openrouteservice/issues/1627))
- log summary stats on traffic mapmatching and use progress bar only in debug mode ([#1647](https://github.com/GIScience/openrouteservice/pull/1647))
- move APIEnums into API module ([#1634](https://github.com/GIScience/openrouteservice/issues/1634))
- performance improvements to isochrone calculations ([#1607](https://github.com/GIScience/openrouteservice/pull/1607))

### Deprecated
- JSON configuration and related classes ([#1506](https://github.com/GIScience/openrouteservice/pull/1506))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ void testPolygon() {
.then()
.body("any { it.key == 'type' }", is(true))
.body("any { it.key == 'features' }", is(true))
.body("features[0].geometry.coordinates[0].size()", is(both(greaterThan(48)).and(lessThan(54))))
.body("features[0].geometry.coordinates[0].size()", is(both(greaterThan(46)).and(lessThan(50))))
.body("features[0].properties.center.size()", is(2))
.body("bbox", hasItems(closeTo(8.663323f, 0.001f), closeTo(49.40837f, 0.001f), closeTo(8.700336f, 0.001f), closeTo(49.439884f, 0.001f)))
.body("features[0].type", is("Feature"))
Expand Down Expand Up @@ -260,7 +260,7 @@ void testReachfactorAndArea() {
.body("any { it.key == 'type' }", is(true))
.body("any { it.key == 'features' }", is(true))
.body("features[0].properties.area", is(closeTo(6600000, 132000)))
.body("features[0].properties.reachfactor", is(closeTo(0.7429, 0.0148)))
.body("features[0].properties.reachfactor", is(closeTo(0.7629, 0.0148)))
.statusCode(200);

}
Expand All @@ -285,7 +285,7 @@ void testReachfactorAndAreaAreaUnitsM() {
.body("any { it.key == 'type' }", is(true))
.body("any { it.key == 'features' }", is(true))
.body("features[0].properties.area", is(closeTo(6600000, 132000)))
.body("features[0].properties.reachfactor", is(closeTo(0.7429, 0.0148)))
.body("features[0].properties.reachfactor", is(closeTo(0.7629, 0.0148)))
.statusCode(200);

}
Expand All @@ -309,8 +309,8 @@ void testReachfactorAndAreaAreaUnitsKM() {
.then()
.body("any { it.key == 'type' }", is(true))
.body("any { it.key == 'features' }", is(true))
.body("features[0].properties.area", is(closeTo(6.48, 0.132)))
.body("features[0].properties.reachfactor", is(closeTo(0.7429, 0.0148)))
.body("features[0].properties.area", is(closeTo(6.60, 0.132)))
.body("features[0].properties.reachfactor", is(closeTo(0.7629, 0.0148)))
.statusCode(200);

}
Expand Down Expand Up @@ -361,7 +361,7 @@ void testReachfactorAndAreaAreaUnitsMI() {
.body("any { it.key == 'type' }", is(true))
.body("any { it.key == 'features' }", is(true))
.body("features[0].properties.area", is(closeTo(2.55, 0.05)))
.body("features[0].properties.reachfactor", is(closeTo(0.7429, 0.0148)))
.body("features[0].properties.reachfactor", is(closeTo(0.7629, 0.0148)))
.statusCode(200);

}
Expand Down Expand Up @@ -392,11 +392,11 @@ void testIntersections() {
.body("features[2].type", is("Feature"))
.body("features[2].geometry.type", is("Polygon"))
//.body("features[2].geometry.coordinates[0].size()", is(26))
.body("features[2].geometry.coordinates[0].size()", is(both(greaterThan(39)).and(lessThan(41))))
.body("features[2].geometry.coordinates[0].size()", is(both(greaterThan(40)).and(lessThan(44))))
.body("features[2].properties.contours.size()", is(2))
.body("features[2].properties.containsKey('area')", is(true))
//.body("features[2].properties.area", is(5824280.5f))
.body("features[0].properties.area", is(both(greaterThan(6400000f)).and(lessThan(6600000f))))
.body("features[0].properties.area", is(both(greaterThan(6600000f)).and(lessThan(6700000f))))
.body("features[2].properties.contours[0][0]", is(0))
.body("features[2].properties.contours[0][1]", is(0))
.body("features[2].properties.contours[1][0]", is(1))
Expand Down
Loading

0 comments on commit 5c58ceb

Please sign in to comment.