24 double lon =
coord.longitude() / 360.0 + 0.5;
26 double lat =
coord.latitude();
27 lat = 0.5 - (std::log(std::tan((
pi / 4.0) + (
pi / 2.0) * lat / 180.0)) /
pi) / 2.0;
33double QWebMercator::realmod(
const double a,
const double b)
36 return a -
static_cast<double>(div) *
b;
43 const double fx = mercator.
x();
44 const double fy = mercator.
y();
53 lat = (180.0 /
pi) * (2.0 * std::atan(std::exp(
pi * (1.0 - 2.0 * fy))) - (
pi / 2.0));
57 lng = realmod(fx, 1.0);
59 lng = realmod(1.0 - realmod(-1.0 * fx, 1.0), 1.0);
62 lng = lng * 360.0 - 180.0;
74 if (0.5 <
qAbs(
e.x() -
s.x())) {
83 x = (1.0 - progress) * sx + progress * ex;
89 x = (1.0 - progress) *
s.x() + progress *
e.x();
92 double y = (1.0 - progress) *
s.y() + progress *
e.y();
Q_DECL_CONSTEXPR double x() const
Q_DECL_CONSTEXPR double y() const
double altitude
This property holds the altitude in meters above sea level.
static QDoubleVector2D coordToMercator(const QGeoCoordinate &coord)
static QGeoCoordinate coordinateInterpolation(const QGeoCoordinate &from, const QGeoCoordinate &to, qreal progress)
static QGeoCoordinate mercatorToCoord(const QDoubleVector2D &mercator)
Combined button and popup list for selecting options.
bool qFuzzyIsNull(qfloat16 f) noexcept
constexpr const T & qBound(const T &min, const T &val, const T &max)
constexpr T qAbs(const T &t)
GLboolean GLboolean GLboolean b
GLint GLint GLint GLint GLint x
[0]
GLboolean GLboolean GLboolean GLboolean a
[7]
unsigned long long quint64
QT_BEGIN_NAMESPACE static const double yCutOff