Package org.locationtech.jts.util
Class UniqueCoordinateArrayFilter
- java.lang.Object
-
- org.locationtech.jts.util.UniqueCoordinateArrayFilter
-
- All Implemented Interfaces:
CoordinateFilter
public class UniqueCoordinateArrayFilter extends java.lang.Object implements CoordinateFilter
ACoordinateFilter
that extracts a unique array ofCoordinate
s. The array of coordinates contains no duplicate points. It preserves the order of the input points.- Version:
- 1.7
-
-
Constructor Summary
Constructors Constructor Description UniqueCoordinateArrayFilter()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
filter(Coordinate coord)
Performs an operation with the providedcoord
.static Coordinate[]
filterCoordinates(Coordinate[] coords)
Convenience method which allows running the filter over an array ofCoordinate
s.Coordinate[]
getCoordinates()
Returns the gatheredCoordinate
s.
-
-
-
Method Detail
-
filterCoordinates
public static Coordinate[] filterCoordinates(Coordinate[] coords)
Convenience method which allows running the filter over an array ofCoordinate
s.- Parameters:
coords
- an array of coordinates- Returns:
- an array of the unique coordinates
-
getCoordinates
public Coordinate[] getCoordinates()
Returns the gatheredCoordinate
s.- Returns:
- the
Coordinate
s collected by thisCoordinateArrayFilter
-
filter
public void filter(Coordinate coord)
Description copied from interface:CoordinateFilter
Performs 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:
filter
in interfaceCoordinateFilter
- Parameters:
coord
- aCoordinate
to which the filter is applied.- See Also:
CoordinateFilter.filter(Coordinate)
-
-