com.vividsolutions.jts.geom
Class CoordinateList
ArrayListcom.vividsolutions.jts.geom.CoordinateList
public class CoordinateList
extends ArrayList
A list of
Coordinates, which may
be set to prevent repeated coordinates from occuring in the list.
CoordinateList()- Constructs a new list without any coordinates
|
CoordinateList(Coordinate[] coord)- The basic constructor for a CoordinateArray allows repeated points
(i.e produces a CoordinateList with exactly the same set of points)
|
CoordinateList(Coordinate[] coord, boolean allowRepeated)- Constructs a new list from an array of Coordinates,
allowing caller to specify if repeated points are to be removed.
|
boolean | add(Object obj, boolean allowRepeated)- Add a coordinate
|
void | add(Coordinate coord, boolean allowRepeated)- Add a coordinate
|
boolean | add(Coordinate[] coord, boolean allowRepeated)- Add an array of coordinates
|
boolean | add(Coordinate[] coord, boolean allowRepeated, boolean direction)- Add an array of coordinates
|
boolean | addAll(Collection coll, boolean allowRepeated)- Add an array of coordinates
|
Object | clone()- Returns a deep copy of this CoordinateList instance.
|
void | closeRing()- Ensure this coordList is a ring, by adding the start point if necessary
|
Coordinate | getCoordinate(int i)
|
Coordinate[] | toCoordinateArray()- Returns the Coordinates in this collection.
|
CoordinateList
public CoordinateList()
Constructs a new list without any coordinates
CoordinateList
public CoordinateList(Coordinate[] coord)
The basic constructor for a CoordinateArray allows repeated points
(i.e produces a CoordinateList with exactly the same set of points)
coord - the initial coordinates
CoordinateList
public CoordinateList(Coordinate[] coord,
boolean allowRepeated) Constructs a new list from an array of Coordinates,
allowing caller to specify if repeated points are to be removed.
coord - the array of coordinates to load into the listallowRepeated - if false, repeated points are removed
add
public boolean add(Object obj,
boolean allowRepeated)Add a coordinate
obj - The coordinate to addallowRepeated - if set to false, repeated coordinates are collapsed
- true (as by general collection contract)
add
public void add(Coordinate coord,
boolean allowRepeated)Add a coordinate
coord - The coordinatesallowRepeated - if set to false, repeated coordinates are collapsed
add
public boolean add(Coordinate[] coord,
boolean allowRepeated)Add an array of coordinates
coord - The coordinatesallowRepeated - if set to false, repeated coordinates are collapsed
- true (as by general collection contract)
add
public boolean add(Coordinate[] coord,
boolean allowRepeated,
boolean direction)Add an array of coordinates
coord - The coordinatesallowRepeated - if set to false, repeated coordinates are collapseddirection - if false, the array is added in reverse order
- true (as by general collection contract)
addAll
public boolean addAll(Collection coll,
boolean allowRepeated)Add an array of coordinates
coll - The coordinatesallowRepeated - if set to false, repeated coordinates are collapsed
- true (as by general collection contract)
clone
public Object clone()
Returns a deep copy of this CoordinateList instance.
- a clone of this CoordinateList instance
closeRing
public void closeRing()
Ensure this coordList is a ring, by adding the start point if necessary
getCoordinate
public Coordinate getCoordinate(int i)
toCoordinateArray
public Coordinate[] toCoordinateArray()
Returns the Coordinates in this collection.