#include <CoordinateArraySequence.h>
Inheritance diagram for geos::geom::CoordinateArraySequence:
Public Member Functions | |
CoordinateArraySequence (const CoordinateArraySequence &cl) | |
CoordinateSequence * | clone () const |
Returns a deep copy of this collection. | |
const Coordinate & | getAt (size_t pos) const |
Returns a read-only reference to Coordinate at position i. | |
virtual void | getAt (size_t i, Coordinate &c) const |
Copy Coordinate at position i to Coordinate c. | |
size_t | getSize () const |
Returns the number of Coordinates (actual or otherwise, as this implementation may not store its data in Coordinate objects). | |
const std::vector< Coordinate > * | toVector () const |
Returns a read-only vector with the Coordinates in this collection. | |
void | toVector (std::vector< Coordinate > &) const |
Pushes all Coordinates of this sequence onto the provided vector. | |
CoordinateArraySequence () | |
Construct an empty sequence. | |
CoordinateArraySequence (std::vector< Coordinate > *coords) | |
Construct sequence taking ownership of given Coordinate vector. | |
CoordinateArraySequence (size_t n) | |
Construct sequence allocating space for n coordinates. | |
bool | isEmpty () const |
Returns true it list contains no coordinates. | |
void | add (const Coordinate &c) |
Add a Coordinate to the list. | |
virtual void | add (const Coordinate &c, bool allowRepeated) |
Add a coordinate. | |
virtual void | add (size_t i, const Coordinate &coord, bool allowRepeated) |
Inserts the specified coordinate at the specified position in this list. | |
void | setAt (const Coordinate &c, size_t pos) |
Copy Coordinate c to position pos. | |
void | deleteAt (size_t pos) |
Delete Coordinate at position pos (list will shrink). | |
std::string | toString () const |
Get a string rapresentation of CoordinateSequence. | |
void | setPoints (const std::vector< Coordinate > &v) |
Substitute Coordinate list with a copy of the given vector. | |
double | getOrdinate (size_t index, size_t ordinateIndex) const |
void | setOrdinate (size_t index, size_t ordinateIndex, double value) |
void | expandEnvelope (Envelope &env) const |
size_t | getDimension () const |
void | apply_rw (const CoordinateFilter *filter) |
void | apply_ro (CoordinateFilter *filter) const |
virtual CoordinateSequence & | removeRepeatedPoints () |
Remove consecutive equal Coordinates from the sequence. |
|
Inserts the specified coordinate at the specified position in this list.
Implements geos::geom::CoordinateSequence. |
|
Add a coordinate.
Reimplemented from geos::geom::CoordinateSequence. |
|
Expands the given Envelope to include the coordinates in the sequence. Allows implementing classes to optimize access to coordinate values.
Reimplemented from geos::geom::CoordinateSequence. |
|
Returns a read-only reference to Coordinate at position i. Whether or not the Coordinate returned is the actual underlying Coordinate or merely a copy depends on the implementation. Implements geos::geom::CoordinateSequence. |
|
Returns the dimension (number of ordinates in each coordinate) for this sequence.
Implements geos::geom::CoordinateSequence. |
|
Returns the ordinate of a coordinate in this sequence. Ordinate indices 0 and 1 are assumed to be X and Y. Ordinates indices greater than 1 have user-defined semantics (for instance, they may contain other dimensions or measure values).
Implements geos::geom::CoordinateSequence. |
|
Remove consecutive equal Coordinates from the sequence. Equality test is 2D based. Returns a reference to self. Implements geos::geom::CoordinateSequence. |
|
Sets the value for a given ordinate of a coordinate in this sequence.
Implements geos::geom::CoordinateSequence. |
|
Pushes all Coordinates of this sequence onto the provided vector. This method is a port of the toCoordinateArray() method of JTS. Implements geos::geom::CoordinateSequence. |
|
Returns a read-only vector with the Coordinates in this collection. Whether or not the Coordinates returned are the actual underlying Coordinates or merely copies depends on the implementation. Note that if this implementation does not store its data as an array of Coordinates, this method will incur a performance penalty because the array needs to be built from scratch. This method is a port of the toCoordinateArray() method of JTS. It is not much used as memory management requires us to know wheter we should or not delete the returned object in a consistent way. Our options are: use shared_ptr<Coordinate> or always keep ownerhips of an eventual newly created vector. We opted for the second, so the returned object is a const, to also ensure that returning an internal pointer doesn't make the object mutable.
Implements geos::geom::CoordinateSequence. |