|
SFCGAL
2.3.0
|
A PreparedGeometry is a shell around a SFCGAL::Geometry. More...
#include <PreparedGeometry.h>
Public Member Functions | |
| PreparedGeometry () | |
| Default constructor. More... | |
| PreparedGeometry (std::unique_ptr< Geometry > &&geometry, srid_t srid=0) | |
| Constructor. More... | |
| PreparedGeometry (Geometry *geometry, srid_t srid=0) | |
| Constructor. More... | |
| ~PreparedGeometry () | |
| auto | geometry () const -> const Geometry & |
| Geometry accessors. More... | |
| auto | geometry () -> Geometry & |
| Geometry accessor. More... | |
| void | resetGeometry (Geometry *geom) |
| Geometry setter. More... | |
| auto | SRID () const -> const srid_t & |
| SRID read only accessor. More... | |
| auto | SRID () -> srid_t & |
| SRID accessor. More... | |
| auto | envelope () const -> const Envelope & |
| Envelope accessor (using cache) More... | |
| void | invalidateCache () |
| Resets the cache. More... | |
| auto | asEWKT (const int &numDecimals=-1) const -> std::string |
| Convert to an extended WKT (with SRID) More... | |
| auto | asEWKB (boost::endian::order wkbOrder=boost::endian::order::native, bool asHex=false) const -> std::string |
| Convert to Extended Well-Known Binary. More... | |
| template<class Archive > | |
| void | save (Archive &ar, const unsigned int) const |
| Save prepared geometry to archive. More... | |
| template<class Archive > | |
| void | load (Archive &ar, const unsigned int) |
| Load prepared geometry from archive. More... | |
| template<class Archive > | |
| void | serialize (Archive &ar, const unsigned int version) |
| Serialize prepared geometry to/from archive. More... | |
Protected Attributes | |
| std::unique_ptr< Geometry > | _geometry |
| Pointer to underlying Geometry. More... | |
| srid_t | _srid |
| SRID of the geometry. More... | |
| boost::optional< Envelope > | _envelope |
| Cached bounding box of the geometry. More... | |
A PreparedGeometry is a shell around a SFCGAL::Geometry.
It is used to store annex data, like SRID or cached computations
It is noncopyable since it stores a std::unique_ptr<SFCGAL::Geometry>
| SFCGAL::PreparedGeometry::PreparedGeometry | ( | ) |
Default constructor.
| SFCGAL::PreparedGeometry::PreparedGeometry | ( | std::unique_ptr< Geometry > && | geometry, |
| srid_t | srid = 0 |
||
| ) |
Constructor.
| geometry | pointer to the underlying SFCGAL::Geometry. Takes ownership |
| srid | The spatial reference system identifier |
| SFCGAL::PreparedGeometry::PreparedGeometry | ( | Geometry * | geometry, |
| srid_t | srid = 0 |
||
| ) |
Constructor.
| geometry | pointer to the underlying SFCGAL::Geometry. Takes ownership |
| srid | The spatial reference system identifier |
|
default |
| auto SFCGAL::PreparedGeometry::asEWKB | ( | boost::endian::order | wkbOrder = boost::endian::order::native, |
| bool | asHex = false |
||
| ) | const -> std::string |
Convert to Extended Well-Known Binary.
| wkbOrder | Byte order for WKB output |
| asHex | Return as hexadecimal string if true |
| auto SFCGAL::PreparedGeometry::asEWKT | ( | const int & | numDecimals = -1 | ) | const -> std::string |
Convert to an extended WKT (with SRID)
| numDecimals | number of decimals, -1 for keeping the exact rational representation, if possible |
| auto SFCGAL::PreparedGeometry::envelope | ( | ) | const -> const Envelope & |
Envelope accessor (using cache)
| auto SFCGAL::PreparedGeometry::geometry | ( | ) | const -> const Geometry & |
Geometry accessors.
| auto SFCGAL::PreparedGeometry::geometry | ( | ) | -> Geometry & |
Geometry accessor.
| void SFCGAL::PreparedGeometry::invalidateCache | ( | ) |
Resets the cache.
|
inline |
Load prepared geometry from archive.
| ar | Archive to load from |
| void SFCGAL::PreparedGeometry::resetGeometry | ( | Geometry * | geom | ) |
Geometry setter.
| geom | The new geometry to set |
|
inline |
Save prepared geometry to archive.
| ar | Archive to save to |
|
inline |
Serialize prepared geometry to/from archive.
| ar | Archive for serialization |
| version | Serialization version |
|
inline |
SRID read only accessor.
|
inline |
SRID accessor.
|
mutableprotected |
Cached bounding box of the geometry.
|
protected |
Pointer to underlying Geometry.
|
protected |
SRID of the geometry.
1.8.10