6 #include "common/range.h"
7 #include "common/rectc.h"
8 #include "projection.h"
9 #include "downloader.h"
10 #include "coordinatesystem.h"
12 class QXmlStreamReader
;
20 Setup(const QString
&url
, const QString
&layer
, const QString
&style
,
21 const QString
&format
, const QString
&crs
,
22 const CoordinateSystem
&cs
,
23 const QList
<QPair
<QString
, QString
> > &dimensions
,
24 const Authorization
&authorization
= Authorization())
25 : _url(url
), _layer(layer
), _style(style
), _format(format
),
26 _crs(crs
), _cs(cs
), _dimensions(dimensions
),
27 _authorization(authorization
) {}
29 const QString
&url() const {return _url
;}
30 const Authorization
&authorization() const {return _authorization
;}
31 const QString
&layer() const {return _layer
;}
32 const QString
&style() const {return _style
;}
33 const QString
&format() const {return _format
;}
34 const QString
&crs() const {return _crs
;}
35 const CoordinateSystem
&coordinateSystem() const {return _cs
;}
36 const QList
<QPair
<QString
, QString
> > &dimensions() const
46 QList
<QPair
<QString
, QString
> > _dimensions
;
47 Authorization _authorization
;
51 WMS(const QString
&path
, const Setup
&setup
);
53 const Projection
&projection() const {return _projection
;}
54 const RangeF
&scaleDenominator() const {return _scaleDenominator
;}
55 const RectC
&boundingBox() const {return _boundingBox
;}
56 const QString
&version() const {return _version
;}
58 bool isValid() const {return _valid
;}
59 const QString
&errorString() const {return _errorString
;}
65 RangeF scaleDenominator
;
71 Layer(const QString
&name
, const QString
&style
= QString())
72 : name(name
), style(style
), isDefined(false), hasStyle(false),
74 bool operator==(const Layer
&other
) const
75 {return this->name
== other
.name
;}
83 CTX(const Setup
&setup
);
86 RectC
geographicBoundingBox(QXmlStreamReader
&reader
);
87 QString
style(QXmlStreamReader
&reader
);
88 void getMap(QXmlStreamReader
&reader
, CTX
&ctx
);
89 void request(QXmlStreamReader
&reader
, CTX
&ctx
);
90 void layer(QXmlStreamReader
&reader
, CTX
&ctx
, const QList
<QString
> &pCRSs
,
91 const QList
<QString
> &pStyles
, RangeF
&pScaleDenominator
,
93 void capability(QXmlStreamReader
&reader
, CTX
&ctx
);
94 void capabilities(QXmlStreamReader
&reader
, CTX
&ctx
);
95 bool parseCapabilities(const QString
&path
, const Setup
&setup
);
96 bool getCapabilities(const QString
&url
, const QString
&file
,
97 const Authorization
&authorization
);
99 Projection _projection
;
100 RangeF _scaleDenominator
;
105 QString _errorString
;
107 static Downloader
*_downloader
;