1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-10-06 23:03:22 +02:00
GPXSee/src/poi.h

35 lines
598 B
C
Raw Normal View History

2015-10-05 01:43:48 +02:00
#ifndef POI_H
#define POI_H
#include <QVector>
#include <QPointF>
#include <QString>
#include "waypoint.h"
2015-10-05 01:43:48 +02:00
#include "rtree.h"
class POI
{
public:
bool loadFile(const QString &fileName);
QString errorString() const {return _error;}
int errorLine() const {return _errorLine;}
QVector<WayPoint> points(const QVector<QPointF> &path) const;
2015-10-05 01:43:48 +02:00
void clear();
private:
typedef RTree<size_t, qreal, 2> POITree;
2015-10-05 01:43:48 +02:00
bool loadCSVFile(const QString &fileName);
bool loadGPXFile(const QString &fileName);
2015-10-05 01:43:48 +02:00
POITree _tree;
QVector<WayPoint> _data;
2015-10-05 01:43:48 +02:00
QString _error;
int _errorLine;
2015-10-05 01:43:48 +02:00
};
#endif // POI_H