|
SFCGAL
2.3.0
|
A LineString in SFA. More...
#include <LineString.h>
Inherits SFCGAL::GeometryImpl< Derived, Base >.
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 | |
| using | iterator = DereferenceIterator< std::vector< std::unique_ptr< Point >>::iterator > |
| Iterator type for linestring points. More... | |
| using | const_iterator = DereferenceIterator< std::vector< std::unique_ptr< Point >>::const_iterator > |
| Const iterator type for linestring points. More... | |
Public Member Functions | |
| LineString () | |
| Empty LineString constructor. More... | |
| LineString (const std::vector< Point > &points) | |
| Constructor with a point vector. More... | |
| LineString (const Point &startPoint, const Point &endPoint) | |
| LineString constructor. More... | |
| LineString (LineString const &other) | |
| Copy constructor. More... | |
| auto | operator= (LineString other) -> LineString & |
| assign operator More... | |
| ~LineString () override | |
| destructor More... | |
| auto | geometryType () const -> std::string override |
| Get the geometry type as string. More... | |
| auto | geometryTypeId () const -> GeometryType override |
| Get the geometry type identifier. More... | |
| auto | dimension () const -> int override |
| Get the dimension of the linestring. More... | |
| auto | coordinateDimension () const -> int override |
| Get the coordinate dimension. More... | |
| auto | isEmpty () const -> bool override |
| Check if the linestring is empty. More... | |
| auto | is3D () const -> bool override |
| Check if the linestring has 3D coordinates. More... | |
| auto | isMeasured () const -> bool override |
| Check if the linestring has measured coordinates. More... | |
| auto | dropZ () -> bool override |
| Drop Z coordinate from all points. More... | |
| auto | dropM () -> bool override |
| Drop M coordinate from all points. More... | |
| auto | swapXY () -> void override |
| Swap X and Y coordinates of all points. More... | |
| void | clear () |
| remove all points from the LineString More... | |
| void | reverse () |
| reverse LineString orientation More... | |
| auto | numPoints () const -> size_t |
| [SFA/OGC]Returns the number of points More... | |
| auto | numSegments () const -> size_t |
| Returns the number of segments. More... | |
| auto | pointN (size_t const &n) const -> const Point & |
| [SFA/OGC]Returns the n-th point More... | |
| auto | pointN (size_t const &n) -> Point & |
| [SFA/OGC]Returns the n-th point More... | |
| auto | startPoint () const -> const Point & |
| [SFA/OGC]Returns the first point More... | |
| auto | startPoint () -> Point & |
| [SFA/OGC]Returns the first point More... | |
| auto | endPoint () const -> const Point & |
| [SFA/OGC]Returns the last point More... | |
| auto | endPoint () -> Point & |
| [SFA/OGC]Returns the last point More... | |
| void | addPoint (const Point &point) |
| Appends a Point to the LineString. More... | |
| void | addPoint (Point *point) |
| Appends a Point to the LineString and takes ownership. More... | |
| void | addPoint (std::unique_ptr< Point > point) |
| Appends a Point to the LineString. More... | |
| auto | isClosed () const -> bool |
| test if the LineString is closed More... | |
| void | closes () |
| closes the LineString If the linestring is already closed, it remains unchanged More... | |
| auto | begin () -> iterator |
| Get iterator to beginning of points. More... | |
| auto | begin () const -> const_iterator |
| Get const iterator to beginning of points. More... | |
| auto | end () -> iterator |
| Get iterator to end of points. More... | |
| auto | end () const -> const_iterator |
| Get const iterator to end of points. More... | |
| void | reserve (const size_t &n) |
| Reserve space for points. More... | |
| auto | points_2_begin () const -> Point_2_const_iterator |
| Get iterator to beginning of 2D points. More... | |
| auto | points_2_end () const -> Point_2_const_iterator |
| Get iterator to end of 2D points. More... | |
| auto | points_2 () const -> std::pair< Point_2_const_iterator, Point_2_const_iterator > |
| Get pair of iterators for 2D points. More... | |
| auto | points_3_begin () const -> Point_3_const_iterator |
| Get iterator to beginning of 3D points. More... | |
| auto | points_3_end () const -> Point_3_const_iterator |
| Get iterator to end of 3D points. More... | |
| auto | points_3 () const -> std::pair< Point_3_const_iterator, Point_3_const_iterator > |
| Get pair of iterators for 3D points. More... | |
| auto | toPolygon_2 (bool fixOrientation=true) const -> CGAL::Polygon_2< Kernel > |
| Convert to CGAL::Polygon_2. More... | |
| void | accept (GeometryVisitor &visitor) override |
| Accept a geometry visitor. More... | |
| void | accept (ConstGeometryVisitor &visitor) const override |
| Accept a const geometry visitor. More... | |
| template<class Archive > | |
| void | serialize (Archive &ar, const unsigned int) |
| Serializer. More... | |
A LineString in SFA.
| using SFCGAL::LineString::const_iterator = DereferenceIterator<std::vector<std::unique_ptr<Point>>::const_iterator> |
Const iterator type for linestring points.
| using SFCGAL::LineString::iterator = DereferenceIterator<std::vector<std::unique_ptr<Point>>::iterator> |
Iterator type for linestring points.
|
default |
Empty LineString constructor.
| SFCGAL::LineString::LineString | ( | const std::vector< Point > & | points | ) |
Constructor with a point vector.
| points | Vector of points to initialize the linestring |
LineString constructor.
| startPoint | The starting point of the linestring |
| endPoint | The ending point of the linestring |
| SFCGAL::LineString::LineString | ( | LineString const & | other | ) |
Copy constructor.
| other | The linestring to copy from |
|
overridedefault |
destructor
|
override |
Accept a geometry visitor.
| visitor | Visitor to accept |
|
override |
Accept a const geometry visitor.
| visitor | Const visitor to accept |
|
inline |
Appends a Point to the LineString.
| point | The Point object to append. |
|
inline |
Appends a Point to the LineString and takes ownership.
| point | A raw pointer to the Point object to append. Ownership of this point is moved into the LineString. |
|
inline |
Appends a Point to the LineString.
| point | A unique pointer to the Point object to append. Ownership of this point is moved into the LineString. |
|
inline |
Get iterator to beginning of points.
|
inline |
Get const iterator to beginning of points.
| void SFCGAL::LineString::clear | ( | ) |
remove all points from the LineString
|
inline |
closes the LineString If the linestring is already closed, it remains unchanged
|
override |
Get the coordinate dimension.
|
override |
Get the dimension of the linestring.
|
override |
Drop M coordinate from all points.
|
override |
Drop Z coordinate from all points.
|
inline |
Get iterator to end of points.
|
inline |
Get const iterator to end of points.
|
inline |
[SFA/OGC]Returns the last point
|
inline |
[SFA/OGC]Returns the last point
|
override |
Get the geometry type as string.
|
override |
Get the geometry type identifier.
|
override |
Check if the linestring has 3D coordinates.
| auto SFCGAL::LineString::isClosed | ( | ) | const -> bool |
test if the LineString is closed
|
override |
Check if the linestring is empty.
|
override |
Check if the linestring has measured coordinates.
|
inline |
[SFA/OGC]Returns the number of points
| auto SFCGAL::LineString::numSegments | ( | ) | const -> size_t |
Returns the number of segments.
| auto SFCGAL::LineString::operator= | ( | LineString | other | ) | -> LineString & |
assign operator
| other | The linestring to assign from |
|
inline |
[SFA/OGC]Returns the n-th point
| n | The index of the point to get |
|
inline |
[SFA/OGC]Returns the n-th point
| n | The index of the point to get |
|
inline |
Get pair of iterators for 2D points.
|
inline |
Get iterator to beginning of 2D points.
|
inline |
Get iterator to end of 2D points.
|
inline |
Get pair of iterators for 3D points.
|
inline |
Get iterator to beginning of 3D points.
|
inline |
Get iterator to end of 3D points.
| void SFCGAL::LineString::reserve | ( | const size_t & | n | ) |
Reserve space for points.
| n | Number of points to reserve space for |
| void SFCGAL::LineString::reverse | ( | ) |
reverse LineString orientation
|
inline |
Serializer.
| ar | Archive for serialization |
|
inline |
[SFA/OGC]Returns the first point
|
inline |
[SFA/OGC]Returns the first point
|
override |
Swap X and Y coordinates of all points.
| auto SFCGAL::LineString::toPolygon_2 | ( | bool | fixOrientation = true | ) | const -> CGAL::Polygon_2<Kernel> |
Convert to CGAL::Polygon_2.
| fixOrientation | Force exterior ring orientation (counter clockwise) |
1.8.10