|
SFCGAL 2.3.0
|
A GeometryCollection in SFA. More...
#include <GeometryCollection.h>
Public Types | |
| using | iterator |
| Iterator type for geometry collection. | |
| using | const_iterator |
| Const iterator type for geometry collection. | |
Public Member Functions | |
| GeometryCollection () | |
| Empty GeometryCollection constructor. | |
| GeometryCollection (const GeometryCollection &other) | |
| Copy constructor. | |
| auto | operator= (GeometryCollection other) -> GeometryCollection & |
| assign operator | |
| ~GeometryCollection () 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 | dimension () const -> int override |
| Get the dimension of the collection. | |
| auto | coordinateDimension () const -> int override |
| Get the coordinate dimension. | |
| auto | isEmpty () const -> bool override |
| Check if the collection is empty. | |
| auto | is3D () const -> bool override |
| Check if the collection has 3D coordinates. | |
| auto | isMeasured () const -> bool override |
| Check if the collection has measured coordinates. | |
| auto | dropZ () -> bool override |
| Drop Z coordinate from all geometries. | |
| auto | dropM () -> bool override |
| Drop M coordinate from all geometries. | |
| auto | swapXY () -> void override |
| Swap X and Y coordinates of all geometries in collection. | |
| auto | numGeometries () const -> size_t override |
| Get the number of geometries in the collection. | |
| auto | geometryN (size_t const &n) const -> const Geometry &override |
| Get the n-th geometry in the collection (const version). | |
| auto | geometryN (size_t const &n) -> Geometry &override |
| Get the n-th geometry in the collection (non-const version). | |
| void | setGeometryN (const Geometry &geometry, size_t const &idx) override |
| Set the geometry at the given index (copy version). | |
| void | setGeometryN (Geometry *geometry, size_t const &idx) override |
| Set the geometry at the given index (pointer version). | |
| void | setGeometryN (std::unique_ptr< Geometry > geometry, size_t const &idx) override |
| [SFA/OGC] Sets the n-th geometry using unique_ptr | |
| void | addGeometry (std::unique_ptr< Geometry > geometry) |
| [SFA/OGC] Add a geometry to the collection. | |
| 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) | |
| auto | begin () -> iterator |
| Get iterator to beginning of geometries. | |
| auto | begin () const -> const_iterator |
| Get const iterator to beginning of geometries. | |
| auto | end () -> iterator |
| Get iterator to end of geometries. | |
| auto | end () const -> const_iterator |
| Get const iterator to end of geometries. | |
| 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 | |
| virtual auto | isAllowed (Geometry const &geometry) -> bool |
| Test if a geometry is allowed in the collection. | |
| void | swap (GeometryCollection &other) |
| Swap the contents of two geometry collections. | |
A GeometryCollection in SFA.
Const iterator type for geometry collection.
Iterator type for geometry collection.
|
default |
Empty GeometryCollection constructor.
| SFCGAL::GeometryCollection::GeometryCollection | ( | const GeometryCollection & | other | ) |
Copy constructor.
| other | The geometry collection to copy from |
|
overridedefault |
destructor
|
override |
Accept a const geometry visitor.
| visitor | Const visitor to accept |
|
override |
Accept a geometry visitor.
| visitor | Visitor to accept |
| void SFCGAL::GeometryCollection::addGeometry | ( | Geometry * | geometry | ) |
[SFA/OGC]add a geometry to the collection (takes ownership)
| geometry | Pointer to geometry to add |
| void SFCGAL::GeometryCollection::addGeometry | ( | Geometry const & | geometry | ) |
[SFA/OGC]add a geometry to the collection (clone instance)
| geometry | Const reference to geometry to clone and add |
| void SFCGAL::GeometryCollection::addGeometry | ( | std::unique_ptr< Geometry > | geometry | ) |
[SFA/OGC] Add a geometry to the collection.
| geometry | A unique pointer to the Geometry object to add. Ownership of this geometry is moved into the GeometryCollection. |
|
inline |
Get iterator to beginning of geometries.
|
inline |
Get const iterator to beginning of geometries.
|
nodiscardoverride |
Get the coordinate dimension.
|
nodiscardoverride |
Get the dimension of the collection.
|
override |
Drop M coordinate from all geometries.
|
override |
Drop Z coordinate from all geometries.
|
inline |
Get iterator to end of geometries.
|
inline |
Get const iterator to end of geometries.
|
override |
Get the n-th geometry in the collection (non-const version).
| n | Index of the geometry to retrieve |
|
override |
Get the n-th geometry in the collection (const version).
| n | Index of the geometry to retrieve |
|
nodiscardoverride |
Get the geometry type as string.
|
nodiscardoverride |
Get the geometry type identifier.
|
nodiscardoverride |
Check if the collection has 3D coordinates.
|
protectedvirtual |
Test if a geometry is allowed in the collection.
| geometry | Geometry to test |
|
nodiscardoverride |
Check if the collection is empty.
|
nodiscardoverride |
Check if the collection has measured coordinates.
|
nodiscardoverride |
Get the number of geometries in the collection.
| auto SFCGAL::GeometryCollection::operator= | ( | GeometryCollection | other | ) | -> GeometryCollection & |
assign operator
| other | The geometry collection to assign from |
|
inline |
Serializer.
| ar | Archive for serialization |
|
override |
Set the geometry at the given index (copy version).
| geometry | Geometry to copy and set |
| idx | Index where to set the geometry |
|
override |
Set the geometry at the given index (pointer version).
| geometry | Pointer to geometry to set |
| idx | Index where to set the geometry |
|
override |
[SFA/OGC] Sets the n-th geometry using unique_ptr
| geometry | Unique pointer to geometry to set |
| idx | Index where to set the geometry |
|
inlineprotected |
Swap the contents of two geometry collections.
| other | GeometryCollection to swap with |
|
override |
Swap X and Y coordinates of all geometries in collection.