-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProjectionMapper.h
More file actions
57 lines (43 loc) · 1.56 KB
/
ProjectionMapper.h
File metadata and controls
57 lines (43 loc) · 1.56 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/*
* Copyright (C) 2016 Gianluca Iselli <gianluca.iselli@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef PROJECTIONMAPPER_H
#define PROJECTIONMAPPER_H
#include <proj_api.h>
#include "Singleton.h"
class ProjectionMapper : public Singleton<ProjectionMapper> {
public:
ProjectionMapper(double SW_lat, double SW_lon, double area_width, double area_height, double cell_side_size);
virtual ~ProjectionMapper();
void LocalPosXY2IndexXY(uint pos_x, uint pos_y, uint& idx_x, uint& idx_y);
void LocalPosXY2LatLng(uint pos_x, uint pos_y, double& lat, double& lng);
void LatLng2IndexXY(double lat, double lng, uint& idx_x, uint& idx_y);
double m_NWLat;
double m_NWLon;
private:
double m_SWLat;
double m_SWLon;
double m_AreaWidth;
double m_AreaHeight;
double m_CellSideSize;
uint m_CellWidthCount;
uint m_CellHeightCount;
projPJ m_PJMerc;
projPJ m_PJLatlng;
double m_OriginNorthing;
double m_OriginEastings;
};
#endif /* PROJECTIONMAPPER_H */