A factory to create concrete instances of CoordinateSequences. More...
#include <CoordinateSequenceFactory.h>
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. |
A factory to create concrete instances of CoordinateSequences.
Used to configure GeometryFactorys to provide specific kinds of CoordinateSequences.
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.
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.
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.