Package org.locationtech.jts.util
Class UniqueCoordinateArrayFilter
- java.lang.Object
-
- org.locationtech.jts.util.UniqueCoordinateArrayFilter
-
- All Implemented Interfaces:
CoordinateFilter
public class UniqueCoordinateArrayFilter extends Object implements CoordinateFilter
ACoordinateFilterthat builds a set ofCoordinates. The set 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 voidfilter(Coordinate coord)Performs an operation with thecoord.static Coordinate[]filterCoordinates(Coordinate[] coords)Convenience method which allows running the filter over an array ofCoordinates.Coordinate[]getCoordinates()Returns the gatheredCoordinates.
-
-
-
Method Detail
-
filterCoordinates
public static Coordinate[] filterCoordinates(Coordinate[] coords)
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
public Coordinate[] getCoordinates()
Returns the gatheredCoordinates.- Returns:
- the
Coordinates collected by thisCoordinateArrayFilter
-
filter
public void filter(Coordinate coord)
Description copied from interface:CoordinateFilterPerforms an operation with thecoord. There is no guarantee that the coordinate is the actual object stored in the target geometry.- Specified by:
filterin interfaceCoordinateFilter- Parameters:
coord- aCoordinateto which the filter is applied.
-
-