|
SFCGAL
2.3.0
|
A GeometryCollection in SFA. More...
#include <GeometryCollection.h>
Inherits SFCGAL::GeometryImpl< Derived, Base >.
Inherited by SFCGAL::GeometryImpl< MultiLineString, GeometryCollection >, SFCGAL::GeometryImpl< MultiPoint, GeometryCollection >, SFCGAL::GeometryImpl< MultiPolygon, GeometryCollection >, and SFCGAL::GeometryImpl< MultiSolid, GeometryCollection >.
Public Types | |
| using | iterator = DereferenceIterator< std::vector< std::unique_ptr< Geometry >>::iterator > |
| Iterator type for geometry collection. More... | |
| using | const_iterator = DereferenceIterator< std::vector< std::unique_ptr< Geometry >>::const_iterator > |
| Const iterator type for geometry collection. More... | |
Public Member Functions | |
| GeometryCollection () | |
| Empty GeometryCollection constructor. More... | |
| GeometryCollection (const GeometryCollection &other) | |
| Copy constructor. More... | |
| auto | operator= (GeometryCollection other) -> GeometryCollection & |
| assign operator More... | |
| ~GeometryCollection () override | |
| destructor More... | |
| auto | geometryType () const -> std::string override |
| Get the geometry type as string. More... | |
| auto | geometryTypeId () const -> GeometryType override |
| Get the geometry type identifier. More... | |
| auto | dimension () const -> int override |
| Get the dimension of the collection. More... | |
| auto | coordinateDimension () const -> int override |
| Get the coordinate dimension. More... | |
| auto | isEmpty () const -> bool override |
| Check if the collection is empty. More... | |
| auto | is3D () const -> bool override |
| Check if the collection has 3D coordinates. More... | |
| auto | isMeasured () const -> bool override |
| Check if the collection has measured coordinates. More... | |
| auto | dropZ () -> bool override |
| Drop Z coordinate from all geometries. More... | |
| auto | dropM () -> bool override |
| Drop M coordinate from all geometries. More... | |
| auto | swapXY () -> void override |
| Swap X and Y coordinates of all geometries in collection. More... | |
| auto | numGeometries () const -> size_t override |
| Get the number of geometries in the collection. More... | |
| auto | geometryN (size_t const &n) const -> const Geometry &override |
| Get the n-th geometry in the collection (const version) More... | |
| auto | geometryN (size_t const &n) -> Geometry &override |
| Get the n-th geometry in the collection (non-const version) More... | |
| void | setGeometryN (const Geometry &geometry, size_t const &idx) override |
| Set the geometry at the given index (copy version) More... | |
| void | setGeometryN (Geometry *geometry, size_t const &idx) override |
| Set the geometry at the given index (pointer version) More... | |
| void | setGeometryN (std::unique_ptr< Geometry > geometry, size_t const &idx) override |
| [SFA/OGC] Sets the n-th geometry using unique_ptr More... | |
| void | addGeometry (std::unique_ptr< Geometry > geometry) |
| [SFA/OGC] Add a geometry to the collection. 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... | |
| auto | begin () -> iterator |
| Get iterator to beginning of geometries. More... | |
| auto | begin () const -> const_iterator |
| Get const iterator to beginning of geometries. More... | |
| auto | end () -> iterator |
| Get iterator to end of geometries. More... | |
| auto | end () const -> const_iterator |
| Get const iterator to end of geometries. More... | |
| void | accept (GeometryVisitor &visitor) override |
| Accept a geometry visitor. More... | |
| void | accept (ConstGeometryVisitor &visitor) const override |
| Accept a const geometry visitor. More... | |
| template<class Archive > | |
| void | serialize (Archive &ar, const unsigned int) |
| Serializer. More... | |
Protected Member Functions | |
| virtual auto | isAllowed (Geometry const &geometry) -> bool |
| Test if a geometry is allowed in the collection. More... | |
| void | swap (GeometryCollection &other) |
| Swap the contents of two geometry collections. More... | |
A GeometryCollection in SFA.
| using SFCGAL::GeometryCollection::const_iterator = DereferenceIterator< std::vector<std::unique_ptr<Geometry>>::const_iterator> |
Const iterator type for geometry collection.
| using SFCGAL::GeometryCollection::iterator = DereferenceIterator<std::vector<std::unique_ptr<Geometry>>::iterator> |
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 geometry visitor.
| visitor | Visitor to accept |
|
override |
Accept a const geometry visitor.
| visitor | Const visitor to accept |
| 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. |
| 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 |
|
inline |
Get iterator to beginning of geometries.
|
inline |
Get const iterator to beginning of geometries.
|
override |
Get the coordinate dimension.
|
override |
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 (const version)
| n | Index of the geometry to retrieve |
|
override |
Get the n-th geometry in the collection (non-const version)
| n | Index of the geometry to retrieve |
|
override |
Get the geometry type as string.
|
override |
Get the geometry type identifier.
|
override |
Check if the collection has 3D coordinates.
|
protectedvirtual |
Test if a geometry is allowed in the collection.
| geometry | Geometry to test |
|
override |
Check if the collection is empty.
|
override |
Check if the collection has measured coordinates.
|
override |
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.
1.8.10