|
SFCGAL 2.0.0
|
A LineString in SFA. More...
#include <LineString.h>
Classes | |
| class | Point_2_const_iterator |
| Const iterator to 2D points TODO: replace by boost::tranform_iterator ? More... | |
| class | Point_3_const_iterator |
| Const iterator to 3D points TODO: replace by boost::tranform_iterator ? More... | |
Public Types | |
| typedef boost::ptr_vector< Point >::iterator | iterator |
| typedef boost::ptr_vector< Point >::const_iterator | const_iterator |
Public Member Functions | |
| LineString () | |
| Empty LineString constructor. | |
| LineString (const std::vector< Point > &points) | |
| Constructor with a point vector. | |
| LineString (const Point &startPoint, const Point &endPoint) | |
| LineString constructor. | |
| LineString (LineString const &other) | |
| Copy constructor. | |
| LineString & | operator= (LineString other) |
| assign operator | |
| ~LineString () | |
| destructor | |
| virtual LineString * | 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 | dimension () const |
| [OGC/SFA]Dimension of the Geometry ( 0 : punctual, 1 : curve, ...) | |
| 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) | |
| void | clear () |
| remove all points from the LineString | |
| void | reverse () |
| reverse LineString orientation | |
| size_t | numPoints () const |
| [SFA/OGC]Returns the number of points | |
| size_t | numSegments () const |
| Returns the number of segments. | |
| const Point & | pointN (size_t const &n) const |
| [SFA/OGC]Returns the n-th point | |
| Point & | pointN (size_t const &n) |
| [SFA/OGC]Returns the n-th point | |
| const Point & | startPoint () const |
| [SFA/OGC]Returns the first point | |
| Point & | startPoint () |
| [SFA/OGC]Returns the first point | |
| const Point & | endPoint () const |
| [SFA/OGC]Returns the first point | |
| Point & | endPoint () |
| [SFA/OGC]Returns the first point | |
| void | addPoint (const Point &p) |
| append a Point to the LineString | |
| void | addPoint (Point *p) |
| append a Point to the LineString and takes ownership | |
| bool | isClosed () const |
| test if the LineString is closed | |
| void | closes () |
| closes the LineString | |
| iterator | begin () |
| const_iterator | begin () const |
| iterator | end () |
| const_iterator | end () const |
| void | reserve (const size_t &n) |
| Point_2_const_iterator | points_2_begin () const |
| Point_2_const_iterator | points_2_end () const |
| std::pair< Point_2_const_iterator, Point_2_const_iterator > | points_2 () const |
| Point_3_const_iterator | points_3_begin () const |
| Point_3_const_iterator | points_3_end () const |
| std::pair< Point_3_const_iterator, Point_3_const_iterator > | points_3 () const |
| CGAL::Polygon_2< Kernel > | toPolygon_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. | |
| Public Member Functions inherited from SFCGAL::Geometry | |
| Geometry () | |
| Default constructor. | |
| Geometry (const Geometry &)=default | |
| Copy constructor. | |
| Geometry & | operator= (const Geometry &other)=default |
| Copy assignemnt operator. | |
| virtual | ~Geometry ()=default |
| Destructor. | |
| 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 | |
| std::string | asWkb (boost::endian::order wkbOrder=boost::endian::order::native, bool asHex=false) const |
| [OGC/SFA]returns the WKB 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. | |
| template<class Archive> | |
| void | serialize (Archive &, const unsigned int) |
| Serializer. | |
Additional Inherited Members | |
| Protected Attributes inherited from SFCGAL::Geometry | |
| bool | validityFlag_ = false |
A LineString in SFA.
| typedef boost::ptr_vector<Point>::const_iterator SFCGAL::LineString::const_iterator |
| typedef boost::ptr_vector<Point>::iterator SFCGAL::LineString::iterator |
|
default |
Empty LineString constructor.
| SFCGAL::LineString::LineString | ( | const std::vector< Point > & | points | ) |
Constructor with a point vector.
LineString constructor.
| SFCGAL::LineString::LineString | ( | LineString const & | other | ) |
Copy constructor.
|
default |
destructor
|
virtual |
[visitor]dispatch visitor
Implements SFCGAL::Geometry.
|
virtual |
[visitor]dispatch visitor
Implements SFCGAL::Geometry.
|
inline |
append a Point to the LineString
|
inline |
append a Point to the LineString and takes ownership
|
inline |
|
inline |
| void SFCGAL::LineString::clear | ( | ) |
remove all points from the LineString
|
virtual |
Get a deep copy of the geometry.
Implements SFCGAL::Geometry.
|
inline |
closes the LineString
|
virtual |
[OGC/SFA]returns the dimension of the coordinates
Implements SFCGAL::Geometry.
|
virtual |
[OGC/SFA]Dimension of the Geometry ( 0 : punctual, 1 : curve, ...)
Implements SFCGAL::Geometry.
|
inline |
|
inline |
|
inline |
[SFA/OGC]Returns the first point
|
inline |
[SFA/OGC]Returns the first point
|
virtual |
[OGC/SFA]returns the geometry type
Implements SFCGAL::Geometry.
|
virtual |
|
virtual |
[OGC/SFA]test if geometry is 3d
Implements SFCGAL::Geometry.
| auto SFCGAL::LineString::isClosed | ( | ) | const |
test if the LineString is closed
|
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 |
[SFA/OGC]Returns the number of points
| auto SFCGAL::LineString::numSegments | ( | ) | const |
Returns the number of segments.
| auto SFCGAL::LineString::operator= | ( | LineString | other | ) |
assign operator
|
inline |
[SFA/OGC]Returns the n-th point
|
inline |
[SFA/OGC]Returns the n-th point
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| void SFCGAL::LineString::reserve | ( | const size_t & | n | ) |
| void SFCGAL::LineString::reverse | ( | ) |
reverse LineString orientation
|
inline |
Serializer.
|
inline |
[SFA/OGC]Returns the first point
|
inline |
[SFA/OGC]Returns the first point
| auto SFCGAL::LineString::toPolygon_2 | ( | bool | fixOrientation = true | ) | const |