Skip to content

Commit

Permalink
Stumbled over the absence of the metadataurl.
Browse files Browse the repository at this point in the history
  • Loading branch information
dalmijn committed Nov 22, 2022
1 parent 6e4fa9c commit 521e9e8
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

setup(
name="wfs20",
version="0.1.0",
version="0.1.2",
description="Small library to request geospatial data (WFS)",
long_description=long_description,
long_description_content_type="text/markdown",
Expand Down
3 changes: 2 additions & 1 deletion src/wfs20/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import sys
import requests
from lxml import etree
from urllib.parse import parse_qsl, urlencode

def _BaseRequestURL(url):
Expand Down Expand Up @@ -55,7 +56,7 @@ def GetResponse(url,timeout):

if "Content-Type" in r.headers and \
r.headers['Content-Type'] in ['text/xml', 'application/xml', 'application/vnd.ogc.se_xml']:
wfse = etree(r.content)
wfse = etree.fromstring(r.content)
exceptions = [
'{http://www.opengis.net/ows}Exception',
'{http://www.opengis.net/ows/1.1}Exception',
Expand Down
4 changes: 3 additions & 1 deletion src/wfs20/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,9 @@ def __init__(self,elem):
[item.text for item in elem.findall(_ElementKey(WFS_NAMESPACE, "OutputFormats/Format"))]
)
# Metadata URL
self.MetaDataURL = elem.find(_ElementKey(WFS_NAMESPACE, "MetadataURL")).attrib["{http://www.w3.org/1999/xlink}href"]
self.MetaDataURLs = []
for url in elem.findall(_ElementKey(WFS_NAMESPACE, "MetadataURL")):
self.MetaDataURLs.append(url.attrib["{http://www.w3.org/1999/xlink}href"])

class Feature:
"""
Expand Down
2 changes: 1 addition & 1 deletion src/wfs20/version.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
main = "0"
major = "1"
minor = "0"
minor = "2"
version = ""

__version__ = f"{main}.{major}.{minor}{version}"

0 comments on commit 521e9e8

Please sign in to comment.