DouglasPeuckerLatLong class
Optimized Douglas-Peucker line simplification algorithm for geographic coordinates.
This class implements the Douglas-Peucker algorithm to reduce the number of points in a polyline while preserving its essential shape. The algorithm recursively finds the point with the maximum perpendicular distance from a line segment and keeps it if the distance exceeds a specified tolerance.
Key optimizations:
- Uses squared distances to avoid expensive sqrt operations
- Employs efficient stack-based processing
- Caches frequently accessed points
- Uses boolean arrays for O(1) point tracking
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
simplify(
List< ILatLong> points, double tolerance) → List<ILatLong> - Simplifies a polyline using the Douglas-Peucker algorithm.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited