SFCGAL
Public Member Functions | Protected Member Functions | List of all members
SFCGAL::MultiPoint Class Reference

A MultiPoint in SFA. More...

#include <MultiPoint.h>

Inheritance diagram for SFCGAL::MultiPoint:
SFCGAL::GeometryCollection SFCGAL::Geometry

Public Member Functions

 MultiPoint ()
 Empty MultiPoint constructor.
 
 MultiPoint (const MultiPoint &other)
 Copy constructor.
 
MultiPointoperator= (MultiPoint other)
 assign operator
 
virtual ~MultiPoint ()
 destructor
 
virtual MultiPointclone () const
 Get a deep copy of the geometry.
 
virtual std::string geometryType () const
 [OGC/SFA]returns the geometry type
 
virtual GeometryType geometryTypeId () const
 Returns a code corresponding to the type.
 
PointpointN (const size_t &n)
 returns the n-th Geometry as a Point
 
const PointpointN (const size_t &n) const
 returns the n-th Geometry as a Point
 
virtual void accept (GeometryVisitor &visitor)
 [visitor]dispatch visitor
 
virtual void accept (ConstGeometryVisitor &visitor) const
 [visitor]dispatch visitor
 
template<class Archive >
void serialize (Archive &ar, const unsigned int)
 Serializer.
 
- Public Member Functions inherited from SFCGAL::GeometryCollection
 GeometryCollection ()
 Empty GeometryCollection constructor.
 
 GeometryCollection (const GeometryCollection &other)
 Copy constructor.
 
GeometryCollectionoperator= (GeometryCollection other)
 assign operator
 
virtual ~GeometryCollection ()
 destructor
 
virtual GeometryCollectionclone () const
 Get a deep copy of the geometry.
 
virtual std::string geometryType () const
 [OGC/SFA]returns the geometry type
 
virtual GeometryType geometryTypeId () const
 Returns a code corresponding to the type.
 
virtual int dimension () const
 [OGC/SFA]Dimension of the Geometry ( 0 : punctual, 1 : curve, ...)
 
virtual int coordinateDimension () const
 [OGC/SFA]returns the dimension of the coordinates
 
virtual bool isEmpty () const
 [OGC/SFA]test if geometry is empty
 
virtual bool is3D () const
 [OGC/SFA]test if geometry is 3d
 
virtual bool isMeasured () const
 [OGC/SFA]test if geometry is measured (has an m)
 
virtual size_t numGeometries () const
 [OGC/SFA]Gets the number of geometries in a collection of geometries
 
virtual const GeometrygeometryN (size_t const &n) const
 [OGC/SFA]Returns the n-th geometry
 
virtual GeometrygeometryN (size_t const &n)
 [OGC/SFA]Returns the n-th geometry
 
void addGeometry (Geometry *geometry)
 [SFA/OGC]add a geometry to the collection (takes ownership)
 
void addGeometry (Geometry const &geometry)
 [SFA/OGC]add a geometry to the collection (clone instance)
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
virtual void accept (GeometryVisitor &visitor)
 [visitor]dispatch visitor
 
virtual void accept (ConstGeometryVisitor &visitor) const
 [visitor]dispatch visitor
 
template<class Archive >
void serialize (Archive &ar, const unsigned int)
 Serializer.
 
- Public Member Functions inherited from SFCGAL::Geometry
 Geometry ()
 Default constructor.
 
 Geometry (const Geometry &)=default
 Copy constructor.
 
Geometryoperator= (const Geometry &other)=default
 Copy assignemnt operator.
 
virtual ~Geometry ()=default
 Destructor.
 
virtual Geometryclone () const =0
 Get a deep copy of the geometry.
 
virtual std::string geometryType () const =0
 [OGC/SFA]returns the geometry type
 
virtual GeometryType geometryTypeId () const =0
 Returns a code corresponding to the type.
 
virtual int dimension () const =0
 [OGC/SFA]Dimension of the Geometry ( 0 : punctual, 1 : curve, ...)
 
virtual int coordinateDimension () const =0
 [OGC/SFA]returns the dimension of the coordinates
 
virtual bool isEmpty () const =0
 [OGC/SFA]test if geometry is empty
 
virtual bool is3D () const =0
 [OGC/SFA]test if geometry is 3d
 
virtual bool isMeasured () const =0
 [OGC/SFA]test if geometry is measured (has an m)
 
void forceValidityFlag (bool validity)
 Force the state of the validity flag.
 
