outputHull = hull.getConcaveHull(); } catch (Exception e) { outputHull = gc.convexHull(); LOG.debug("Could not generate ConcaveHull for WalkShed, using ConvexHull instead.");
/** * Compute the max distance */ private void computeMaxDistance() { HashSet<Coordinate> coordinatesA = new HashSet<Coordinate>(); coordinatesA.addAll(Arrays.asList(geomA.convexHull().getCoordinates())); Geometry fullHull = geomA.getFactory().createGeometryCollection(new Geometry[]{geomA, geomB}).convexHull(); maxDistanceFilter = new MaxDistanceFilter(coordinatesA); fullHull.apply(maxDistanceFilter); }
/** * Compute the max distance */ private void computeMaxDistance() { HashSet<Coordinate> coordinatesA = new HashSet<Coordinate>(); coordinatesA.addAll(Arrays.asList(geomA.convexHull().getCoordinates())); Geometry fullHull = geomA.getFactory().createGeometryCollection(new Geometry[]{geomA, geomB}).convexHull(); maxDistanceFilter = new MaxDistanceFilter(coordinatesA); fullHull.apply(maxDistanceFilter); }