Package micycle.pgs.commons
Interface DiscreteCurveEvolution.DCETerminationCallback
- Enclosing class:
- DiscreteCurveEvolution
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
The callback interface for determining the termination condition of the
Discrete Curve Evolution (DCE) process.
This functional interface defines a single method that decides whether the DCE algorithm should terminate based on the current kink (having a candidate vertex), using its coordinates, relevance score, and the number of vertices remaining in the simplified geometry. Implementations can use this method to provide custom termination logic which may depend on various factors, such as a threshold relevance score, a specific number of vertices to preserve, or other criteria.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
shouldTerminate
(org.locationtech.jts.geom.Coordinate currentVertex, double relevance, int verticesRemaining) Determines whether the DCE process should terminate at the current step.
-
Method Details
-
shouldTerminate
boolean shouldTerminate(org.locationtech.jts.geom.Coordinate currentVertex, double relevance, int verticesRemaining) Determines whether the DCE process should terminate at the current step.- Parameters:
currentVertex
- The coordinates of the current kink being evaluated.relevance
- The relevance score of the current kink. A value of 30 or lower is generally imperceptible.verticesRemaining
- The number of vertices remaining in the simplified geometry (including the current candidate vertex). Note: this does not count the closing vertex of closed geometries.- Returns:
true
if the DCE process should terminate;false
otherwise.
-