1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-24 19:55:53 +01:00
GPXSee/src/map/geotiffmap.h

46 lines
803 B
C
Raw Normal View History

#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;
class GeoTIFFMap : public Map
{
Q_OBJECT
public:
GeoTIFFMap(const QString &fileName, QObject *parent = 0);
~GeoTIFFMap();
QString name() const;
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);
void load();
void unload();
void setDevicePixelRatio(qreal deviceRatio, qreal mapRatio);
bool isValid() const {return _valid;}
QString errorString() const {return _errorString;}
private:
2018-08-23 20:26:10 +02:00
QString _fileName;
Projection _projection;
Transform _transform;
2018-08-23 20:26:10 +02:00
Image *_img;
QSize _size;
qreal _ratio;
bool _valid;
QString _errorString;
};
#endif // GEOTIFFMAP_H