Marble
OwsServiceManager.cpp
36 void WmtsCapabilities::setWmtsTileMatrixSets(const QMap<QString, QStringList> &wmtsTileMatrixSets)
46 void WmtsCapabilities::setWmtsTileResource(const QMap<QString, QMap<QString, QString> > &wmtsTileRessource)
217 QString WmsCapabilities::boundingBoxNSEWDegrees(const QStringList &layers, const QString& projection)
230 south = atan(pow(2.7182818284, (layerBBoxList.at(1).toDouble()/20037508.34 * M_PI))) * (360/M_PI) - 90;
232 north = atan(pow(2.7182818284, (layerBBoxList.at(3).toDouble()/20037508.34 * M_PI))) * (360/M_PI) - 90;
267 void OwsMappingCapabilities::setOwsLayerMetaInfo(const QMap<QString, QStringList> &wmsLayerMetaInfo)
277 void WmsCapabilities::setWmsLayerCoordinateSystems(const QMap<QString, QMap<QString, QString> > &wmsLayerCoordinateSystems)
302 connect( &m_capabilitiesAccessManager, &QNetworkAccessManager::finished, this, &OwsServiceManager::parseOwsCapabilities );
303 connect( &m_imageAccessManager, &QNetworkAccessManager::finished, this, &OwsServiceManager::parseImageResult );
305 connect( &m_capabilitiesAccessManager, &QNetworkAccessManager::authenticationRequired, this, &OwsServiceManager::handleAuthentication );
306 connect( &m_imageAccessManager, &QNetworkAccessManager::authenticationRequired, this, &OwsServiceManager::handleAuthentication );
309 void OwsServiceManager::queryOwsCapabilities(const QUrl& queryUrl, const QString& serviceString)
326 void OwsServiceManager::queryWmsMap(const QUrl &url, const QString &layers, const QString &projection,
339 downloadQuery.addQueryItem( versionkey , wmsCapabilities().version() ); // Service version. Value is one of 1.0.0, 1.1.0, 1.1.1, 1.3.0.
340 downloadQuery.addQueryItem( "layers", layers ); // Layers to display on map. Value is a comma-separated list of layer names.
342 // 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.
355 boundingBox = 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
373 m_imageRequestResult.setResultFormat((format == QLatin1String("jpeg")) ? "jpg" : format); // Is this needed here?
384 void OwsServiceManager::queryWmsLevelZeroTile(const QUrl& url, const QString &layers, const QString &projection,
393 bbox = 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
404 void OwsServiceManager::queryWmsPreviewImage(const QUrl& url, const QString &layers, const QString &projection,
431 void OwsServiceManager::queryWmtsLevelZeroTile(const QString &url, const QString &style, const QString &tileMatrixSet)
437 void OwsServiceManager::queryWmtsPreviewImage(const QString &url, const QString &style, const QString &tileMatrixSet)
443 void OwsServiceManager::queryWmtsTile(const QString &url, const QString &style, const QString &tileMatrixSet, const QString& tileMatrix, const QString &tileRow, const QString &tileCol)
493 void OwsServiceManager::handleAuthentication(QNetworkReply *reply, QAuthenticator *authenticator)
603 QDomNodeList layers = m_xml.documentElement().firstChildElement( "Capability" ).elementsByTagName("Layer");
609 QDomElement contactPersonPrimaryElement = contactElement.firstChildElement("ContactPersonPrimary");
613 QString contactOrganisation = contactPersonPrimaryElement.firstChildElement("ContactOrganization").text();
621 if (!addressElement.isNull() && addressElement.firstChildElement("AddressType").text() == "postal") {
627 postalAddress = address + "<br>" + city + "<br>" + stateOrProvince + "<br>" + postalCode + "<br>" + country;
630 QString contactFacsimileTelephone = contactElement.firstChildElement("ContactFacsimileTelephone").text();
631 QString contactEmail = contactElement.firstChildElement("ContactElectronicMailAddress" ).text();
632 QString contactMedium = contactVoicePhone + "<br>" + contactFacsimileTelephone + "<br>" + contactEmail;
634 QString contactInformation = contactPersonPrimary + "<br><small><font color=\"darkgrey\">" + postalAddress + "<br>" + contactMedium + "</font></small>";
647 QDomElement legendElement = layers.at( i ).firstChildElement( "Style" ).firstChildElement( "LegendURL" );
649 if (!legendElement.isNull()) legendUrl = legendElement.firstChildElement( "OnlineResource" ).attribute( "xlink:href" );
655 bbox << gbboxElement.firstChildElement("westBoundLongitude").text() << gbboxElement.firstChildElement("southBoundLatitude").text()
656 << gbboxElement.firstChildElement("eastBoundLongitude").text() << gbboxElement.firstChildElement("northBoundLatitude").text();
668 QDomNodeList projectionList = layers.at(i).toElement().elementsByTagName(m_wmsCapabilities.referenceSystemType());
681 QString bbox = QString("%1,%2,%3,%4").arg(QString::number( west, 'f', 6 )).arg(QString::number( south, 'f', 6 ))
690 wmsLayerCoordinateSystems[layerName]["epsg:4326"] = wmsLayerMetaInfo.value(layerName).at(4); // Ignores flip
702 if (bboxProjection != "epsg:3857" && bboxProjection != "epsg:4326" && bboxProjection != "crs:84") continue;
716 // FIXME: parse EX_GeographicBoundingBox if wmsLayerCoordinateSystems[layerName]["epsg:4326"/"epsg:3857"] == QString()
721 QDomNodeList formatList = m_xml.documentElement().firstChildElement( "Capability" ).firstChildElement( "Request" )
745 m_wmsCapabilities.setVersion( m_xml.documentElement().firstChildElement("ows:ServiceIdentification").firstChildElement("ows:ServiceTypeVersion").text() );
748 QDomNodeList layers = m_xml.documentElement().firstChildElement( "Contents" ).elementsByTagName("Layer");
762 QDomElement legendElement = layers.at( i ).firstChildElement( "Style" ).firstChildElement( "LegendURL" );
765 QString style = layers.at(i).firstChildElement("Style").firstChildElement( "ows:Identifier" ).text();
789 QDomNodeList tileMatrixLinkList = layers.at(i).toElement().elementsByTagName("TileMatrixSetLink");
791 tileMatrixSets << tileMatrixLinkList.at(t).toElement().firstChildElement("TileMatrixSet").text();
QString section(QChar sep, int start, int end, QString::SectionFlags flags) const const
QString text() const const
FollowRedirectsAttribute
QDomElement toElement() const const
QString number(int n, int base)
void setPassword(const QString &password)
void setUser(const QString &user)
QStringList split(const QString &sep, QString::SplitBehavior behavior, Qt::CaseSensitivity cs) const const
void addQueryItem(const QString &key, const QString &value)
QDomNodeList elementsByTagName(const QString &tagname) const const
bool isNull() const const
KI18NLOCALEDATA_EXPORT KCountry country(const char *ianaId)
void authenticationRequired(QNetworkReply *reply, QAuthenticator *authenticator)
QDomNode at(int index) const const
QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
int size() const const
QUrl url() const const
void finished(QNetworkReply *reply)
bool isEmpty() const const
int length() const const
bool isNull() const const
const T & at(int i) const const
Binds a QML item to a specific geodetic location in screen coordinates.
Definition: AbstractDataPlugin.cpp:22
PostalAddress address(const QVariant &location)
int indexOf(QChar ch, int from, Qt::CaseSensitivity cs) const const
QDomElement firstChildElement(const QString &tagName) const const
double toDouble(bool *ok) const const
QString & replace(int position, int n, QChar after)
int removeDuplicates()
QString toLower() const const
QString host(QUrl::ComponentFormattingOptions options) const const
void setUrl(const QString &url, QUrl::ParsingMode parsingMode)
QString arg(qlonglong a, int fieldWidth, int base, QChar fillChar) const const
unsigned int version()
QString right(int n) const const
QString name(StandardShortcut id)
const QChar at(int position) const const
void setUrl(const QUrl &url)
QByteArray readAll()
QString attribute(const QString &name, const QString &defValue) const const
bool contains(QChar ch, Qt::CaseSensitivity cs) const const
QImage fromData(const uchar *data, int size, const char *format)
T value(int i) const const
void setAttribute(QNetworkRequest::Attribute code, const QVariant &value)
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Oct 2 2023 03:52:09 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Oct 2 2023 03:52:09 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.