2018-09-20 07:59:47 +02:00
|
|
|
#ifndef OSM_H
|
|
|
|
#define OSM_H
|
|
|
|
|
|
|
|
#include <QPointF>
|
|
|
|
#include <common/coordinates.h>
|
2018-09-22 14:17:24 +02:00
|
|
|
#include <common/rectc.h>
|
|
|
|
#include <common/range.h>
|
2018-09-20 07:59:47 +02:00
|
|
|
|
2018-09-25 21:07:44 +02:00
|
|
|
namespace OSM
|
2018-09-20 07:59:47 +02:00
|
|
|
{
|
2018-09-25 21:07:44 +02:00
|
|
|
static const RectC BOUNDS(Coordinates(-180, 85.0511),
|
2018-09-22 14:17:24 +02:00
|
|
|
Coordinates(180, -85.0511));
|
2018-09-25 21:07:44 +02:00
|
|
|
static const Range ZOOMS(0, 19);
|
2018-09-22 14:17:24 +02:00
|
|
|
|
2018-09-20 07:59:47 +02:00
|
|
|
QPointF ll2m(const Coordinates &c);
|
|
|
|
Coordinates m2ll(const QPointF &p);
|
2018-09-24 22:49:10 +02:00
|
|
|
QPoint mercator2tile(const QPointF &m, int zoom);
|
2018-09-21 23:18:05 +02:00
|
|
|
qreal zoom2scale(int zoom, int tileSize);
|
|
|
|
int scale2zoom(qreal scale, int tileSize);
|
2018-09-24 22:49:10 +02:00
|
|
|
qreal resolution(const QPointF &p, int zoom, int tileSize);
|
2018-09-20 07:59:47 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif // OSM_H
|