GEOS
3.4.2
|
A list of Coordinates, which may be set to prevent repeated coordinates from occuring in the list. More...
#include <CoordinateList.h>
Public Types | |
typedef std::list< Coordinate > ::iterator | iterator |
typedef std::list< Coordinate > ::const_iterator | const_iterator |
typedef std::list< Coordinate > ::size_type | size_type |
Public Member Functions | |
CoordinateList (const std::vector< Coordinate > &v) | |
Constructs a new list from an array of Coordinates, allowing repeated points. More... | |
size_type | size () const |
bool | empty () const |
iterator | begin () |
iterator | end () |
const_iterator | begin () const |
const_iterator | end () const |
iterator | insert (iterator pos, const Coordinate &c, bool allowRepeated) |
Inserts the specified coordinate at the specified position in this list. More... | |
iterator | insert (iterator pos, const Coordinate &c) |
iterator | erase (iterator pos) |
iterator | erase (iterator first, iterator last) |
std::auto_ptr< Coordinate::Vect > | toCoordinateArray () const |
void | closeRing () |
Friends | |
std::ostream & | operator<< (std::ostream &os, const CoordinateList &cl) |
A list of Coordinates, which may be set to prevent repeated coordinates from occuring in the list.
Use this class when fast insertions and removal at arbitrary position is needed. The class keeps ownership of the Coordinates.
|
inline |
Constructs a new list from an array of Coordinates, allowing repeated points.
(I.e. this constructor produces a CoordinateList with exactly the same set of points as the input array.)
v | the initial coordinates |
|
inline |
Inserts the specified coordinate at the specified position in this list.
pos | the position at which to insert |
coord | the coordinate to insert |
allowRepeated | if set to false, repeated coordinates are collapsed |
NOTE: when allowRepeated is false next point is not checked this matches JTS behavior