-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathprpl-cellspaceGeoinfo.h
56 lines (44 loc) · 1.82 KB
/
prpl-cellspaceGeoinfo.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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#ifndef PRPL_CELLSPACEGEOINFO_H
#define PRPL_CELLSPACEGEOINFO_H
#include "prpl-basicTypes.h"
#include "prpl-subCellspaceInfo.h"
namespace pRPL {
class CellspaceGeoinfo {
public:
CellspaceGeoinfo() {}
CellspaceGeoinfo(const pRPL::GeoCoord &nwCorner,
const pRPL::GeoCoord &cellSize,
const string &projection);
CellspaceGeoinfo(const pRPL::CellspaceGeoinfo &rhs);
~CellspaceGeoinfo() {}
pRPL::CellspaceGeoinfo& operator=(const pRPL::CellspaceGeoinfo &rhs);
bool operator==(const pRPL::CellspaceGeoinfo &rhs) const;
void add2Buf(vector<char> &buf);
bool initFromBuf(vector<char> &buf);
void nwCorner(const pRPL::GeoCoord &nw);
void nwCorner(double x, double y);
void cellSize(const pRPL::GeoCoord &size);
void cellSize(double xSize, double ySize);
void projection(const string &proj);
const pRPL::GeoCoord& nwCorner() const;
const pRPL::GeoCoord& cellSize() const;
const string& projection() const;
void geoTransform(double aGeoTransform[6]) const;
pRPL::GeoCoord cellCoord2geoCoord(const pRPL::CellCoord &cCoord) const;
pRPL::GeoCoord cellCoord2geoCoord(long iRow, long iCol) const;
pRPL::CellCoord geoCoord2cellCoord(const pRPL::GeoCoord &gCoord) const;
pRPL::CellCoord geoCoord2cellCoord(double x, double y) const;
/*--------GDAL------------*/
bool initByGDAL(GDALDataset *pDataset,
bool warning = true);
/*---------PGTIOL--------*/
bool initByPGTIOL(PGTIOLDataset *pDataset,
bool warning = true);
pRPL::CellspaceGeoinfo subSpaceGeoinfo(const pRPL::SubCellspaceInfo &subInfo) const;
private:
pRPL::GeoCoord _nwCorner;
pRPL::GeoCoord _cellSize;
string _projection;
};
};
#endif