-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPlanet.h
More file actions
51 lines (45 loc) · 1.7 KB
/
Planet.h
File metadata and controls
51 lines (45 loc) · 1.7 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
//Planet.h
#pragma once
#include <string>
#include "WaterDB.h"
#include "LandDB.h"
#include "LandByCoastlineDB.h"
#include "layerManager.h"
#include "GeoResult.h"
#include <qlist.h>
#include <QGeocoordinate.h>
#include "mapViewType.h"
class CPlanet
{
//Constructor
public:
CPlanet();
~CPlanet();
//Methods
public:
void InitialiseDatabases( const QString& dbFilename );
bool DatabasesOK();
bool getLayerData(CLayerManager& layerManager);
bool setLayers(const QMap<int, bool>& layerStates);
bool setBaseLayer(int layerId);
int GetCurrentLocationName(double x, double y, std::string& name, int& objectID );
int GetBorderingRelations(int objectID, double x, double y, NRList& relResults);
int GetContainedPoints(int relationID, double x, double y, NRList& pointResults);
int GetVisibleData(double south, double west, double north, double east, double stepSize, double zoomLevel, QList<CGeoResult>& geoResults, NRList& pointResults);
int GetPolygonFromPoint(double x, double y, QList<CGeoResult>& geoResults);
int getSpecificPolygon(int polygonId, QList<CGeoResult>& polygon);
int SearchNames(std::string searchText, NRList& nrResults);
double distance(QGeoCoordinate& p1, QGeoCoordinate& p2);
double Bearing(QGeoCoordinate& p1, QGeoCoordinate& p2);
private:
int TransformZoomBandToPopulation(int zoomBand );
int getZoomBand(double stepSize);
bool splitBoundingBox(double& south1, double& west1, double& north1, double& east1, double& south2, double& west2, double& north2, double& east2);
//Member variables
private:
CWaterDB m_WaterDB;
CLandDB m_LandDB;
CLandByCoastlineDB m_LandByCoastlineDB;
double m_Radius; //In km
bool m_onLand;
};