2018-01-08 23:47:45 +01:00
|
|
|
#ifndef PCS_H
|
|
|
|
#define PCS_H
|
|
|
|
|
|
|
|
#include <QDebug>
|
|
|
|
#include <QList>
|
2018-01-20 20:13:56 +01:00
|
|
|
#include "gcs.h"
|
2018-01-08 23:47:45 +01:00
|
|
|
#include "projection.h"
|
|
|
|
|
|
|
|
class PCS
|
|
|
|
{
|
|
|
|
public:
|
2018-01-20 20:13:56 +01:00
|
|
|
PCS() : _gcs(0) {}
|
|
|
|
PCS(const GCS *gcs, const Projection::Method &m, const Projection::Setup &s)
|
|
|
|
: _gcs(gcs), _method(m), _setup(s) {}
|
|
|
|
PCS(const GCS *gcs, int proj);
|
|
|
|
|
|
|
|
const GCS *gcs() const {return _gcs;}
|
2018-01-08 23:47:45 +01:00
|
|
|
const Projection::Method &method() const {return _method;}
|
|
|
|
const Projection::Setup &setup() const {return _setup;}
|
|
|
|
|
|
|
|
bool isNull() const
|
2018-01-20 20:13:56 +01:00
|
|
|
{return (_gcs->isNull() && _method.isNull() && _setup.isNull());}
|
2018-01-08 23:47:45 +01:00
|
|
|
|
2018-01-20 20:13:56 +01:00
|
|
|
static void loadList(const QString &path);
|
|
|
|
static const PCS *pcs(int id);
|
|
|
|
static const PCS *pcs(const GCS *gcs, int proj);
|
2018-01-08 23:47:45 +01:00
|
|
|
|
|
|
|
private:
|
|
|
|
class Entry;
|
|
|
|
|
2018-01-20 20:13:56 +01:00
|
|
|
const GCS *_gcs;
|
2018-01-08 23:47:45 +01:00
|
|
|
Projection::Method _method;
|
|
|
|
Projection::Setup _setup;
|
|
|
|
|
|
|
|
static QList<Entry> _pcss;
|
2018-01-20 20:13:56 +01:00
|
|
|
static GCS _nullGCS;
|
2018-01-08 23:47:45 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
QDebug operator<<(QDebug dbg, const PCS &pcs);
|
|
|
|
|
|
|
|
#endif // PCS_H
|