2018-08-21 20:01:47 +02:00
|
|
|
#ifndef GEOTIFFMAP_H
|
|
|
|
#define GEOTIFFMAP_H
|
|
|
|
|
|
|
|
#include "transform.h"
|
|
|
|
#include "projection.h"
|
|
|
|
#include "map.h"
|
|
|
|
|
2018-08-23 20:26:10 +02:00
|
|
|
class Image;
|
|
|
|
|
2018-08-21 20:01:47 +02:00
|
|
|
class GeoTIFFMap : public Map
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
GeoTIFFMap(const QString &fileName, QObject *parent = 0);
|
|
|
|
~GeoTIFFMap();
|
|
|
|
|
|
|
|
QRectF bounds();
|
|
|
|
QPointF ll2xy(const Coordinates &c);
|
|
|
|
Coordinates xy2ll(const QPointF &p);
|
|
|
|
|
2018-08-23 20:26:10 +02:00
|
|
|
void draw(QPainter *painter, const QRectF &rect, Flags flags);
|
2018-08-21 20:01:47 +02:00
|
|
|
|
|
|
|
void load();
|
|
|
|
void unload();
|
2018-11-17 10:10:35 +01:00
|
|
|
void setDevicePixelRatio(qreal deviceRatio, qreal mapRatio);
|
2018-08-21 20:01:47 +02:00
|
|
|
|
|
|
|
bool isValid() const {return _valid;}
|
|
|
|
QString errorString() const {return _errorString;}
|
|
|
|
|
2022-04-29 23:16:10 +02:00
|
|
|
static Map *create(const QString &path, const Projection &, bool *isDir);
|
|
|
|
|
2018-08-21 20:01:47 +02:00
|
|
|
private:
|
|
|
|
Projection _projection;
|
|
|
|
Transform _transform;
|
2018-08-23 20:26:10 +02:00
|
|
|
Image *_img;
|
2018-08-21 20:01:47 +02:00
|
|
|
QSize _size;
|
|
|
|
qreal _ratio;
|
|
|
|
|
|
|
|
bool _valid;
|
|
|
|
QString _errorString;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // GEOTIFFMAP_H
|