GEOS: geos::DefaultCoordinateSequence Class Reference

- Main Page
- Namespaces
- Classes
- Files
- Related Pages

- Class List
- Class Hierarchy
- Class Members

# geos::DefaultCoordinateSequence Class Reference

The default implementation of CoordinateSequence. More...

`#include <geos.h>`

Inheritance diagram for geos::DefaultCoordinateSequence:

List of all members.

## Public Member Functions
CoordinateSequence * | clone () const
| Returns a deep copy of this collection.
const Coordinate & | getAt (int pos) const
| Returns a read-only reference to Coordinate at position i.
int | getSize () const
| Returns the number of Coordinates (actual or otherwise, as this implementation may not store its data in Coordinate objects).
const vector< Coordinate > * | toVector () const
| Returns a read-only vector with the Coordinates in this collection.
| DefaultCoordinateSequence ()
| Construct an empty sequence.
| DefaultCoordinateSequence (vector< Coordinate > *coords)
| Construct sequence taking ownership of given Coordinate vector.
| DefaultCoordinateSequence (int 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.
void | setAt (const Coordinate &c, int pos)
| Get a reference to Coordinate at position pos.
void | deleteAt (int pos)
| Delete Coordinate at position pos (list will shrink).
string | toString () const
| Get a string rapresentation of CoordinateSequence.
void | setPoints (const vector< Coordinate > &v)
| Substitute Coordinate list with a copy of the given vector.
unsigned int | getDimension () const
| Get number of dimensions.

## Detailed Description

The default implementation of CoordinateSequence.

## Member Function Documentation

const Coordinate & geos::DefaultCoordinateSequence::getAt | ( | int | i | ) | const`[virtual]`

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::CoordinateSequence.

const vector< Coordinate > * geos::DefaultCoordinateSequence::toVector | ( |  | ) | const`[virtual]`

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.

Implements geos::CoordinateSequence.

void geos::DefaultCoordinateSequence::setAt | ( | const Coordinate & | c,
|  | int | pos |
| ) |  |  | `[virtual]`

Get a reference to Coordinate at position pos.

Copy Coordinate c to position pos

Implements geos::CoordinateSequence.

The documentation for this class was generated from the following files:

- geom.h
- DefaultCoordinateSequence.cpp