A map projection where longitude and latitude are mapped using an Ellipsoid.
More...
#include <CesiumGeospatial/GeographicProjection.h>
A map projection where longitude and latitude are mapped using an Ellipsoid.
The longitude and latitude are linearly mapped to X and Y by multiplying them (in radians) by the Ellipsoid::getMaximumRadius(). This projection is commonly known as geographic, equirectangular, equidistant cylindrical, or plate carrée. It is also known as EPSG:4326.
- See also
- WebMercatorProjection
Definition at line 27 of file GeographicProjection.h.
◆ GeographicProjection()
CesiumGeospatial::GeographicProjection::GeographicProjection |
( |
const Ellipsoid &ellipsoid |
CESIUM_DEFAULT_ELLIPSOID | ) |
|
|
noexcept |
Constructs a new instance.
- Parameters
-
◆ computeMaximumProjectedRectangle()
static constexpr CesiumGeometry::Rectangle CesiumGeospatial::GeographicProjection::computeMaximumProjectedRectangle |
( |
const Ellipsoid &ellipsoid |
CESIUM_DEFAULT_ELLIPSOID | ) |
|
|
inlinestaticconstexprnoexcept |
Computes the maximum rectangle that can be covered with this projection.
- Parameters
-
- Returns
- The rectangle
Definition at line 48 of file GeographicProjection.h.
◆ project() [1/2]
glm::dvec3 CesiumGeospatial::GeographicProjection::project |
( |
const Cartographic & |
cartographic | ) |
const |
|
noexcept |
Converts geodedic ellipsoid coordinates to geographic coordinates.
Converts geodetic ellipsoid coordinates, in radians, to the equivalent geographic X, Y, Z coordinates expressed in meters. The height is copied unmodified to the z
coordinate.
- Parameters
-
cartographic | The geodetic coordinates in radians. |
- Returns
- The equivalent geographic X, Y, Z coordinates, in meters.
◆ project() [2/2]
Projects a globe rectangle to geographic coordinates.
This is done by projecting the southwest and northeast corners.
- Parameters
-
rectangle | The globe rectangle to project. |
- Returns
- The projected rectangle.
◆ unproject() [1/3]
Unprojects a geographic rectangle to the globe.
This is done by unprojecting the southwest and northeast corners.
- Parameters
-
rectangle | The rectangle to unproject. |
- Returns
- The unprojected rectangle.
◆ unproject() [2/3]
Cartographic CesiumGeospatial::GeographicProjection::unproject |
( |
const glm::dvec2 & |
projectedCoordinates | ) |
const |
|
noexcept |
Converts geographic coordinates to geodetic ellipsoid coordinates.
Converts geographic X and Y coordinates, expressed in meters, to a Cartographic containing geodetic ellipsoid coordinates. The height is set to 0.0.
- Parameters
-
projectedCoordinates | The geographic projected coordinates to unproject. |
- Returns
- The equivalent cartographic coordinates.
◆ unproject() [3/3]
Cartographic CesiumGeospatial::GeographicProjection::unproject |
( |
const glm::dvec3 & |
projectedCoordinates | ) |
const |
|
noexcept |
Converts geographic coordinates to geodetic ellipsoid coordinates.
Converts geographic X, Y coordinates, expressed in meters, to a Cartographic containing geodetic ellipsoid coordinates. The Z coordinate is copied unmodified to the height.
- Parameters
-
projectedCoordinates | The geographic projected coordinates to unproject, with height (z) in meters. |
- Returns
- The equivalent cartographic coordinates.
◆ MAXIMUM_GLOBE_RECTANGLE
constexpr GlobeRectangle CesiumGeospatial::GeographicProjection::MAXIMUM_GLOBE_RECTANGLE |
|
staticconstexpr |
Initial value:= GlobeRectangle(
static constexpr double PiOverTwo
pi divded by two
static constexpr double OnePi
pi
The maximum bounding rectangle of the geographic projection, ranging from -PI to PI radians longitude and from -PI/2 to +PI/2 radians latitude.
Definition at line 34 of file GeographicProjection.h.
The documentation for this class was generated from the following file:
- /home/runner/work/cesium-native/cesium-native/CesiumGeospatial/include/CesiumGeospatial/GeographicProjection.h