GEOS  3.9.1dev
Public Member Functions | Static Public Member Functions | List of all members
geos::geom::DefaultCoordinateSequenceFactory Class Reference

#include <DefaultCoordinateSequenceFactory.h>

Inheritance diagram for geos::geom::DefaultCoordinateSequenceFactory:
[legend]
Collaboration diagram for geos::geom::DefaultCoordinateSequenceFactory:
[legend]

Public Member Functions

std::unique_ptr< CoordinateSequencecreate () const finaloverride
 Returns an empty CoordinateSequence, the dimensions will be autodetected when it is populated. More...
 
std::unique_ptr< CoordinateSequencecreate (std::vector< Coordinate > *coords, std::size_t dims=0) const finaloverride
 Returns a CoordinateSequence based on the given array. More...
 
std::unique_ptr< CoordinateSequencecreate (std::vector< Coordinate > &&coords, std::size_t dims=0) const finaloverride
 Returns a CoordinateSequence based on the given array. More...
 
std::unique_ptr< CoordinateSequencecreate (std::size_t size, std::size_t dims=0) const finaloverride
 Creates a CoordinateSequence of the specified size and dimension. More...
 
std::unique_ptr< CoordinateSequencecreate (const CoordinateSequence &coordSeq) const finaloverride
 Creates a CoordinateSequence which is a copy of the given one. More...
 
- Public Member Functions inherited from geos::geom::CoordinateSequenceFactory
virtual ~CoordinateSequenceFactory ()=default
 

Static Public Member Functions

static const CoordinateSequenceFactoryinstance ()
 

Detailed Description

Definition at line 25 of file DefaultCoordinateSequenceFactory.h.

Member Function Documentation

std::unique_ptr<CoordinateSequence> geos::geom::DefaultCoordinateSequenceFactory::create ( ) const
inlinefinaloverridevirtual

Returns an empty CoordinateSequence, the dimensions will be autodetected when it is populated.

Implements geos::geom::CoordinateSequenceFactory.

Definition at line 28 of file DefaultCoordinateSequenceFactory.h.

std::unique_ptr<CoordinateSequence> geos::geom::DefaultCoordinateSequenceFactory::create ( std::vector< Coordinate > *  coordinates,
std::size_t  dimension = 0 
) const
inlinefinaloverridevirtual

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.

Implements geos::geom::CoordinateSequenceFactory.

Definition at line 32 of file DefaultCoordinateSequenceFactory.h.

std::unique_ptr<CoordinateSequence> geos::geom::DefaultCoordinateSequenceFactory::create ( std::vector< Coordinate > &&  coordinates,
std::size_t  dimension = 0 
) const
inlinefinaloverridevirtual

Returns a CoordinateSequence based on the given array.

Parameters
coordinatesthe coordinates
dimension0, 2 or 3 with 0 indicating unknown at this time.

Implements geos::geom::CoordinateSequenceFactory.

Definition at line 36 of file DefaultCoordinateSequenceFactory.h.

std::unique_ptr<CoordinateSequence> geos::geom::DefaultCoordinateSequenceFactory::create ( std::size_t  size,
std::size_t  dimension = 0 
) const
inlinefinaloverridevirtual

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)

Implements geos::geom::CoordinateSequenceFactory.

Definition at line 40 of file DefaultCoordinateSequenceFactory.h.

std::unique_ptr<CoordinateSequence> geos::geom::DefaultCoordinateSequenceFactory::create ( const CoordinateSequence coordSeq) const
inlinefinaloverridevirtual

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

Implements geos::geom::CoordinateSequenceFactory.

Definition at line 52 of file DefaultCoordinateSequenceFactory.h.

static const CoordinateSequenceFactory* geos::geom::DefaultCoordinateSequenceFactory::instance ( )
static

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