GEOS: geos::geom::CoordinateSequenceFactory Class Reference

Public Member Functions

# geos::geom::CoordinateSequenceFactory Class Reference

A factory to create concrete instances of CoordinateSequences. More...

`#include <CoordinateSequenceFactory.h>`

Inheritance diagram for geos::geom::CoordinateSequenceFactory:

List of all members.

## Public Member Functions
virtual CoordinateSequence * | create (std::vector< Coordinate > *coordinates) const =0
| Returns a CoordinateSequence based on the given array.
virtual CoordinateSequence * | create (size_t size, size_t dimension) const =0
| Creates a CoordinateSequence of the specified size and dimension.

## Detailed Description

A factory to create concrete instances of CoordinateSequences.

Used to configure GeometryFactorys to provide specific kinds of CoordinateSequences.

## Member Function Documentation

virtual CoordinateSequence* geos::geom::CoordinateSequenceFactory::create | ( | std::vector< Coordinate > * | coordinates ) | const`[pure virtual]`

Returns a CoordinateSequence based on the given array.

Whether the array is copied or simply referenced is implementation-dependent. For this reason caller does give up ownership of it. Implementations that will not copy it will need take care of deleting it.

This method must handle null arguments by creating an empty sequence.

Parameters:

  coordinates | the coordinates

Implemented in geos::geom::CoordinateArraySequenceFactory.

virtual CoordinateSequence* geos::geom::CoordinateSequenceFactory::create | ( | size_t | size,
|  | size_t | dimension
| ) |  | const`[pure virtual]`

Creates a CoordinateSequence of the specified size and dimension.

For this to be useful, the CoordinateSequence implementation must be mutable.

Parameters:

  size | the number of coordinates in the sequence
  dimension | the dimension of the coordinates in the sequence (if user-specifiable, otherwise ignored)

Implemented in geos::geom::CoordinateArraySequenceFactory.

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

- CoordinateSequenceFactory.h