SFCGAL 1.4.1
|
A Polygon in SFA with holes. More...
#include <Polygon.h>
Public Types | |
typedef boost::ptr_vector< LineString >::iterator | iterator |
typedef boost::ptr_vector< LineString >::const_iterator | const_iterator |
Public Member Functions | |
Polygon () | |
Empty Polygon constructor. | |
Polygon (const std::vector< LineString > &rings) | |
Constructor with an exterior ring. | |
Polygon (const LineString &exteriorRing) | |
Constructor with an exterior ring. | |
Polygon (LineString *exteriorRing) | |
Constructor with an exterior ring (takes ownership) | |
Polygon (const Triangle &triangle) | |
Constructor with a Triangle. | |
Polygon (const Polygon &other) | |
Copy constructor. | |
Polygon (const CGAL::Polygon_2< Kernel > &other) | |
Constructor from CGAL::Polygon_with_holes_2<K> | |
Polygon (const CGAL::Polygon_with_holes_2< Kernel > &other) | |
Constructor from CGAL::Polygon_with_holes_2<K> | |
Polygon & | operator= (Polygon other) |
assign operator | |
~Polygon () | |
destructor | |
virtual Polygon * | clone () const |
Get a deep copy of the geometry. | |
virtual std::string | geometryType () const |
[OGC/SFA]returns the geometry type | |
virtual GeometryType | geometryTypeId () const |
Returns a code corresponding to the type. | |
virtual int | coordinateDimension () const |
[OGC/SFA]returns the dimension of the coordinates | |
virtual bool | isEmpty () const |
[OGC/SFA]test if geometry is empty | |
virtual bool | is3D () const |
[OGC/SFA]test if geometry is 3d | |
virtual bool | isMeasured () const |
[OGC/SFA]test if geometry is measured (has an m) | |
bool | isCounterClockWiseOriented () const |
Check whether the 2D polygon is pointing up. | |
void | reverse () |
reverse Polygon orientation | |
const LineString & | exteriorRing () const |
[OGC/SFA]returns the exterior ring | |
LineString & | exteriorRing () |
[OGC/SFA]returns the exterior ring | |
void | setExteriorRing (const LineString &ring) |
Sets the exterior ring. | |
void | setExteriorRing (LineString *ring) |
Sets the exterior ring (takes ownership) | |
bool | hasInteriorRings () const |
Test if the polygon has interior rings. | |
size_t | numInteriorRings () const |
[OGC/SFA]returns the exterior ring | |
const LineString & | interiorRingN (const size_t &n) const |
[OGC/SFA]returns the exterior ring | |
LineString & | interiorRingN (const size_t &n) |
[OGC/SFA]returns the exterior ring | |
size_t | numRings () const |
Returns the number of rings. | |
const LineString & | ringN (const size_t &n) const |
Returns the n-th ring, 0 is exteriorRing. | |
LineString & | ringN (const size_t &n) |
Returns the n-th ring, 0 is exteriorRing. | |
void | addInteriorRing (const LineString &ls) |
append a ring to the Polygon | |
void | addInteriorRing (LineString *ls) |
append a ring to the Polygon (take ownership) | |
void | addRing (const LineString &ls) |
append a ring to the Polygon | |
void | addRing (LineString *ls) |
append a ring to the Polygon (take ownership) | |
iterator | begin () |
const_iterator | begin () const |
iterator | end () |
const_iterator | end () const |
CGAL::Polygon_2< Kernel > | toPolygon_2 (bool fixOrientation=true) const |
CGAL::Polygon_with_holes_2< Kernel > | toPolygon_with_holes_2 (bool fixOrientation=true) const |
virtual void | accept (GeometryVisitor &visitor) |
[visitor]dispatch visitor | |
virtual void | accept (ConstGeometryVisitor &visitor) const |
[visitor]dispatch visitor | |
template<class Archive > | |
void | serialize (Archive &ar, const unsigned int) |
Serializer. | |
![]() | |
virtual | ~Surface () |
destructor | |
virtual int | dimension () const |
[OGC/SFA]Dimension of the Geometry ( 0 : punctual, 1 : curve, ...) | |
![]() | |
Geometry () | |
Default constructor. | |
Geometry (const Geometry &)=default | |
Copy constructor. | |
Geometry & | operator= (const Geometry &other)=default |
Copy assignemnt operator. | |
virtual | ~Geometry ()=default |
Destructor. | |
virtual Geometry * | clone () const =0 |
Get a deep copy of the geometry. | |
virtual std::string | geometryType () const =0 |
[OGC/SFA]returns the geometry type | |
virtual GeometryType | geometryTypeId () const =0 |
Returns a code corresponding to the type. | |
virtual int | dimension () const =0 |
[OGC/SFA]Dimension of the Geometry ( 0 : punctual, 1 : curve, ...) | |
virtual int | coordinateDimension () const =0 |
[OGC/SFA]returns the dimension of the coordinates | |
virtual bool | isEmpty () const =0 |
[OGC/SFA]test if geometry is empty | |
virtual bool | is3D () const =0 |
[OGC/SFA]test if geometry is 3d | |
virtual bool | isMeasured () const =0 |
[OGC/SFA]test if geometry is measured (has an m) | |
void | forceValidityFlag (bool validity) |
Force the state of the validity flag. | |
bool | hasValidityFlag () const |
Returns the validity flag. | |
std::string | asText (const int &numDecimals=-1) const |
[OGC/SFA]returns the WKT string | |
Envelope | envelope () const |
[OGC/SFA]Returns a polygon representing the BBOX of the geometry | |
virtual std::unique_ptr< Geometry > | boundary () const |
[OGC/SFA]Returns the boundary of the geometry | |
double | distance (const Geometry &other) const |
Computes the distance to an other geometry. | |
double | distance3D (const Geometry &other) const |
Computes the 3D distance to an other geometry. | |
void | round (const long &scale=1) |
round the geometry with a corresponding scale factor | |
auto | almostEqual (const Geometry &, const double tolerance) const -> bool |
Equality operator. | |
virtual size_t | numGeometries () const |
[OGC/SFA]Gets the number of geometries in a collection of geometries | |
virtual const Geometry & | geometryN (size_t const &n) const |
[OGC/SFA]Returns the n-th geometry | |
virtual Geometry & | geometryN (size_t const &n) |
[OGC/SFA]Returns the n-th geometry | |
template<typename Derived > | |
bool | is () const |
Tests if geometry is of "Derived" type given as template parameter. | |
template<typename Derived > | |
const Derived & | as () const |
Downcast to a "Derived" class. | |
template<typename Derived > | |
Derived & | as () |
Downcast to a "Derived" class. | |
virtual void | accept (GeometryVisitor &visitor)=0 |
[visitor]dispatch visitor | |
virtual void | accept (ConstGeometryVisitor &visitor) const =0 |
[visitor]dispatch visitor | |
template<class Archive > | |
void | serialize (Archive &, const unsigned int) |
Serializer. | |
Additional Inherited Members | |
![]() | |
Surface () | |
[OGC/SFS]"The area of this Surface, as measured in the spatial reference
system of this Surface" | |
Surface (Surface const &other) | |
no copy constructor | |
![]() | |
bool | validityFlag_ |
A Polygon in SFA with holes.
typedef boost::ptr_vector<LineString>::const_iterator SFCGAL::Polygon::const_iterator |
typedef boost::ptr_vector<LineString>::iterator SFCGAL::Polygon::iterator |
SFCGAL::Polygon::Polygon | ( | ) |
Empty Polygon constructor.
SFCGAL::Polygon::Polygon | ( | const std::vector< LineString > & | rings | ) |
Constructor with an exterior ring.
SFCGAL::Polygon::Polygon | ( | const LineString & | exteriorRing | ) |
Constructor with an exterior ring.
SFCGAL::Polygon::Polygon | ( | LineString * | exteriorRing | ) |
Constructor with an exterior ring (takes ownership)
SFCGAL::Polygon::Polygon | ( | const Polygon & | other | ) |
Copy constructor.
SFCGAL::Polygon::Polygon | ( | const CGAL::Polygon_2< Kernel > & | other | ) |
Constructor from CGAL::Polygon_with_holes_2<K>
SFCGAL::Polygon::Polygon | ( | const CGAL::Polygon_with_holes_2< Kernel > & | other | ) |
Constructor from CGAL::Polygon_with_holes_2<K>
|
default |
destructor
|
virtual |
[visitor]dispatch visitor
Implements SFCGAL::Geometry.
|
virtual |
[visitor]dispatch visitor
Implements SFCGAL::Geometry.
|
inline |
append a ring to the Polygon
|
inline |
append a ring to the Polygon (take ownership)
|
inline |
append a ring to the Polygon
|
inline |
append a ring to the Polygon (take ownership)
|
inline |
|
inline |
|
virtual |
Get a deep copy of the geometry.
Implements SFCGAL::Geometry.
|
virtual |
[OGC/SFA]returns the dimension of the coordinates
Implements SFCGAL::Geometry.
|
inline |
|
inline |
|
inline |
[OGC/SFA]returns the exterior ring
|
inline |
[OGC/SFA]returns the exterior ring
|
virtual |
[OGC/SFA]returns the geometry type
Implements SFCGAL::Geometry.
|
virtual |
|
inline |
Test if the polygon has interior rings.
|
inline |
[OGC/SFA]returns the exterior ring
|
inline |
[OGC/SFA]returns the exterior ring
|
virtual |
[OGC/SFA]test if geometry is 3d
Implements SFCGAL::Geometry.
auto SFCGAL::Polygon::isCounterClockWiseOriented | ( | ) | const |
Check whether the 2D polygon is pointing up.
|
virtual |
[OGC/SFA]test if geometry is empty
Implements SFCGAL::Geometry.
|
virtual |
[OGC/SFA]test if geometry is measured (has an m)
Implements SFCGAL::Geometry.
|
inline |
[OGC/SFA]returns the exterior ring
|
inline |
Returns the number of rings.
auto SFCGAL::Polygon::operator= | ( | Polygon | other | ) |
assign operator
void SFCGAL::Polygon::reverse | ( | ) |
reverse Polygon orientation
|
inline |
Returns the n-th ring, 0 is exteriorRing.
|
inline |
Returns the n-th ring, 0 is exteriorRing.
|
inline |
Serializer.
|
inline |
Sets the exterior ring.
|
inline |
Sets the exterior ring (takes ownership)
auto SFCGAL::Polygon::toPolygon_2 | ( | bool | fixOrientation = true | ) | const |
auto SFCGAL::Polygon::toPolygon_with_holes_2 | ( | bool | fixOrientation = true | ) | const |