GEOS 3.14.0dev
Functions
Accessors

Functions

template<typename T = Coordinate>
const T & geos::geom::CoordinateSequence::getAt (std::size_t i) const
 Returns a read-only reference to Coordinate at position i.
 
template<typename T = Coordinate>
T & geos::geom::CoordinateSequence::getAt (std::size_t i)
 Returns a reference to Coordinate at position i.
 
template<typename T >
void geos::geom::CoordinateSequence::getAt (std::size_t i, T &c) const
 Write Coordinate at position i to given Coordinate.
 
void geos::geom::CoordinateSequence::getAt (std::size_t i, CoordinateXY &c) const
 
const Coordinategeos::geom::CoordinateSequence::operator[] (std::size_t i) const
 
Coordinategeos::geom::CoordinateSequence::operator[] (std::size_t i)
 
double geos::geom::CoordinateSequence::getOrdinate (std::size_t index, std::size_t ordinateIndex) const
 
double geos::geom::CoordinateSequence::getX (std::size_t index) const
 
double geos::geom::CoordinateSequence::getY (std::size_t index) const
 
template<typename T = Coordinate>
const T & geos::geom::CoordinateSequence::back () const
 Return last Coordinate in the sequence.
 
template<typename T = Coordinate>
T & geos::geom::CoordinateSequence::back ()
 Return last Coordinate in the sequence.
 
template<typename T = Coordinate>
const T & geos::geom::CoordinateSequence::front () const
 Return first Coordinate in the sequence.
 
template<typename T = Coordinate>
T & geos::geom::CoordinateSequence::front ()
 Return first Coordinate in the sequence.
 
void geos::geom::CoordinateSequence::toVector (std::vector< Coordinate > &coords) const
 Pushes all Coordinates of this sequence into the provided vector.
 
void geos::geom::CoordinateSequence::toVector (std::vector< CoordinateXY > &coords) const
 

Detailed Description

Function Documentation

◆ getOrdinate()

double geos::geom::CoordinateSequence::getOrdinate ( std::size_t  index,
std::size_t  ordinateIndex 
) const

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).

Parameters
indexthe coordinate index in the sequence
ordinateIndexthe ordinate index in the coordinate (in range [0, dimension-1])

◆ getX()

double geos::geom::CoordinateSequence::getX ( std::size_t  index) const
inline

Returns ordinate X (0) of the specified coordinate.

Parameters
index
Returns
the value of the X ordinate in the index'th coordinate

◆ getY()

double geos::geom::CoordinateSequence::getY ( std::size_t  index) const
inline

Returns ordinate Y (1) of the specified coordinate.

Parameters
index
Returns
the value of the Y ordinate in the index'th coordinate

◆ operator[]() [1/2]

Coordinate & geos::geom::CoordinateSequence::operator[] ( std::size_t  i)
inline

Returns a reference to Coordinate at i

◆ operator[]() [2/2]

const Coordinate & geos::geom::CoordinateSequence::operator[] ( std::size_t  i) const
inline

Returns a read-only reference to Coordinate at i