Marble
OwsServiceManager.cpp
28void WmtsCapabilities::setWmtsTileMatrixSets(const QMap<QString, QStringList> &wmtsTileMatrixSets)
38void WmtsCapabilities::setWmtsTileResource(const QMap<QString, QMap<QString, QString>> &wmtsTileRessource)
208QString WmsCapabilities::boundingBoxNSEWDegrees(const QStringList &layers, const QString &projection)
221 south = atan(pow(2.7182818284, (layerBBoxList.at(1).toDouble() / 20037508.34 * M_PI))) * (360 / M_PI) - 90;
223 north = atan(pow(2.7182818284, (layerBBoxList.at(3).toDouble() / 20037508.34 * M_PI))) * (360 / M_PI) - 90;
256void OwsMappingCapabilities::setOwsLayerMetaInfo(const QMap<QString, QStringList> &wmsLayerMetaInfo)
266void WmsCapabilities::setWmsLayerCoordinateSystems(const QMap<QString, QMap<QString, QString>> &wmsLayerCoordinateSystems)
290 connect(&m_capabilitiesAccessManager, &QNetworkAccessManager::finished, this, &OwsServiceManager::parseOwsCapabilities);
291 connect(&m_imageAccessManager, &QNetworkAccessManager::finished, this, &OwsServiceManager::parseImageResult);
293 connect(&m_capabilitiesAccessManager, &QNetworkAccessManager::authenticationRequired, this, &OwsServiceManager::handleAuthentication);
294 connect(&m_imageAccessManager, &QNetworkAccessManager::authenticationRequired, this, &OwsServiceManager::handleAuthentication);
308 request.setAttribute(QNetworkRequest::RedirectPolicyAttribute, QNetworkRequest::NoLessSafeRedirectPolicy);
331 downloadQuery.addQueryItem(versionkey, wmsCapabilities().version()); // Service version. Value is one of 1.0.0, 1.1.0, 1.1.1, 1.3.0.
332 downloadQuery.addQueryItem("layers", layers); // Layers to display on map. Value is a comma-separated list of layer names.
334 // Spatial Reference System for map output. Value is in the form EPSG:nnn. srs was used before WMS 1.3.0, crs has been used since then.
347 wmsCapabilities().version() == "1.3.0" ? "-90,-180,90,180" : "-180,-90,180,90"; // flipped axes for 1.3.0 in epsg:4326 according to spec
364 m_imageRequestResult.setResultFormat((format == QLatin1StringView("jpeg")) ? "jpg" : format); // Is this needed here?
375void OwsServiceManager::queryWmsLevelZeroTile(const QUrl &url, const QString &layers, const QString &projection, const QString &format, const QString &style)
394void OwsServiceManager::queryWmsPreviewImage(const QUrl &url, const QString &layers, const QString &projection, const QString &format, const QString &style)
419void OwsServiceManager::queryWmtsLevelZeroTile(const QString &url, const QString &style, const QString &tileMatrixSet)
425void OwsServiceManager::queryWmtsPreviewImage(const QString &url, const QString &style, const QString &tileMatrixSet)
486void OwsServiceManager::handleAuthentication(QNetworkReply *reply, QAuthenticator *authenticator)
557 if (m_xml.documentElement().firstChildElement().tagName().isNull() || !m_xml.documentElement().tagName().contains("Capabilities")) {
563 if (m_xml.documentElement().tagName() == "WMS_Capabilities" || m_xml.documentElement().tagName() == "WMT_MS_Capabilities") { // WMTS server used for WMS?
584 (m_wmsCapabilities.version() == "1.0.0" || m_wmsCapabilities.version() == "1.1.0" || m_wmsCapabilities.version() == "1.1.1") ? "SRS" : "CRS");
587 QDomNodeList layers = m_xml.documentElement().firstChildElement("Capability").elementsByTagName("Layer");
593 QDomElement contactPersonPrimaryElement = contactElement.firstChildElement("ContactPersonPrimary");
597 QString contactOrganisation = contactPersonPrimaryElement.firstChildElement("ContactOrganization").text();
605 if (!addressElement.isNull() && addressElement.firstChildElement("AddressType").text() == "postal") {
611 postalAddress = address + "<br>" + city + "<br>" + stateOrProvince + "<br>" + postalCode + "<br>" + country;
614 QString contactFacsimileTelephone = contactElement.firstChildElement("ContactFacsimileTelephone").text();
616 QString contactMedium = contactVoicePhone + "<br>" + contactFacsimileTelephone + "<br>" + contactEmail;
618 QString contactInformation = contactPersonPrimary + "<br><small><font color=\"darkgrey\">" + postalAddress + "<br>" + contactMedium + "</font></small>";
630 QDomElement legendElement = layers.at(i).firstChildElement("Style").firstChildElement("LegendURL");
640 bbox << gbboxElement.firstChildElement("westBoundLongitude").text() << gbboxElement.firstChildElement("southBoundLatitude").text()
641 << gbboxElement.firstChildElement("eastBoundLongitude").text() << gbboxElement.firstChildElement("northBoundLatitude").text();
652 QDomNodeList projectionList = layers.at(i).toElement().elementsByTagName(m_wmsCapabilities.referenceSystemType());
665 QString bbox = QStringLiteral("%1,%2,%3,%4").arg(QString::number( west, 'f', 6 )).arg(QString::number( south, 'f', 6 ))
674 wmsLayerCoordinateSystems[layerName]["epsg:4326"] = wmsLayerMetaInfo.value(layerName).at(4); // Ignores flip
686 if (bboxProjection != "epsg:3857" && bboxProjection != "epsg:4326" && bboxProjection != "crs:84")
701 // FIXME: parse EX_GeographicBoundingBox if wmsLayerCoordinateSystems[layerName]["epsg:4326"/"epsg:3857"] == QString()
707 m_xml.documentElement().firstChildElement("Capability").firstChildElement("Request").firstChildElement("GetMap").elementsByTagName("Format");
713 if (format == "jpeg" || format.contains("png") || format.contains("tif") || format.contains("gif") || format.contains("bmp")
729 m_wmsCapabilities.setVersion(m_xml.documentElement().firstChildElement("ows:ServiceIdentification").firstChildElement("ows:ServiceTypeVersion").text());
732 QDomNodeList layers = m_xml.documentElement().firstChildElement("Contents").elementsByTagName("Layer");
745 QDomElement legendElement = layers.at(i).firstChildElement("Style").firstChildElement("LegendURL");
749 QString style = layers.at(i).firstChildElement("Style").firstChildElement("ows:Identifier").text();
759 if (format == "jpeg" || format.contains("png") || format.contains("tif") || format.contains("gif") || format.contains("bmp")
771 QDomNodeList tileMatrixLinkList = layers.at(i).toElement().elementsByTagName(QStringLiteral("TileMatrixSetLink"));
773 tileMatrixSets << tileMatrixLinkList.at(t).toElement().firstChildElement(QStringLiteral("TileMatrixSet")).text();
797 m_imageRequestResult.setImageStatus(WmsImageFailedServerMessage); // Image could not be downloaded
KDB_EXPORT KDbVersionInfo version()
QString name(GameStandardAction id)
PostalAddress address(const QVariant &location)
QStringView country(QStringView ifopt)
Binds a QML item to a specific geodetic location in screen coordinates.
Definition AbstractDataPlugin.cpp:23
void setPassword(const QString &password)
void setUser(const QString &user)
bool isNull() const const
QDomElement documentElement() const const
ParseResult setContent(QAnyStringView text, ParseOptions options)
QString attribute(const QString &name, const QString &defValue) const const
QDomNodeList elementsByTagName(const QString &tagname) const const
QString tagName() const const
QString text() const const
QDomElement firstChildElement(const QString &tagName, const QString &namespaceURI) const const
bool isNull() const const
QDomElement toElement() const const
QDomNode at(int index) const const
int size() const const
QImage fromData(QByteArrayView data, const char *format)
bool isNull() const const
QByteArray readAll()
const_reference at(qsizetype i) const const
T value(qsizetype i) const const
void authenticationRequired(QNetworkReply *reply, QAuthenticator *authenticator)
void finished(QNetworkReply *reply)
QUrl url() const const
RedirectPolicyAttribute
NoLessSafeRedirectPolicy
void setAttribute(Attribute code, const QVariant &value)
void setUrl(const QUrl &url)
Q_EMITQ_EMIT
QString arg(Args &&... args) const const
const QChar at(qsizetype position) const const
bool contains(QChar ch, Qt::CaseSensitivity cs) const const
qsizetype indexOf(QChar ch, qsizetype from, Qt::CaseSensitivity cs) const const
bool isEmpty() const const
bool isNull() const const
qsizetype length() const const
QString number(double n, char format, int precision)
QString & replace(QChar before, QChar after, Qt::CaseSensitivity cs)
QString right(qsizetype n) const const
QString section(QChar sep, qsizetype start, qsizetype end, SectionFlags flags) const const
QStringList split(QChar sep, Qt::SplitBehavior behavior, Qt::CaseSensitivity cs) const const
double toDouble(bool *ok) const const
QString toLower() const const
qsizetype removeDuplicates()
QFuture< ArgsType< Signal > > connect(Sender *sender, Signal signal)
QString host(ComponentFormattingOptions options) const const
void setUrl(const QString &url, ParsingMode parsingMode)
void addQueryItem(const QString &key, const QString &value)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:37:03 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:37:03 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.