bool hasValidityFlag () const
 Returns the validity flag.
 
std::string asText (const int &numDecimals=-1) const
 [OGC/SFA]returns the WKT string
 
std::string asWkb (boost::endian::order wkbOrder=boost::endian::order::native, bool asHex=false) const
 [OGC/SFA]returns the WKB string
 
Envelope envelope () const
 [OGC/SFA]Returns a polygon representing the BBOX of the geometry
 
virtual std::unique_ptr< Geometryboundary () const
 [OGC/SFA]Returns the boundary of the geometry
 
double distance (const Geometry &other) const
 Computes the distance to an other geometry.
 
double distance3D (const Geometry &other) const
 Computes the 3D distance to an other geometry.
 
void round (const long &scale=1)
 round the geometry with a corresponding scale factor
 
auto almostEqual (const Geometry &, const double tolerance) const -> bool
 Equality operator.
 
virtual size_t numGeometries () const
 [OGC/SFA]Gets the number of geometries in a collection of geometries
 
virtual const GeometrygeometryN (size_t const &n) const
 [OGC/SFA]Returns the n-th geometry
 
virtual GeometrygeometryN (size_t const &n)
 [OGC/SFA]Returns the n-th geometry
 
template<typename Derived >
bool is () const
 Tests if geometry is of "Derived" type given as template parameter.
 
template<typename Derived >
const Derived & as () const
 Downcast to a "Derived" class.
 
template<typename Derived >
Derived & as ()
 Downcast to a "Derived" class.
 
virtual void accept (GeometryVisitor &visitor)=0
 [visitor]dispatch visitor
 
virtual void accept (ConstGeometryVisitor &visitor) const =0
 [visitor]dispatch visitor
 
template<class Archive >
void serialize (Archive &, const unsigned int)
 Serializer.
 

Protected Member Functions

virtual bool isAllowed (Geometry const &g)
 Test if a geometry in the collection.
 
- Protected Member Functions inherited from SFCGAL::GeometryCollection
virtual bool isAllowed (Geometry const &g)
 Test if a geometry in the collection.
 
void swap (GeometryCollection &other)
 Swap.
 

Additional Inherited Members

- Public Types inherited from SFCGAL::GeometryCollection
typedef boost::ptr_vector< Geometry >::iterator iterator
 
typedef boost::ptr_vector< Geometry >::const_iterator const_iterator
 
- Protected Attributes inherited from SFCGAL::Geometry
bool validityFlag_
 

Detailed Description

A MultiPoint in SFA.

Constructor & Destructor Documentation

◆ MultiPoint() [1/2]

SFCGAL::MultiPoint::MultiPoint ( )

Empty MultiPoint constructor.

◆ MultiPoint() [2/2]

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

Copy constructor.

◆ ~MultiPoint()

SFCGAL::MultiPoint::~MultiPoint ( )
virtualdefault

destructor

Member Function Documentation

◆ accept() [1/2]

void SFCGAL::MultiPoint::accept ( ConstGeometryVisitor visitor) const
virtual

[visitor]dispatch visitor

Reimplemented from SFCGAL::GeometryCollection.

◆ accept() [2/2]

void SFCGAL::MultiPoint::accept ( GeometryVisitor visitor)
virtual

[visitor]dispatch visitor

Reimplemented from SFCGAL::GeometryCollection.

◆ clone()

auto SFCGAL::MultiPoint::clone ( ) const
virtual

Get a deep copy of the geometry.

Reimplemented from SFCGAL::GeometryCollection.

◆ geometryType()

auto SFCGAL::MultiPoint::geometryType ( ) const
virtual

[OGC/SFA]returns the geometry type

Warning
use CamelCase (LineString, not LINESTRING)

Reimplemented from SFCGAL::GeometryCollection.

◆ geometryTypeId()

auto SFCGAL::MultiPoint::geometryTypeId ( ) const
virtual

Returns a code corresponding to the type.

Warning
not standard

Reimplemented from SFCGAL::GeometryCollection.

◆ isAllowed()

auto SFCGAL::MultiPoint::isAllowed ( Geometry const &  g)
protectedvirtual

Test if a geometry in the collection.

Reimplemented from SFCGAL::GeometryCollection.

◆ operator=()

auto SFCGAL::MultiPoint::operator= ( MultiPoint  other)

assign operator

◆ pointN() [1/2]

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

returns the n-th Geometry as a Point

◆ pointN() [2/2]

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

returns the n-th Geometry as a Point

◆ serialize()

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

Serializer.