A PreparedGeometry is a shell around a SFCGAL::Geometry.
More...
#include <PreparedGeometry.h>
|
| | PreparedGeometry () |
| | Default constructor.
|
| | PreparedGeometry (std::unique_ptr< Geometry > &&geometry, srid_t srid=0) |
| | Constructor.
|
| | PreparedGeometry (Geometry *geometry, srid_t srid=0) |
| | Constructor.
|
| | ~PreparedGeometry () |
| auto | geometry () const -> const Geometry & |
| | Geometry accessors.
|
| auto | geometry () -> Geometry & |
| | Geometry accessor.
|
| void | resetGeometry (Geometry *geom) |
| | Geometry setter.
|
| auto | SRID () const -> const srid_t & |
| | SRID read only accessor.
|
| auto | SRID () -> srid_t & |
| | SRID accessor.
|
| auto | envelope () const -> const Envelope & |
| | Envelope accessor (using cache).
|
| void | invalidateCache () |
| | Resets the cache.
|
| auto | asEWKT (const int &numDecimals=-1) const -> std::string |
| | Convert to an extended WKT (with SRID).
|
| auto | asEWKB (boost::endian::order wkbOrder=boost::endian::order::native, bool asHex=false) const -> std::string |
| | Convert to Extended Well-Known Binary.
|
| template<class Archive> |
| void | save (Archive &ar, const unsigned int) const |
| | Save prepared geometry to archive.
|
| template<class Archive> |
| void | load (Archive &ar, const unsigned int) |
| | Load prepared geometry from archive.
|
| template<class Archive> |
| void | serialize (Archive &ar, const unsigned int version) |
| | Serialize prepared geometry to/from archive.
|
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>
◆ PreparedGeometry() [1/3]
| SFCGAL::PreparedGeometry::PreparedGeometry |
( |
| ) |
|
◆ PreparedGeometry() [2/3]
| SFCGAL::PreparedGeometry::PreparedGeometry |
( |
std::unique_ptr< Geometry > && | geometry, |
|
|
srid_t | srid = 0 ) |
Constructor.
- Parameters
-
| geometry | pointer to the underlying SFCGAL::Geometry. Takes ownership |
| srid | The spatial reference system identifier |
◆ PreparedGeometry() [3/3]
| SFCGAL::PreparedGeometry::PreparedGeometry |
( |
Geometry * | geometry, |
|
|
srid_t | srid = 0 ) |
Constructor.
- Parameters
-
| geometry | pointer to the underlying SFCGAL::Geometry. Takes ownership |
| srid | The spatial reference system identifier |
◆ ~PreparedGeometry()
| SFCGAL::PreparedGeometry::~PreparedGeometry |
( |
| ) |
|
|
default |
◆ asEWKB()
| auto SFCGAL::PreparedGeometry::asEWKB |
( |
boost::endian::order | wkbOrder = boost::endian::order::native, |
|
|
bool | asHex = false ) const -> std::string |
Convert to Extended Well-Known Binary.
- Parameters
-
| wkbOrder | Byte order for WKB output |
| asHex | Return as hexadecimal string if true |
- Returns
- Extended WKB representation
◆ asEWKT()
| auto SFCGAL::PreparedGeometry::asEWKT |
( |
const int & | numDecimals = -1 | ) |
const -> std::string |
|
nodiscard |
Convert to an extended WKT (with SRID).
- Parameters
-
| numDecimals | number of decimals, -1 for keeping the exact rational representation, if possible |
- Returns
- Extended WKT representation with SRID
◆ envelope()
| auto SFCGAL::PreparedGeometry::envelope |
( |
| ) |
const -> const Envelope & |
|
nodiscard |
Envelope accessor (using cache).
- Returns
- The envelope of the geometry
◆ geometry() [1/2]
| auto SFCGAL::PreparedGeometry::geometry |
( |
| ) |
-> Geometry & |
Geometry accessor.
- Returns
- Reference to the geometry
◆ geometry() [2/2]
| auto SFCGAL::PreparedGeometry::geometry |
( |
| ) |
const -> const Geometry & |
Geometry accessors.
- Returns
- Const reference to the geometry
◆ invalidateCache()
| void SFCGAL::PreparedGeometry::invalidateCache |
( |
| ) |
|
◆ load()
template<class Archive>
| void SFCGAL::PreparedGeometry::load |
( |
Archive & | ar, |
|
|
const unsigned int | ) |
|
inline |
Load prepared geometry from archive.
- Parameters
-
◆ resetGeometry()
| void SFCGAL::PreparedGeometry::resetGeometry |
( |
Geometry * | geom | ) |
|
Geometry setter.
- Parameters
-
| geom | The new geometry to set |
◆ save()
template<class Archive>
| void SFCGAL::PreparedGeometry::save |
( |
Archive & | ar, |
|
|
const unsigned int | ) const |
|
inline |
Save prepared geometry to archive.
- Parameters
-
◆ serialize()
template<class Archive>
| void SFCGAL::PreparedGeometry::serialize |
( |
Archive & | ar, |
|
|
const unsigned int | version ) |
|
inline |
Serialize prepared geometry to/from archive.
- Parameters
-
| ar | Archive for serialization |
| version | Serialization version |
◆ SRID() [1/2]
| auto SFCGAL::PreparedGeometry::SRID |
( |
| ) |
-> srid_t & |
|
inline |
SRID accessor.
- Returns
- Reference to the spatial reference system identifier
◆ SRID() [2/2]
| auto SFCGAL::PreparedGeometry::SRID |
( |
| ) |
const -> const srid_t & |
|
inlinenodiscard |
SRID read only accessor.
- Returns
- The spatial reference system identifier
◆ _envelope
| boost::optional<Envelope> SFCGAL::PreparedGeometry::_envelope |
|
mutableprotected |
Cached bounding box of the geometry.
◆ _geometry
| std::unique_ptr<Geometry> SFCGAL::PreparedGeometry::_geometry |
|
protected |
Pointer to underlying Geometry.
◆ _srid
| srid_t SFCGAL::PreparedGeometry::_srid |
|
protected |