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

A MultiLineString in SFA. More...

#include <MultiLineString.h>

Inheritance diagram for SFCGAL::MultiLineString:
SFCGAL::GeometryCollection SFCGAL::Geometry

Public Member Functions

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

Protected Member Functions

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

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 MultiLineString in SFA.

Constructor & Destructor Documentation

◆ MultiLineString() [1/2]

SFCGAL::MultiLineString::MultiLineString ( )

Empty MultiLineString constructor.

◆ MultiLineString() [2/2]

SFCGAL::MultiLineString::MultiLineString ( const MultiLineString other)
default

Copy constructor.

◆ ~MultiLineString()

SFCGAL::MultiLineString::~MultiLineString ( )
virtualdefault

destructor

Member Function Documentation

◆ accept() [1/2]

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

[visitor]dispatch visitor

Reimplemented from SFCGAL::GeometryCollection.

◆ accept() [2/2]

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

[visitor]dispatch visitor

Reimplemented from SFCGAL::GeometryCollection.

◆ clone()

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

Get a deep copy of the geometry.

Reimplemented from SFCGAL::GeometryCollection.

◆ geometryType()

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

[OGC/SFA]returns the geometry type

Warning
use CamelCase (LineString, not LINESTRING)

Reimplemented from SFCGAL::GeometryCollection.

◆ geometryTypeId()

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

Returns a code corresponding to the type.

Warning
not standard

Reimplemented from SFCGAL::GeometryCollection.

◆ isAllowed()

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

Test if a geometry in the collection.

Reimplemented from SFCGAL::GeometryCollection.

◆ lineStringN() [1/2]

LineString & SFCGAL::MultiLineString::lineStringN ( const size_t &  n)
inline

returns the n-th Geometry as a Polygon

◆ lineStringN() [2/2]

const LineString & SFCGAL::MultiLineString::lineStringN ( const size_t &  n) const
inline

returns the n-th Geometry as a Polygon

◆ operator=()

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

assign operator

◆ serialize()

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

Serializer.