Class OverlayArea
The algorithm uses mathematics derived from the work of William R. Franklin.
The area of a polygon can be computed as a sum of the partial areas
computed for each EdgeVector
of the polygon.
This allows the area of the intersection of two polygons to be computed
by summing the partial areas for the edge vectors of the intersection resultant.
To determine the edge vectors all that is required
is to compute the vertices of the intersection resultant,
along with the direction (not the length) of the edges they belong to.
The resultant vertices are the vertices where the edges of the inputs intersect,
along with the vertices of each input which lie in the interior of the other input.
The direction of the edge vectors is the same as the parent edges from which they derive.
Determining the vertices of intersection is simpler and more robust
than determining the values of the actual edge line segments in the overlay result.
- Author:
- Martin Davis
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble
intersectionArea
(Geometry geom) static double
intersectionArea
(Geometry geom0, Geometry geom1)
-
Constructor Details
-
OverlayArea
-
-
Method Details
-
intersectionArea
-
intersectionArea
-