LuciadCPillar 2024.0.08
|
Represents a polyline that is closed, i.e., the first point and the last point coincide. More...
#include <luciad/geometries/PolylineRing.h>
Public Member Functions | |
~PolylineRing () override | |
Coordinate | computePoint (double parameter) const override |
Computes a point of the curve, defined by the given parameter. More... | |
Bounds | getBounds () const override |
Returns the bounds for the geometry object. More... | |
std::shared_ptr< Curve > | getCurveAt (size_t index) const override |
Returns the curve for the requested index. More... | |
size_t | getCurveCount () const override |
Returns the number of curves in this composite. More... | |
LineInterpolationType | getInterpolationType () const |
Returns the interpolation type of the line segment. More... | |
double | getLength2D () const override |
Returns the length of the curve. More... | |
Coordinate | getPoint (size_t index) const |
Returns the coordinate for the requested index. More... | |
size_t | getPointCount () const |
Returns the number of points in the polyline ring. More... | |
const std::vector< Coordinate > & | getPoints () const |
Returns the list of points of this polyline ring. More... | |
std::shared_ptr< luciad::CoordinateReference > | getReference () const override |
Returns the coordinate reference of the geometry. More... | |
std::shared_ptr< PolylineRing > | insertPoint (size_t index, Coordinate newLocation) const |
Creates a new PolylineRing with an newly inserted control point. More... | |
std::shared_ptr< PolylineRing > | movePoint (size_t index, Coordinate newLocation) const |
Creates a new PolylineRing with a moved control point. More... | |
std::shared_ptr< PolylineRing > | removePoint (size_t index) const |
Creates a new PolylineRing with a control point removed. More... | |
std::shared_ptr< PolylineRing > | translate (Coordinate translation) const |
Translates the entire polyline ring. More... | |
Public Member Functions inherited from luciad::CompositeRing | |
~CompositeRing () override | |
Coordinate | computePoint (double parameter) const override |
Computes a point of the curve, defined by the given parameter. More... | |
Bounds | getBounds () const override |
Returns the bounds for the geometry object. More... | |
virtual std::shared_ptr< Curve > | getCurveAt (size_t index) const |
Returns the curve for the requested index. More... | |
virtual size_t | getCurveCount () const |
Returns the number of curves in this composite. More... | |
double | getLength2D () const override |
Returns the length of the curve. More... | |
std::shared_ptr< CoordinateReference > | getReference () const override |
Returns the coordinate reference of the geometry. More... | |
virtual Coordinate | computePoint (double parameter) const =0 |
Computes a point of the curve, defined by the given parameter. More... | |
virtual double | getLength2D () const =0 |
Returns the length of the curve. More... | |
Public Member Functions inherited from luciad::Geometry | |
virtual | ~Geometry ()=default |
virtual Bounds | getBounds () const =0 |
Returns the bounds for the geometry object. More... | |
virtual std::shared_ptr< CoordinateReference > | getReference () const =0 |
Returns the coordinate reference of the geometry. More... | |
Protected Member Functions | |
size_t | getHash () const override |
Returns the hash value for this geometry. More... | |
size_t | getHash () const override |
Returns the hash value for this geometry. More... | |
virtual size_t | getHash () const =0 |
Returns the hash value for this geometry. More... | |
Represents a polyline that is closed, i.e., the first point and the last point coincide.
|
override |
|
overridevirtual |
Computes a point of the curve, defined by the given parameter.
parameter | the parameter value, within [0,1] , to compute the point location for. |
luciad::InvalidArgumentException | if parameter is not within [0,1] , or if the point could not be computed. For example, when the curve is defined by invalid points. |
Reimplemented from luciad::CompositeRing.
|
overridevirtual |
Returns the bounds for the geometry object.
luciad::InvalidArgumentException | if the bounds could not be computed. For example, when the geometry is defined by invalid points. |
Reimplemented from luciad::CompositeRing.
|
overridevirtual |
Returns the curve for the requested index.
index | the curve index |
luciad::InvalidArgumentException | when requesting an invalid index. |
Reimplemented from luciad::CompositeRing.
|
overridevirtual |
Returns the number of curves in this composite.
Reimplemented from luciad::CompositeRing.
|
overrideprotectedvirtual |
Returns the hash value for this geometry.
Reimplemented from luciad::CompositeRing.
LineInterpolationType luciad::PolylineRing::getInterpolationType | ( | ) | const |
Returns the interpolation type of the line segment.
One of
|
overridevirtual |
Returns the length of the curve.
luciad::InvalidArgumentException | if the length could not be computed. For example, when the curve is defined by invalid points. |
Reimplemented from luciad::CompositeRing.
Coordinate luciad::PolylineRing::getPoint | ( | size_t | index | ) | const |
Returns the coordinate for the requested index.
index | the index of the requested point. |
luciad::InvalidArgumentException | when requesting an invalid index. |
size_t luciad::PolylineRing::getPointCount | ( | ) | const |
Returns the number of points in the polyline ring.
const std::vector< Coordinate > & luciad::PolylineRing::getPoints | ( | ) | const |
Returns the list of points of this polyline ring.
|
overridevirtual |
Returns the coordinate reference of the geometry.
Reimplemented from luciad::CompositeRing.
std::shared_ptr< PolylineRing > luciad::PolylineRing::insertPoint | ( | size_t | index, |
Coordinate | newLocation | ||
) | const |
Creates a new PolylineRing with an newly inserted control point.
index | the index of the newly inserted control point. Should be in [0, getPointCount()]. For index 0, a new point will be added at the start of the Polyline ring. For index getPointCount(), a new point is added at the end of the Polyline ring. For other index values, a new point will be added between the point at specified (index-1) and the point at the index position. |
newLocation | the location of the new point |
luciad::InvalidArgumentException | for an invalid index |
std::shared_ptr< PolylineRing > luciad::PolylineRing::movePoint | ( | size_t | index, |
Coordinate | newLocation | ||
) | const |
Creates a new PolylineRing with a moved control point.
index | the index of the point to move. Should be in [0, getPointCount() - 1]. |
newLocation | the new location of the point |
luciad::InvalidArgumentException | for an invalid index |
std::shared_ptr< PolylineRing > luciad::PolylineRing::removePoint | ( | size_t | index | ) | const |
Creates a new PolylineRing with a control point removed.
This methods returns a copy of the polyline ring if its point count is less or equal to 3.
index | the index of the point to be removed. Should be in [0, getPointCount() - 1]. |
luciad::InvalidArgumentException | for an invalid index |
std::shared_ptr< PolylineRing > luciad::PolylineRing::translate | ( | Coordinate | translation | ) | const |
Translates the entire polyline ring.
Note: when the polyline ring is defined in a geodetic reference and uses geodetic interpolation, the translation is not performed by translating the points one by one. Instead, a translation method is used that better preserves the shape of the polyline ring when moving it towards (or away from) the poles.
translation | the translation vector |