diff --git a/openrouteservice/src/main/java/org/heigit/ors/isochrones/builders/fast/FastIsochroneMapBuilder.java b/openrouteservice/src/main/java/org/heigit/ors/isochrones/builders/fast/FastIsochroneMapBuilder.java index fd5c897d2c..7be2612c28 100644 --- a/openrouteservice/src/main/java/org/heigit/ors/isochrones/builders/fast/FastIsochroneMapBuilder.java +++ b/openrouteservice/src/main/java/org/heigit/ors/isochrones/builders/fast/FastIsochroneMapBuilder.java @@ -80,8 +80,8 @@ public class FastIsochroneMapBuilder implements IsochroneMapBuilder { private double visitorThreshold = 0.0013; private int minEdgeLengthLimit = 100; private int maxEdgeLengthLimit = Integer.MAX_VALUE; - private final boolean BUFFERED_OUTPUT = true; - private final double activeCellApproximationFactor = 0.99; + private static final boolean bufferedOutput = true; + private static final double activeCellApproximationFactor = 0.99; /* Calculates the distance between two coordinates in meters @@ -209,9 +209,6 @@ public IsochroneMap compute(IsochroneSearchParameters parameters) throws Excepti List isoPoints = new ArrayList<>((int) (1.2 * edgeMap.getMap().size())); double isoValue = parameters.getRanges()[i]; - double isochronesDifference = parameters.getRanges()[i]; -// if (i > 0) -// isochronesDifference = parameters.getRanges()[i] - parameters.getRanges()[i - 1]; float smoothingFactor = parameters.getSmoothingFactor(); TravelRangeType isochroneType = parameters.getRangeType(); @@ -233,15 +230,13 @@ public IsochroneMap compute(IsochroneSearchParameters parameters) throws Excepti buildActiveCellsConcaveHulls(fastIsochroneAlgorithm, isochroneGeometries, snappedLoc, snappedPosition, isoValue, maxRadius, smoothingFactor); - if (!isochroneGeometries.isEmpty()) { //Make a union of all now existing polygons to reduce coordinate list //Uncomment to see all geometries in response -// for(Geometry poly : isochroneGeometries) -// isochroneMap.addIsochrone(new Isochrone(poly, isoValue, meanRadius)); + //for(Geometry poly : isochroneGeometries) + // isochroneMap.addIsochrone(new Isochrone(poly, isoValue, meanRadius)); Geometry preprocessedGeometry = combineGeometries(isochroneGeometries); - StopWatch finalConcaveHullStopWatch = new StopWatch(); if (DebugUtility.isDebug()) finalConcaveHullStopWatch.start(); @@ -252,7 +247,6 @@ public IsochroneMap compute(IsochroneSearchParameters parameters) throws Excepti LOGGER.debug("Build final concave hull from " + points.getNumGeometries() + " points: " + finalConcaveHullStopWatch.stop().getSeconds()); } } -// prevCost = isoValue; } if (DebugUtility.isDebug()) @@ -617,7 +611,7 @@ private void addEdgeCaseGeometry(EdgeIteratorState iter, Quadtree qtree, List= isolineCost) { double segLength = (1 - (distCost - isolineCost) / edgeCost);