Skip to content

Class SFCGAL::PreparedGeometry

ClassList > SFCGAL > PreparedGeometry

More...

  • #include <PreparedGeometry.h>

Inherits the following classes: boost::noncopyable

Public Functions

Type Name
PreparedGeometry ()
PreparedGeometry (std::unique_ptr< Geometry > && geometry, srid_t srid=0)
PreparedGeometry (Geometry * geometry, srid_t srid=0)
const srid_t & SRID () const
srid_t & SRID ()
auto asEWKB (boost::endian::order wkbOrder=boost::endian::order::native, bool asHex=false) const
std::string asEWKT (const int & numDecimals=-1) const
const Envelope & envelope () const
const Geometry & geometry () const
Geometry & geometry ()
void invalidateCache ()
void load (Archive & ar, const unsigned int)
void resetGeometry (Geometry * geom)
void save (Archive & ar, const unsigned int) const
void serialize (Archive & ar, const unsigned int version)
virtual ~PreparedGeometry ()

Protected Attributes

Type Name
boost::optional< Envelope > _envelope
std::unique_ptr< Geometry > _geometry
srid_t _srid

Detailed Description

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>

Public Functions Documentation

function PreparedGeometry [1/3]

SFCGAL::PreparedGeometry::PreparedGeometry () 

Default constructor


function PreparedGeometry [2/3]

SFCGAL::PreparedGeometry::PreparedGeometry (
    std::unique_ptr< Geometry > && geometry,
    srid_t srid=0
) 

Constructor

Parameters:


function PreparedGeometry [3/3]

SFCGAL::PreparedGeometry::PreparedGeometry (
    Geometry * geometry,
    srid_t srid=0
) 

Constructor

Parameters:


function SRID [1/2]

inline const srid_t & SFCGAL::PreparedGeometry::SRID () const

SRID read only accessor


function SRID [2/2]

inline srid_t & SFCGAL::PreparedGeometry::SRID () 

SRID accessor


function asEWKB

auto SFCGAL::PreparedGeometry::asEWKB (
    boost::endian::order wkbOrder=boost::endian::order::native,
    bool asHex=false
) const

function asEWKT

std::string SFCGAL::PreparedGeometry::asEWKT (
    const int & numDecimals=-1
) const

Convert to an extended WKT (with SRID)

Parameters:

  • numDecimals number of decimals, -1 for keeping the exact rational representation, if possible

function envelope

const Envelope & SFCGAL::PreparedGeometry::envelope () const

Envelope accessor (using cache)


function geometry [1/2]

const Geometry & SFCGAL::PreparedGeometry::geometry () const

Geometry accessors


function geometry [2/2]

Geometry & SFCGAL::PreparedGeometry::geometry () 

function invalidateCache

void SFCGAL::PreparedGeometry::invalidateCache () 

Resets the cache


function load

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

function resetGeometry

void SFCGAL::PreparedGeometry::resetGeometry (
    Geometry * geom
) 

Geometry setter


function save

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

Serializer


function serialize

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

function ~PreparedGeometry

virtual SFCGAL::PreparedGeometry::~PreparedGeometry () 

Protected Attributes Documentation

variable _envelope

boost::optional<Envelope> SFCGAL::PreparedGeometry::_envelope;

variable _geometry

std::unique_ptr<Geometry> SFCGAL::PreparedGeometry::_geometry;

variable _srid

srid_t SFCGAL::PreparedGeometry::_srid;


The documentation for this class was generated from the following file /builds/sfcgal/SFCGAL/src/PreparedGeometry.h