15 #ifndef GEOS_GEOM_COORDINATEARRAYSEQUENCE_H
16 #define GEOS_GEOM_COORDINATEARRAYSEQUENCE_H
18 #include <geos/export.h>
21 #include <geos/geom/CoordinateSequence.h>
23 #include <geos/inline.h>
56 const std::vector<Coordinate>*
toVector()
const override;
59 void toVector(std::vector<Coordinate>&)
const override;
66 std::size_t dimension = 0);
73 bool isEmpty()
const override {
return empty(); }
75 bool empty()
const {
return vect->empty(); }
95 void add(std::size_t i,
const Coordinate& coord,
bool allowRepeated)
override;
103 void setPoints(
const std::vector<Coordinate> &v)
override;
105 double getOrdinate(std::size_t index,
106 size_t ordinateIndex)
const override;
109 double value)
override;
122 std::vector<Coordinate> *vect;
123 mutable std::size_t dimension;
132 #endif // ndef GEOS_GEOM_COORDINATEARRAYSEQUENCE_H
void add(const Coordinate &c) override
Add a Coordinate to the list.
void getAt(std::size_t i, Coordinate &c) const override
Copy Coordinate at position i to Coordinate c.
void add(std::size_t i, const Coordinate &coord, bool allowRepeated) override
Inserts the specified coordinate at the specified position in this list.
bool isEmpty() const override
Returns true it list contains no coordinates.
Definition: CoordinateArraySequence.h:73
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:25
CoordinateSequence & removeRepeatedPoints() override
Remove consecutive equal Coordinates from the sequence.
void setAt(const Coordinate &c, std::size_t pos) override
Get a reference to Coordinate at position pos.
const Coordinate & getAt(std::size_t pos) const override
Returns a read-only reference to Coordinate at position i.
std::string toString() const override
Get a string rapresentation of CoordinateSequence.
CoordinateArraySequence(std::size_t n, std::size_t dimension=0)
Construct sequence allocating space for n coordinates.
void setOrdinate(std::size_t index, std::size_t ordinateIndex, double value) override
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:60
CoordinateArraySequence DefaultCoordinateSequence
This is for backward API compatibility.
Definition: CoordinateArraySequence.h:127
CoordinateArraySequence(std::vector< Coordinate > *coords, std::size_t dimension=0)
Construct sequence taking ownership of given Coordinate vector.
void deleteAt(std::size_t pos) override
Delete Coordinate at position pos (list will shrink).
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:59
size_t getSize() const override
Returns the number of Coordinates (actual or otherwise, as this implementation may not store its data...
CoordinateSequence * clone() const override
Returns a deep copy of this collection.
void toVector(std::vector< Coordinate > &) const override
Pushes all Coordinates of this sequence onto the provided vector.
void setPoints(const std::vector< Coordinate > &v) override
Substitute Coordinate list with a copy of the given vector.
const std::vector< Coordinate > * toVector() const override
Returns a read-only vector with the Coordinates in this collection.
CoordinateArraySequence()
Construct an empty sequence.
An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition: Envelope.h:59
void expandEnvelope(Envelope &env) const override
Definition: CoordinateFilter.h:43
std::size_t getDimension() const override
void add(const Coordinate &c, bool allowRepeated) override
Add a coordinate.
The default implementation of CoordinateSequence.
Definition: CoordinateArraySequence.h:37
void clear()
Reset this CoordinateArraySequence to the empty state.
Definition: CoordinateArraySequence.h:78