-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLandDB.h
More file actions
51 lines (44 loc) · 1.76 KB
/
Copy pathLandDB.h
File metadata and controls
51 lines (44 loc) · 1.76 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
//LandDB.h
#pragma once
#include "aliases.h"
#include "LongLat.h"
#include "GeoResult.h"
#include "layerManager.h"
#include <sqlite3.h>
#include <string>
#include <qlist.h>
class CLandDB
{
//Constructor
public:
CLandDB();
~CLandDB();
//Methods
public:
int InitialiseLandDatabase(const QString& dbFilename);
void FreeDatabase();
bool getLayerData(CLayerManager& layerManager);
bool setLayers(const QMap<int, bool>& layerStates);
int setBaseGroupLayer(int layerId);
bool IsOnLand(double x, double y);
NRList NameOfOSMLand(double x, double y, int adminLevel);
NRList FullListOfOSMLand(double x, double y);
int GetPolygonFromPoint(double x, double y, QList<CGeoResult>& geoResults);
SVector NameAndDetails(double x, double y);
double Distance(CLongLat p1, CLongLat p2);
double Bearing(CLongLat p1, CLongLat p2);
int SearchNames(std::string rsSearchTerm, NRList& nrResults);
std::string GetWikipediaValue(int type, int ID);
int GetVisibleLandPolygonsWKT(double south, double west, double north, double east, int zoomBand, double zoomLevel, QList<CGeoResult>& geoResults);
int getSpecificPolygon(int polygonId, QList<CGeoResult>& polygon);
int GetVisiblePoints(double south, double west, double north, double east, double zoomLevel, NRList& pointResults);
int GetVisiblePoints(double south, double west, double north, double east, NRList& pointResults);
int GetBorderingRelations(int objectID, double x, double y, NRList& relResults);
int GetContainedPoints(int relationID, double x, double y, NRList& pointResults);
private:
std::string GetQueryFromScript(std::string rsScriptFilename);
void UpdateTableToQuery(std::string& rsQuery, int zoomBand);
//Member variable
private:
sqlite3* m_LandDB;
};