Skip to content

Commit

Permalink
Merge pull request #60 from kreis-viersen/hinweis
Browse files Browse the repository at this point in the history
Hinweis wenn GetCapabilities-Dokument nicht wie erwartet
  • Loading branch information
pathmapper authored Sep 8, 2023
2 parents bf88e96 + ff1d5da commit 89c7dfd
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 10 deletions.
25 changes: 17 additions & 8 deletions flurstuecks_finder_nrw.py
Original file line number Diff line number Diff line change
Expand Up @@ -647,14 +647,23 @@ def GetCRS(self):
request.get(QNetworkRequest(QUrl(url)), True)
reply = request.reply()
if reply.attribute(QNetworkRequest.HttpStatusCodeAttribute) == 200:
tree = etree.parse(BytesIO(reply.content()))
root = tree.getroot()
nsmap = root.nsmap
if None in nsmap.keys():
del nsmap[None]
results = root.find(
".//ows:Parameter[@name='srsName']/ows:AllowedValues", nsmap
)
try:
tree = etree.parse(BytesIO(reply.content()))
root = tree.getroot()
nsmap = root.nsmap
if None in nsmap.keys():
del nsmap[None]
results = root.find(
".//ows:Parameter[@name='srsName']/ows:AllowedValues", nsmap
)
except:
mb = self.ShowMessage(
"Fehler", "Konnte verfügbare KBS vom WFS nicht ermitteln!"
)
mb.setDetailedText(
"Bitte GetCapabilities-Dokument überprüfen:\n\n" + url
)
mb.exec()

if results is not None:
results = results.getchildren()
Expand Down
6 changes: 4 additions & 2 deletions metadata.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
name=Flurstücksfinder NRW
qgisMinimumVersion=3.22
description=Find and display parcels (German State of North Rhine-Westphalia) - Flurstücksuche in NRW
version=1.4.0
version=1.4.1
author=Kreis Viersen
[email protected]

Expand All @@ -24,7 +24,9 @@ repository=https://github.com/kreis-viersen/flurstuecksfinder-nrw

hasProcessingProvider=no
# Uncomment the following line and add your changelog:
changelog=v1.4.0:
changelog=v1.4.1:
- Hinweis wenn GetCapabilities-Dokument nicht wie erwartet
v1.4.0:
- Verwende neue Namen für KRZN FeatureTypes
v1.3.2:
- Behebe Fehler wenn Flurstück nicht dauerhaft angezeigt wird ab QGIS 3.30
Expand Down

0 comments on commit 89c7dfd

Please sign in to comment.