Class Projector

Inheritance Relationships

Derived Type

Class Documentation

class Projector

Base class for implementing projection models. To use your own projection, implement this class and and pass it to the write/load functions.

Subclassed by lanelet::projection::SphericalMercatorProjector

Public Types

using Ptr = std::shared_ptr<Projector>

Public Functions

inline explicit Projector(Origin origin = Origin::defaultOrigin())
Projector(Projector &&rhs) noexcept = default
Projector &operator=(Projector &&rhs) noexcept = default
Projector(const Projector &rhs) = default
Projector &operator=(const Projector &rhs) = default
virtual ~Projector() noexcept = default
virtual BasicPoint3d forward(const GPSPoint &p) const = 0

Project a point from lat/lon coordinates to a local coordinate system.

Throws:

ForwardProjectionError – if projection is impossible

virtual GPSPoint reverse(const BasicPoint3d &p) const = 0

Project a point from local coordinates to global lat/lon coordinates.

Throws:

ReverseProjectionError – if projection is impossible

inline const Origin &origin() const

Obtain the internal origin.