SFCGAL 2.3.0
SFCGAL::MultiPoint Class Reference

A MultiPoint in SFA. More...

#include <MultiPoint.h>

Public Member Functions

 MultiPoint ()
 Empty MultiPoint constructor.
 MultiPoint (const MultiPoint &other)
 Copy constructor.
auto operator= (MultiPoint other) -> MultiPoint &
 assign operator
 ~MultiPoint () override
 destructor
auto geometryType () const -> std::string override
 Get the geometry type as string.
auto geometryTypeId () const -> GeometryType override
 Get the geometry type identifier.
auto pointN (const size_t &n) -> Point &
 returns the n-th Geometry as a Point
auto pointN (const size_t &n) const -> const Point &
 returns the n-th Geometry as a Point
void accept (GeometryVisitor &visitor) override
 Accept a geometry visitor.
void accept (ConstGeometryVisitor &visitor) const override
 Accept a const geometry visitor.
template<class Archive>
void serialize (Archive &ar, const unsigned int)
 Serializer.

Protected Member Functions

auto isAllowed (Geometry const &geometry) -> bool override
 Check if geometry is allowed in this collection.

Detailed Description

A MultiPoint in SFA.

Constructor & Destructor Documentation

◆ MultiPoint() [1/2]

SFCGAL::MultiPoint::MultiPoint ( )
default

Empty MultiPoint constructor.

◆ MultiPoint() [2/2]

SFCGAL::MultiPoint::MultiPoint ( const MultiPoint & other)
default

Copy constructor.

Parameters
otherThe multi-point to copy from

◆ ~MultiPoint()

SFCGAL::MultiPoint::~MultiPoint ( )
overridedefault

destructor

Member Function Documentation

◆ accept() [1/2]

void SFCGAL::MultiPoint::accept ( ConstGeometryVisitor & visitor) const
override

Accept a const geometry visitor.

Parameters
visitorConst visitor to accept

◆ accept() [2/2]

void SFCGAL::MultiPoint::accept ( GeometryVisitor & visitor)
override

Accept a geometry visitor.

Parameters
visitorVisitor to accept

◆ geometryType()

auto SFCGAL::MultiPoint::geometryType ( ) const -> std::string
nodiscardoverride

Get the geometry type as string.

Returns
"MultiPoint"

◆ geometryTypeId()

auto SFCGAL::MultiPoint::geometryTypeId ( ) const -> GeometryType
nodiscardoverride

Get the geometry type identifier.

Returns
TYPE_MULTIPOINT

◆ isAllowed()

auto SFCGAL::MultiPoint::isAllowed ( Geometry const & geometry) -> bool
overrideprotected

Check if geometry is allowed in this collection.

Parameters
geometryGeometry to test
Returns
true if geometry is a Point

◆ operator=()

auto SFCGAL::MultiPoint::operator= ( MultiPoint other) -> MultiPoint &

assign operator

Parameters
otherThe multi-point to assign from
Returns
Reference to this multi-point

◆ pointN() [1/2]

auto SFCGAL::MultiPoint::pointN ( const size_t & n) -> Point &
inline

returns the n-th Geometry as a Point

Parameters
nThe index of the point to get
Returns
Reference to the nth point

◆ pointN() [2/2]

auto SFCGAL::MultiPoint::pointN ( const size_t & n) const -> const Point &
inline

returns the n-th Geometry as a Point

Parameters
nThe index of the point to get
Returns
Const reference to the nth point

◆ serialize()

template<class Archive>
void SFCGAL::MultiPoint::serialize ( Archive & ar,
const unsigned int  )
inline

Serializer.

Parameters
arArchive for serialization