Class SphericalMercatorProjector

Inheritance Relationships

Base Type

Class Documentation

class SphericalMercatorProjector : public lanelet::Projector

implements a simple spherical mercator projection.

Will be too unprecise for most calculations, but its fast and needs no external dependencies. If you want more, check out lanelet2_projection! This is the same projection that was used by lanelet1.

Public Functions

inline virtual BasicPoint3d forward(const GPSPoint &p) const override

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

Throws:

ForwardProjectionError – if projection is impossible

inline virtual GPSPoint reverse(const BasicPoint3d &p) const override

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

Throws:

ReverseProjectionError – if projection is impossible

inline explicit Projector(Origin origin = Origin::defaultOrigin())
Projector(Projector &&rhs) noexcept = default
Projector(const Projector &rhs) = default