private static class MultipolygonBuilder.IntersectionMatrix extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.util.Map<Pair<MultipolygonBuilder.JoinedPolygon,MultipolygonBuilder.JoinedPolygon>,Geometry.PolygonIntersection> |
results |
Constructor and Description |
---|
IntersectionMatrix(java.util.Collection<MultipolygonBuilder.JoinedPolygon> polygons) |
Modifier and Type | Method and Description |
---|---|
(package private) Geometry.PolygonIntersection |
computeIfAbsent(MultipolygonBuilder.JoinedPolygon a1,
MultipolygonBuilder.JoinedPolygon a2,
java.util.function.Supplier<Geometry.PolygonIntersection> computation)
Returns the precomputed intersection between two polygons if known.
|
private static Geometry.PolygonIntersection |
getReverseIntersectionResult(Geometry.PolygonIntersection intersection)
Compute the reverse result of the intersection test done by
Geometry.polygonIntersection(Area a1, Area a2) |
private final java.util.Map<Pair<MultipolygonBuilder.JoinedPolygon,MultipolygonBuilder.JoinedPolygon>,Geometry.PolygonIntersection> results
IntersectionMatrix(java.util.Collection<MultipolygonBuilder.JoinedPolygon> polygons)
private static Geometry.PolygonIntersection getReverseIntersectionResult(Geometry.PolygonIntersection intersection)
Geometry.polygonIntersection(Area a1, Area a2)
intersection
- the intersection result for polygons a1 and a2 (in that order)Geometry.PolygonIntersection computeIfAbsent(MultipolygonBuilder.JoinedPolygon a1, MultipolygonBuilder.JoinedPolygon a2, java.util.function.Supplier<Geometry.PolygonIntersection> computation)
computation
.a1
- first polygona2
- second polygoncomputation
- the computation to perform when intersection is unknownMap.computeIfAbsent(K, java.util.function.Function<? super K, ? extends V>)