Skip to content

Class SFCGAL::Polygon#

ClassList > SFCGAL > Polygon

More...

  • #include <Polygon.h>

Inherits the following classes: SFCGAL::Surface

Public Types#

Type Name
typedef boost::ptr_vector< LineString >::const_iterator const_iterator
typedef boost::ptr_vector< LineString >::iterator iterator

Public Functions#

Type Name
Polygon ()
Polygon (const std::vector< LineString > & rings)
Polygon (const LineString & exteriorRing)
Polygon (LineString * exteriorRing)
Polygon (const Triangle & triangle)
Polygon (const Polygon & other)
Polygon (const CGAL::Polygon_2< Kernel > & other)
Polygon (const CGAL::Polygon_with_holes_2< Kernel > & other)
void accept (GeometryVisitor & visitor) override
void accept (ConstGeometryVisitor & visitor) override const
void addInteriorRing (const LineString & ls)
void addInteriorRing (LineString * ls)
void addRing (const LineString & ls)
void addRing (LineString * ls)
iterator begin ()
const_iterator begin () const
Polygon * clone () override const
int coordinateDimension () override const
auto dropM () override
auto dropZ () override
iterator end ()
const_iterator end () const
const LineString & exteriorRing () const
LineString & exteriorRing ()
std::string geometryType () override const
GeometryType geometryTypeId () override const
bool hasInteriorRings () const
const LineString & interiorRingN (const size_t & n) const
LineString & interiorRingN (const size_t & n)
bool is3D () override const
bool isCounterClockWiseOriented () const
bool isEmpty () override const
bool isMeasured () override const
size_t numInteriorRings () const
size_t numRings () const
Polygon & operator= (Polygon other)
void reverse ()
const LineString & ringN (const size_t & n) const
LineString & ringN (const size_t & n)
void serialize (Archive & ar, const unsigned int)
void setExteriorRing (const LineString & ring)
void setExteriorRing (LineString * ring)
auto swapXY () override
CGAL::Polygon_2< Kernel > toPolygon_2 (bool fixOrientation=true) const
CGAL::Polygon_with_holes_2< Kernel > toPolygon_with_holes_2 (bool fixOrientation=true) const
~Polygon ()

Public Functions inherited from SFCGAL::Surface#

See SFCGAL::Surface

Type Name
int dimension () override const
virtual ~Surface ()

Protected Functions inherited from SFCGAL::Surface#

See SFCGAL::Surface

Type Name
Surface ()
Surface (Surface const & other)

Detailed Description#

A Polygon in SFA with holes

Public Types Documentation#

typedef const_iterator#

typedef boost::ptr_vector<LineString>::const_iterator SFCGAL::Polygon::const_iterator;

typedef iterator#

typedef boost::ptr_vector<LineString>::iterator SFCGAL::Polygon::iterator;

Public Functions Documentation#

function Polygon [1/8]#

SFCGAL::Polygon::Polygon () 

Empty Polygon constructor


function Polygon [2/8]#

SFCGAL::Polygon::Polygon (
    const std::vector< LineString > & rings
) 

Constructor with an exterior ring


function Polygon [3/8]#

SFCGAL::Polygon::Polygon (
    const LineString & exteriorRing
) 

Constructor with an exterior ring


function Polygon [4/8]#

SFCGAL::Polygon::Polygon (
    LineString * exteriorRing
) 

Constructor with an exterior ring (takes ownership)


function Polygon [5/8]#

SFCGAL::Polygon::Polygon (
    const Triangle & triangle
) 

Constructor with a Triangle


function Polygon [6/8]#

SFCGAL::Polygon::Polygon (
    const Polygon & other
) 

Copy constructor


function Polygon [7/8]#

SFCGAL::Polygon::Polygon (
    const CGAL::Polygon_2< Kernel > & other
) 

Constructor from CGAL::Polygon_with_holes_2<K>


function Polygon [8/8]#

SFCGAL::Polygon::Polygon (
    const CGAL::Polygon_with_holes_2< Kernel > & other
) 

Constructor from CGAL::Polygon_with_holes_2<K>


function accept [1/2]#

void SFCGAL::Polygon::accept (
    GeometryVisitor & visitor
) override

function accept [2/2]#

void SFCGAL::Polygon::accept (
    ConstGeometryVisitor & visitor
) override const

function addInteriorRing [1/2]#

