dmpcoordinatetransformation.h
1.2 KB
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
/**************************************************************************
* file: dmpcoordinatetransformation.h
* Author: qingxiongf
* Date: 2022-03-11 10:54:02
* Email: qingxiongf@chinadci.com
* copyright: 广州城市信息研究所有限公司
***************************************************************************/
#ifndef __dmpcoordinatetransformation_h__
#define __dmpcoordinatetransformation_h__
#include "dmap_core.h"
#include <gdal.h>
#include <gdalgeorefpamdataset.h>
#include <gdalgrid.h>
#include <string>
#include <map>
using namespace std;
class CORE_EXPORT DmpCoordinateTransformation
{
public:
DmpCoordinateTransformation(string srsSource, string srsTarget);
//bool SetSourceWellKnownGeogCS(string srid);
//bool SetTargetWellKnownGeogCS(string srid);
int Transform(int nCount, double *x, double *y, double *z = nullptr, int *pabSuccess = nullptr);
private:
OGRSpatialReference ogrSource_;
OGRSpatialReference ogrTarget_;
OGRCoordinateTransformation *ogrCoordinateTransformation;
string srsSource_;
string srsTarget_;
const char* getCoordWKT(int srid);
};
#endif // __dmpcoordinatetransformation_h__