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

49 lines
1.0 KiB
C
Raw Normal View History

2018-01-08 23:47:45 +01:00
#ifndef PCS_H
#define PCS_H
#include <QDebug>
#include <QList>
#include "datum.h"
#include "projection.h"
class PCS
{
public:
PCS() {}
PCS(const Datum &datum, const Projection::Method &method,
const Projection::Setup &setup)
: _datum(datum), _method(method), _setup(setup) {}
PCS(int id);
PCS(int gcs, int proj);
const Datum &datum() const {return _datum;}
const Projection::Method &method() const {return _method;}
const Projection::Setup &setup() const {return _setup;}
bool isNull() const
{return (_datum.isNull() && _method.isNull());}
bool isValid() const
{return !(_datum.isNull() || _method.isNull());}
static bool loadList(const QString &path);
static const QString &errorString() {return _errorString;}
static int errorLine() {return _errorLine;}
private:
class Entry;
2018-01-09 23:19:35 +01:00
static void error(const QString &str);
2018-01-08 23:47:45 +01:00
Datum _datum;
Projection::Method _method;
Projection::Setup _setup;
static QList<Entry> _pcss;
static QString _errorString;
static int _errorLine;
};
QDebug operator<<(QDebug dbg, const PCS &pcs);
#endif // PCS_H