inline void SFCGAL::Polygon::addInteriorRing (
    const LineString & ls
) 

append a ring to the Polygon


function addInteriorRing [2/2]#

inline void SFCGAL::Polygon::addInteriorRing (
    LineString * ls
) 

append a ring to the Polygon (take ownership)


function addRing [1/2]#

inline void SFCGAL::Polygon::addRing (
    const LineString & ls
) 

append a ring to the Polygon

Deprecated

addInteriorRing


function addRing [2/2]#

inline void SFCGAL::Polygon::addRing (
    LineString * ls
) 

append a ring to the Polygon (take ownership)

Deprecated

addInteriorRing


function begin [1/2]#

inline iterator SFCGAL::Polygon::begin () 

function begin [2/2]#

inline const_iterator SFCGAL::Polygon::begin () const

function clone#

Polygon * SFCGAL::Polygon::clone () override const

function coordinateDimension#

int SFCGAL::Polygon::coordinateDimension () override const

function dropM#

auto SFCGAL::Polygon::dropM () override

function dropZ#

auto SFCGAL::Polygon::dropZ () override

function end [1/2]#

inline iterator SFCGAL::Polygon::end () 

function end [2/2]#

inline const_iterator SFCGAL::Polygon::end () const

function exteriorRing [1/2]#

inline const LineString & SFCGAL::Polygon::exteriorRing () const

[OGC/SFA]returns the exterior ring


function exteriorRing [2/2]#

inline LineString & SFCGAL::Polygon::exteriorRing () 

[OGC/SFA]returns the exterior ring


function geometryType#

std::string SFCGAL::Polygon::geometryType () override const

function geometryTypeId#

GeometryType SFCGAL::Polygon::geometryTypeId () override const

function hasInteriorRings#

inline bool SFCGAL::Polygon::hasInteriorRings () const

Test if the polygon has interior rings


function interiorRingN [1/2]#

inline const LineString & SFCGAL::Polygon::interiorRingN (
    const size_t & n
) const

[OGC/SFA]returns the exterior ring


function interiorRingN [2/2]#

inline LineString & SFCGAL::Polygon::interiorRingN (
    const size_t & n
) 

[OGC/SFA]returns the exterior ring


function is3D#

bool SFCGAL::Polygon::is3D () override const

function isCounterClockWiseOriented#

bool SFCGAL::Polygon::isCounterClockWiseOriented () const

Check whether the 2D polygon is pointing up


function isEmpty#

bool SFCGAL::Polygon::isEmpty () override const

function isMeasured#

bool SFCGAL::Polygon::isMeasured () override const

function numInteriorRings#

inline size_t SFCGAL::Polygon::numInteriorRings () const

[OGC/SFA]returns the exterior ring


function numRings#

inline size_t SFCGAL::Polygon::numRings () const

Returns the number of rings


function operator=#

Polygon & SFCGAL::Polygon::operator= (
    Polygon other
) 

assign operator


function reverse#

void SFCGAL::Polygon::reverse () 

reverse Polygon orientation


function ringN [1/2]#

inline const LineString & SFCGAL::Polygon::ringN (
    const size_t & n
) const

Returns the n-th ring, 0 is exteriorRing

Warning:

not standard, avoid conditionnal to access rings


function ringN [2/2]#

inline LineString & SFCGAL::Polygon::ringN (
    const size_t & n
) 

Returns the n-th ring, 0 is exteriorRing

Warning:

not standard, avoid conditionnal to access rings


function serialize#

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

Serializer


function setExteriorRing [1/2]#

inline void SFCGAL::Polygon::setExteriorRing (
    const LineString & ring
) 

Sets the exterior ring


function setExteriorRing [2/2]#

inline void SFCGAL::Polygon::setExteriorRing (
    LineString * ring
) 

Sets the exterior ring (takes ownership)


function swapXY#

auto SFCGAL::Polygon::swapXY () override

function toPolygon_2#

CGAL::Polygon_2< Kernel > SFCGAL::Polygon::toPolygon_2 (
    bool fixOrientation=true
) const

function toPolygon_with_holes_2#

CGAL::Polygon_with_holes_2< Kernel > SFCGAL::Polygon::toPolygon_with_holes_2 (
    bool fixOrientation=true
) const

function ~Polygon#

SFCGAL::Polygon::~Polygon () 

destructor



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