Module org.elasticsearch.geo
Class SimplificationErrorCalculator.TriangleHeightCalculator
java.lang.Object
org.elasticsearch.geometry.simplify.SimplificationErrorCalculator.TriangleHeightCalculator
- All Implemented Interfaces:
SimplificationErrorCalculator
- Enclosing interface:
SimplificationErrorCalculator
public static class SimplificationErrorCalculator.TriangleHeightCalculator
extends Object
implements SimplificationErrorCalculator
Calculate the triangle area using geographic coordinates and Herons formula (side lengths) as described at
Area of a triangle, but scale the area down
by the inverse of the length of the base (left-right), which estimates the height of the 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 TypeMethodDescriptiondoublecalculateError(SimplificationErrorCalculator.PointLike left, SimplificationErrorCalculator.PointLike middle, SimplificationErrorCalculator.PointLike right)
-
Constructor Details
-
TriangleHeightCalculator
public TriangleHeightCalculator()
-
-
Method Details
-
calculateError
public double calculateError(SimplificationErrorCalculator.PointLike left, SimplificationErrorCalculator.PointLike middle, SimplificationErrorCalculator.PointLike right) - Specified by:
calculateErrorin interfaceSimplificationErrorCalculator
-