Module org.elasticsearch.geo
Class SimplificationErrorCalculator.TriangleAreaCalculator
java.lang.Object
org.elasticsearch.geometry.simplify.SimplificationErrorCalculator.TriangleAreaCalculator
- All Implemented Interfaces:
SimplificationErrorCalculator
- Enclosing interface:
SimplificationErrorCalculator
public static class SimplificationErrorCalculator.TriangleAreaCalculator
extends Object
implements SimplificationErrorCalculator
Calculate the triangle area using geographic coordinates and Herons formula (side lengths) as described at
Area of a triangle
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.geometry.simplify.SimplificationErrorCalculator
SimplificationErrorCalculator.CartesianHeightAndBackpathDistanceCalculator, SimplificationErrorCalculator.CartesianTriangleAreaCalculator, SimplificationErrorCalculator.Point3D, SimplificationErrorCalculator.PointLike, SimplificationErrorCalculator.RotationMatrix, SimplificationErrorCalculator.SphericalHeightAndBackpathDistanceCalculator, SimplificationErrorCalculator.TriangleAreaCalculator, SimplificationErrorCalculator.TriangleHeightCalculator
-
Field Summary
Fields inherited from interface org.elasticsearch.geometry.simplify.SimplificationErrorCalculator
CARTESIAN_TRIANGLE_AREA, HEIGHT_AND_BACKPATH_DISTANCE, SPHERICAL_HEIGHT_AND_BACKPATH_DISTANCE, TRIANGLE_AREA, TRIANGLE_HEIGHT
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble
calculateError
(SimplificationErrorCalculator.PointLike left, SimplificationErrorCalculator.PointLike middle, SimplificationErrorCalculator.PointLike right)
-
Constructor Details
-
TriangleAreaCalculator
public TriangleAreaCalculator()
-
-
Method Details
-
calculateError
public double calculateError(SimplificationErrorCalculator.PointLike left, SimplificationErrorCalculator.PointLike middle, SimplificationErrorCalculator.PointLike right) - Specified by:
calculateError
in interfaceSimplificationErrorCalculator
-