Module org.elasticsearch.geo
Interface StreamingGeometrySimplifier.Monitor
- Enclosing class:
StreamingGeometrySimplifier<T extends Geometry>
public static interface StreamingGeometrySimplifier.Monitor
Implementation of this interface will receive calls with internal data at each step of the
simplification algorithm. This is of use for debugging complex cases, as well as gaining insight
into the way the algorithm works. Data provided in the callback includes:
- String description of current process
- List of points in current simplification
- Last point removed from the simplification
-
Method Summary
Modifier and TypeMethodDescriptionvoid
endSimplification
(String description, List<SimplificationErrorCalculator.PointLike> points) When simplification or sub-simplification is completed, this is called.void
pointAdded
(String status, List<SimplificationErrorCalculator.PointLike> points) Every time a point is added to the collection, this method sends the resulting statevoid
pointRemoved
(String status, List<SimplificationErrorCalculator.PointLike> points, SimplificationErrorCalculator.PointLike removed, double error, SimplificationErrorCalculator.PointLike previous, SimplificationErrorCalculator.PointLike next) Every time a point is added and another is removed from the collection, this method sends the resulting statevoid
startSimplification
(String description, int maxPoints) When a new simplification or sub-simplification starts, this provides a description of the simplification, as well as the current maxPoints target for this simplification.
-
Method Details
-
pointAdded
Every time a point is added to the collection, this method sends the resulting state -
pointRemoved
void pointRemoved(String status, List<SimplificationErrorCalculator.PointLike> points, SimplificationErrorCalculator.PointLike removed, double error, SimplificationErrorCalculator.PointLike previous, SimplificationErrorCalculator.PointLike next) Every time a point is added and another is removed from the collection, this method sends the resulting state -
startSimplification
When a new simplification or sub-simplification starts, this provides a description of the simplification, as well as the current maxPoints target for this simplification. For a single simplification, maxPoints will simply be the value passed to the constructor, but compound simplifications will calculate smaller numbers for sub-simplifications (eg. holes in polygons, or shells in multi-polygons). -
endSimplification
When simplification or sub-simplification is completed, this is called.
-