Class UniqueCoordinateArrayFilter
java.lang.Object
org.locationtech.jts.util.UniqueCoordinateArrayFilter
- All Implemented Interfaces:
CoordinateFilter
A
CoordinateFilter that extracts a unique array of Coordinates.
The array of coordinates contains no duplicate points.
It preserves the order of the input points.- Version:
- 1.7
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidfilter(Coordinate coord) Performs an operation with the providedcoord.static Coordinate[]filterCoordinates(Coordinate[] coords) Convenience method which allows running the filter over an array ofCoordinates.Returns the gatheredCoordinates.
-
Constructor Details
-
UniqueCoordinateArrayFilter
public UniqueCoordinateArrayFilter()
-
-
Method Details
-
filterCoordinates
Convenience method which allows running the filter over an array ofCoordinates.- Parameters:
coords- an array of coordinates- Returns:
- an array of the unique coordinates
-
getCoordinates
Returns the gatheredCoordinates.- Returns:
- the
Coordinates collected by thisCoordinateArrayFilter
-
filter
Description copied from interface:CoordinateFilterPerforms an operation with the providedcoord. Note that there is no guarantee that the input coordinate is the actual object stored in the source geometry, so changes to the coordinate object may not be persistent.- Specified by:
filterin interfaceCoordinateFilter- Parameters:
coord- aCoordinateto which the filter is applied.- See Also:
-