GEOS  3.8.0dev
Public Member Functions | List of all members
geos::geom::CoordinateSequenceFactory Class Referenceabstract

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

#include <CoordinateSequenceFactory.h>

Inheritance diagram for geos::geom::CoordinateSequenceFactory:
geos::geom::CoordinateArraySequenceFactory

Public Member Functions

virtual CoordinateSequencecreate () const =0
 Returns an empty CoordinateSequence, the dimensions will be autodetected when it is populated.
 
virtual CoordinateSequencecreate (std::vector< Coordinate > *coordinates, std::size_t dimension=0) const =0
 Returns a CoordinateSequence based on the given array. More...
 
virtual CoordinateSequencecreate (std::size_t size, std::size_t dimension=0) const =0
 Creates a CoordinateSequence of the specified size and dimension. More...
 
virtual CoordinateSequencecreate (const CoordinateSequence &coordSeq) const =0
 Creates a CoordinateSequence which is a copy of the given one. More...
 

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,
std::size_t  dimension = 0 
) 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
coordinatesthe coordinates
dimension0, 2 or 3 with 0 indicating unknown at this time.

Implemented in geos::geom::CoordinateArraySequenceFactory.

virtual CoordinateSequence* geos::geom::CoordinateSequenceFactory::create ( std::size_t  size,
std::size_t  dimension = 0 
) const
pure virtual

Creates a CoordinateSequence of the specified size and dimension.

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

Parameters
sizethe number of coordinates in the sequence
dimensionthe dimension of the coordinates in the sequence (0=unknown, 2, or 3 - ignored if not user specifiable)

Implemented in geos::geom::CoordinateArraySequenceFactory.

virtual CoordinateSequence* geos::geom::CoordinateSequenceFactory::create ( const CoordinateSequence coordSeq) const
pure virtual

Creates a CoordinateSequence which is a copy of the given one.

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

Parameters
coordSeqthe coordinate sequence to copy

Implemented in geos::geom::CoordinateArraySequenceFactory.


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