Implementation template class that is common to all LineStrings. More...
#include <LineString.h>
Classes | |
class | CompoundLineString |
Public Types | |
using | BasicIterator = internal::TransformIterator< const_iterator, const BasicPointType > |
using | BasicLineString = internal::SelectBasicLineStringT< BasicPointType > |
using | BasicPointType = traits::BasicPointT< PointT > |
using | Category = traits::LineStringTag |
using | const_iterator = internal::SelectLsIteratorT< const ConstPointType > |
using | ConstPointType = traits::ConstPointT< PointT > |
using | ConstSegmentType = traits::ConstPrimitiveType< SegmentType > |
using | difference_type = typename iterator::difference_type |
using | iterator = const_iterator |
using | MutablePointType = traits::MutablePointT< PointT > |
linestring will return this point type More... | |
using | PointType = ConstPointType |
using | SegmentType = Segment< PointT > |
using | size_type = size_t |
using | value_type = ConstPointType |
![]() | |
using | DataType = LineStringData |
Public Member Functions | |
const ConstPointType & | back () const noexcept |
returns the last point (if it exist) More... | |
BasicIterator | basicBegin () const noexcept |
returns a normal iterator to the internal point type at begin More... | |
BasicIterator | basicEnd () const noexcept |
returns a normal iterator for the internal point type at end More... | |
BasicLineString | basicLineString () const noexcept |
Create a basic linestring (ie a vector of Eigen Points) More... | |
const_iterator | begin () const noexcept |
Returns an iterator to the start of the points. More... | |
template<typename OtherT > | |
ConstLineStringImpl (const ConstLineStringImpl< OtherT > &other) | |
construct from other ConstLineStrings More... | |
ConstLineStringImpl (const std::shared_ptr< const LineStringData > &data, bool inverted=false) | |
Constructs a linestring from the data object of another linestring. More... | |
ConstLineStringImpl (Id id=InvalId, Points3d points=Points3d(), const AttributeMap &attributes=AttributeMap()) | |
Constructs a LineString or similar from an Id and a list of points. More... | |
bool | empty () const noexcept |
return if there are any points in this object More... | |
const_iterator | end () const noexcept |
Returns an iterator to end of the points. More... | |
const ConstPointType & | front () const noexcept |
returns the first point (if it exist) More... | |
bool | inverted () const noexcept |
Returns whether this is an inverted linestring. More... | |
size_t | numSegments () const noexcept |
Returns the number of (geometrically valid) segments. More... | |
const ConstPointType & | operator[] (size_t idx) const noexcept |
returns the point at this position More... | |
ConstSegmentType | segment (size_t idx) const noexcept |
returns the n-th segment. If n equals size() -1, the segment from back() to front() is returned. More... | |
size_t | size () const noexcept |
Return the number of points in this linestring. More... | |
![]() | |
const Attribute & | attribute (AttributeName name) const |
retrieve an attribute (enum version) More... | |
const Attribute & | attribute (const std::string &name) const |
retrieve an attribute More... | |
T | attributeOr (AttributeName name, T defaultVal) const |
retrieve an attribute (enum version) More... | |
T | attributeOr (const std::string &name, T defaultVal) const noexcept |
retrieve an attribute (string version) More... | |
const AttributeMap & | attributes () const |
get the attributes of this primitive More... | |
const std::shared_ptr< const LineStringData > & | constData () const |
get the internal data of this primitive More... | |
ConstPrimitive (const std::shared_ptr< const LineStringData > &data) | |
Construct from a pointer to the data. More... | |
bool | hasAttribute (AttributeName name) const noexcept |
check for an attribute (enum version) More... | |
bool | hasAttribute (const std::string &name) const noexcept |
check whether this primitive has a specific attribute More... | |
Id | id () const noexcept |
get the unique id of this primitive More... | |
bool | operator!= (const ConstPrimitive &rhs) const |
bool | operator== (const ConstPrimitive &rhs) const |
Static Public Attributes | |
static constexpr traits::Dimensions | Dimension = traits::PointTraits<PointT>::Dimension |
![]() | |
static constexpr bool | IsConst |
Protected Member Functions | |
ConstLineStringImpl (const ConstLineStringImpl &rhs)=default | |
ConstLineStringImpl (ConstLineStringImpl &&rhs) noexcept=default | |
ConstLineStringImpl & | operator= (const ConstLineStringImpl &rhs)=default |
ConstLineStringImpl & | operator= (ConstLineStringImpl &&rhs) noexcept=default |
~ConstLineStringImpl () noexcept=default | |
![]() | |
ConstPrimitive (const ConstPrimitive &rhs)=default | |
ConstPrimitive (ConstPrimitive &&rhs) noexcept=default | |
ConstPrimitive & | operator= (const ConstPrimitive &rhs)=default |
ConstPrimitive & | operator= (ConstPrimitive &&rhs) noexcept=default |
~ConstPrimitive () noexcept=default | |
Private Attributes | |
bool | inverted_ {false} |
Implementation template class that is common to all LineStrings.
Definition at line 220 of file primitives/LineString.h.
using lanelet::ConstLineStringImpl< PointT >::BasicIterator = internal::TransformIterator<const_iterator, const BasicPointType> |
Definition at line 236 of file primitives/LineString.h.
using lanelet::ConstLineStringImpl< PointT >::BasicLineString = internal::SelectBasicLineStringT<BasicPointType> |
Definition at line 237 of file primitives/LineString.h.
using lanelet::ConstLineStringImpl< PointT >::BasicPointType = traits::BasicPointT<PointT> |
Definition at line 223 of file primitives/LineString.h.
using lanelet::ConstLineStringImpl< PointT >::Category = traits::LineStringTag |
Definition at line 227 of file primitives/LineString.h.
using lanelet::ConstLineStringImpl< PointT >::const_iterator = internal::SelectLsIteratorT<const ConstPointType> |
Definition at line 230 of file primitives/LineString.h.
using lanelet::ConstLineStringImpl< PointT >::ConstPointType = traits::ConstPointT<PointT> |
Definition at line 224 of file primitives/LineString.h.
using lanelet::ConstLineStringImpl< PointT >::ConstSegmentType = traits::ConstPrimitiveType<SegmentType> |
Definition at line 239 of file primitives/LineString.h.
using lanelet::ConstLineStringImpl< PointT >::difference_type = typename iterator::difference_type |
Definition at line 234 of file primitives/LineString.h.
using lanelet::ConstLineStringImpl< PointT >::iterator = const_iterator |
Definition at line 231 of file primitives/LineString.h.
using lanelet::ConstLineStringImpl< PointT >::MutablePointType = traits::MutablePointT<PointT> |
linestring will return this point type
Definition at line 226 of file primitives/LineString.h.
using lanelet::ConstLineStringImpl< PointT >::PointType = ConstPointType |
Definition at line 225 of file primitives/LineString.h.
using lanelet::ConstLineStringImpl< PointT >::SegmentType = Segment<PointT> |
Definition at line 238 of file primitives/LineString.h.
using lanelet::ConstLineStringImpl< PointT >::size_type = size_t |
Definition at line 233 of file primitives/LineString.h.
using lanelet::ConstLineStringImpl< PointT >::value_type = ConstPointType |
Definition at line 232 of file primitives/LineString.h.
|
inlineexplicit |
Constructs a LineString or similar from an Id and a list of points.
Definition at line 243 of file primitives/LineString.h.
|
inlineexplicit |
Constructs a linestring from the data object of another linestring.
Definition at line 248 of file primitives/LineString.h.
|
inlineexplicit |
construct from other ConstLineStrings
Definition at line 253 of file primitives/LineString.h.
|
protecteddefaultnoexcept |
|
protecteddefault |
|
protecteddefaultnoexcept |
|
inlinenoexcept |
returns the last point (if it exist)
The internal point type is a different one, but because all points inherit from the internal point type, no slicing is possible.
Definition at line 295 of file primitives/LineString.h.
|
inlinenoexcept |
returns a normal iterator to the internal point type at begin
Definition at line 313 of file primitives/LineString.h.
|
inlinenoexcept |
returns a normal iterator for the internal point type at end
Definition at line 319 of file primitives/LineString.h.
|
inlinenoexcept |
Create a basic linestring (ie a vector of Eigen Points)
A basic linestring is a simple vector with eigen points. You can do what you want with these points, because changes to them will not affect lanelet objects.
BasicLineString is registered with boost::geometry, therefore you can use it for geometry calculations.
Definition at line 345 of file primitives/LineString.h.
|
inlinenoexcept |
Returns an iterator to the start of the points.
Definition at line 271 of file primitives/LineString.h.
|
inlinenoexcept |
return if there are any points in this object
Definition at line 263 of file primitives/LineString.h.
|
inlinenoexcept |
|
inlinenoexcept |
returns the first point (if it exist)
Definition at line 286 of file primitives/LineString.h.
|
inlinenoexcept |
Returns whether this is an inverted linestring.
Definition at line 257 of file primitives/LineString.h.
|
inlinenoexcept |
Returns the number of (geometrically valid) segments.
Definition at line 333 of file primitives/LineString.h.
|
protecteddefault |
|
protecteddefaultnoexcept |
|
inlinenoexcept |
returns the point at this position
The internal point type is a different one, but because all points inherit from the internal point type, no slicing is possible.
Definition at line 304 of file primitives/LineString.h.
|
inlinenoexcept |
returns the n-th segment. If n equals size() -1, the segment from back() to front() is returned.
Definition at line 325 of file primitives/LineString.h.
|
inlinenoexcept |
Return the number of points in this linestring.
Definition at line 260 of file primitives/LineString.h.
|
staticconstexpr |
Definition at line 240 of file primitives/LineString.h.
|
private |
Definition at line 359 of file primitives/LineString.h.