4 #include "GlobeRectangle.h"
7 #include <glm/vec2.hpp>
8 #include <glm/vec3.hpp>
58 const Ellipsoid& ellipsoid CESIUM_DEFAULT_ELLIPSOID) noexcept {
70 const Ellipsoid& ellipsoid CESIUM_DEFAULT_ELLIPSOID) noexcept;
159 return this->_ellipsoid == rhs._ellipsoid;
167 return !(*
this == rhs);
172 double _semimajorAxis;
173 double _oneOverSemimajorAxis;
A position defined by longitude, latitude, and height.
A quadratic surface defined in Cartesian coordinates.
A two-dimensional, rectangular region on a globe, specified using longitude and latitude coordinates....
The map projection used by Google Maps, Bing Maps, and most of ArcGIS Online, EPSG:3857.
WebMercatorProjection(const Ellipsoid &ellipsoid CESIUM_DEFAULT_ELLIPSOID) noexcept
Constructs a new instance.
bool operator==(const WebMercatorProjection &rhs) const noexcept
Returns true if two projections (i.e. their ellipsoids) are equal.
static constexpr CesiumGeometry::Rectangle computeMaximumProjectedRectangle(const Ellipsoid &ellipsoid CESIUM_DEFAULT_ELLIPSOID) noexcept
Computes the maximum rectangle that can be covered with this projection.
static const GlobeRectangle MAXIMUM_GLOBE_RECTANGLE
The maximum bounding rectangle of the Web Mercator projection, ranging from -PI to PI radians longitu...
CesiumGeospatial::GlobeRectangle unproject(const CesiumGeometry::Rectangle &rectangle) const noexcept
Unprojects a Web Mercator rectangle to the globe.
CesiumGeometry::Rectangle project(const CesiumGeospatial::GlobeRectangle &rectangle) const noexcept
Projects a globe rectangle to Web Mercator coordinates.
const Ellipsoid & getEllipsoid() const noexcept
Gets the Ellipsoid.
static double geodeticLatitudeToMercatorAngle(double latitude) noexcept
Converts a geodetic latitude in radians, in the range -PI/2 to PI/2, to a Mercator angle in the range...
Cartographic unproject(const glm::dvec3 &projectedCoordinates) const noexcept
Converts Web Mercator coordinates to geodetic ellipsoid coordinates.
static const double MAXIMUM_LATITUDE
The maximum latitude (both North and South) supported by a Web Mercator (EPSG:3857) projection.
Cartographic unproject(const glm::dvec2 &projectedCoordinates) const noexcept
Converts Web Mercator coordinates to geodetic ellipsoid coordinates.
bool operator!=(const WebMercatorProjection &rhs) const noexcept
Returns true if two projections (i.e. their ellipsoids) are not equal.
static double mercatorAngleToGeodeticLatitude(double mercatorAngle) noexcept
Converts a Mercator angle, in the range -PI to PI, to a geodetic latitude in the range -PI/2 to PI/2.
glm::dvec3 project(const Cartographic &cartographic) const noexcept
Converts geodedic ellipsoid coordinates to Web Mercator coordinates.
static constexpr double OnePi
pi
Classes for geospatial computations in Cesium.