forked from CCOMJHC/camp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgeoreferenced.h
29 lines (26 loc) · 869 Bytes
/
georeferenced.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef GEOREFERENCED_H
#define GEOREFERENCED_H
#include <QPointF>
#include <QGeoCoordinate>
class GDALDataset;
class OGRCoordinateTransformation;
class Georeferenced
{
public:
Georeferenced();
QPointF pixelToProjectedPoint(QPointF const &point) const;
QPointF projectedPointToPixel(QPointF const &point) const;
QPointF project(QGeoCoordinate const &point) const;
QGeoCoordinate unproject(QPointF const &point) const;
QPointF geoToPixel(QGeoCoordinate const &point) const;
QGeoCoordinate pixelToGeo(QPointF const &point) const;
QString const &projection() const;
protected:
void extractGeoreference(GDALDataset *dataset);
private:
double geoTransform[6];
double inverseGeoTransform[6];
OGRCoordinateTransformation *projectTransformation,*unprojectTransformation;
QString m_projection;
};
#endif // GEOREFERENCED_H