diff --git a/core/src/main/java/com/graphhopper/isochrone/algorithm/ContourBuilder.java b/core/src/main/java/com/graphhopper/isochrone/algorithm/ContourBuilder.java index 0edc2e0be40..9f100b3dd5e 100644 --- a/core/src/main/java/com/graphhopper/isochrone/algorithm/ContourBuilder.java +++ b/core/src/main/java/com/graphhopper/isochrone/algorithm/ContourBuilder.java @@ -13,7 +13,7 @@ the License, or (at your option) any later version. package com.graphhopper.isochrone.algorithm; -import org.locationtech.jts.algorithm.CGAlgorithms; +import org.locationtech.jts.algorithm.Area; import org.locationtech.jts.geom.*; import org.locationtech.jts.geom.prep.PreparedPolygon; import org.locationtech.jts.triangulate.quadedge.Vertex; @@ -125,7 +125,7 @@ private List punchHoles(List rings) { List holes = new ArrayList<>(rings.size() / 2); // 1. Split the polygon list in two: shells and holes (CCW and CW) for (LinearRing ring : rings) { - if (CGAlgorithms.signedArea(ring.getCoordinateSequence()) > 0.0) + if (Area.ofRingSigned(ring.getCoordinateSequence()) > 0.0) holes.add(ring); else shells.add(new PreparedPolygon(geometryFactory.createPolygon(ring))); @@ -157,4 +157,4 @@ private List punchHoles(List rings) { } return punched; } -} \ No newline at end of file +}