From 6c3333035a52f669b3ac48bf3f2c2401dba49a37 Mon Sep 17 00:00:00 2001 From: sethg Date: Thu, 23 Jan 2025 17:07:36 +0100 Subject: [PATCH 01/17] back to dev --- owslib/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/owslib/__init__.py b/owslib/__init__.py index 68c3b132..55d5dba4 100644 --- a/owslib/__init__.py +++ b/owslib/__init__.py @@ -1 +1 @@ -__version__ = '0.32.1' +__version__ = '0.33.dev0' From 182dfc8677026ea32ba69e627a97516646a2e856 Mon Sep 17 00:00:00 2001 From: Seth G Date: Sun, 2 Feb 2025 14:00:39 +0100 Subject: [PATCH 02/17] Use build library for packaging (#969) * Use build for building packages * Use python3 * Remove wheel as replaced with build --- README.md | 4 ++-- requirements-dev.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 1b513c2a..ecbdd52a 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ numerous OGC Web Service interfaces. ## Installation -The easiest way to install pywis-pubsub is via the Python [pip](https://pip.pypa.io) +The easiest way to install OWSLib is via the Python [pip](https://pip.pypa.io) utility: ```bash @@ -156,7 +156,7 @@ Releasing git push --tags # update on PyPI (must be a maintainer) rm -fr build dist *.egg-info - python3 setup.py sdist bdist_wheel --universal + python3 -m build twine upload dist/* ``` diff --git a/requirements-dev.txt b/requirements-dev.txt index 628f4358..318d435a 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -6,6 +6,6 @@ pytest-socket Pillow tox twine -wheel coverage coveralls +build \ No newline at end of file From 45bc95b7b8788f5d5997ca33f70da10a5cffae2b Mon Sep 17 00:00:00 2001 From: Seth G Date: Wed, 12 Feb 2025 09:44:41 +0100 Subject: [PATCH 03/17] Fix for #965 - filter out ExtendedCapabilities (#968) --- owslib/wmts.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/owslib/wmts.py b/owslib/wmts.py index 59155799..7e537515 100644 --- a/owslib/wmts.py +++ b/owslib/wmts.py @@ -34,7 +34,7 @@ from urllib.parse import (urlencode, urlparse, urlunparse, parse_qs, ParseResult) from .etree import etree -from .util import clean_ows_url, testXMLValue, getXMLInteger, Authentication, openURL, getXMLTree +from .util import clean_ows_url, testXMLValue, getXMLInteger, Authentication, openURL, getXMLTree, nspath from .fgdc import Metadata from .iso import MD_Metadata from .ows import ServiceProvider, ServiceIdentification, OperationsMetadata @@ -227,7 +227,8 @@ def _buildMetadata(self, parse_remote_metadata=False): # REST only WMTS does not have any Operations if serviceop is not None: for elem in serviceop[:]: - self.operations.append(OperationsMetadata(elem)) + if elem.tag != nspath('ExtendedCapabilities'): + self.operations.append(OperationsMetadata(elem)) # serviceContents metadata: our assumption is that services use # a top-level layer as a metadata organizer, nothing more. From 145e4a260d0b0ac88c03890a735fdf2ce354bc18 Mon Sep 17 00:00:00 2001 From: Tom Kralidis Date: Sun, 16 Feb 2025 07:06:21 -0500 Subject: [PATCH 04/17] OGC API: add support for collection level transactions (#971) --- owslib/ogcapi/features.py | 53 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 52 insertions(+), 1 deletion(-) diff --git a/owslib/ogcapi/features.py b/owslib/ogcapi/features.py index 0cec6f07..1b87f8b1 100644 --- a/owslib/ogcapi/features.py +++ b/owslib/ogcapi/features.py @@ -53,6 +53,57 @@ def collection_queryables(self, collection_id: str) -> dict: path = f'collections/{collection_id}/queryables' return self._request(path=path) + def collection_create(self, data: str) -> bool: + """ + implements POST /collections + + @type collection_id: string + @type data: string + @param data: collection data + + @returns: single collection result + """ + + path = 'collections' + + self.headers['Content-Type'] = 'application/json' + + _ = self._request(method='POST', path=path, data=data) + + return True + + def collection_update(self, collection_id: str, data: str) -> bool: + """ + implements PUT /collections/{collectionId} + + @type collection_id: string + @param collection_id: id of collection + @type data: string + @param data: collection data + + @returns: ``bool`` of update result + """ + + path = f'collections/{collection_id}' + _ = self._request(method='PUT', path=path, data=data) + + return True + + def collection_delete(self, collection_id: str) -> bool: + """ + implements DELETE /collections/{collectionId} + + @type collection_id: string + @param collection_id: id of collection + + @returns: ``bool`` of deletion result + """ + + path = f'collections/{collection_id}' + _ = self._request(method='DELETE', path=path) + + return True + def collection_items(self, collection_id: str, **kwargs: dict) -> dict: """ implements /collection/{collectionId}/items @@ -145,7 +196,7 @@ def collection_item_update(self, collection_id: str, identifier: str, @type data: string @param data: raw representation of data - @returns: ``bool`` of deletion result + @returns: ``bool`` of update result """ path = f'collections/{collection_id}/items/{identifier}' From cccb2aee1001ad36c53568fcd90f42012142a634 Mon Sep 17 00:00:00 2001 From: sethg Date: Tue, 25 Feb 2025 00:04:56 +0100 Subject: [PATCH 05/17] Add a try except wrapper around flaky doctest --- tests/doctests/wms_geoserver_mass_gis.txt | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/tests/doctests/wms_geoserver_mass_gis.txt b/tests/doctests/wms_geoserver_mass_gis.txt index 6ccb197c..14cbf077 100644 --- a/tests/doctests/wms_geoserver_mass_gis.txt +++ b/tests/doctests/wms_geoserver_mass_gis.txt @@ -107,8 +107,15 @@ Test exceptions Lastly, test the getcapabilities and getmap methods + >>> import requests >>> wms = WebMapService('http://gis-prod.digital.mass.gov/geoserver/wms', version='1.1.1', timeout=120) - >>> img = wms.getmap(layers=['massgis:GISDATA.SHORELINES_ARC'], styles=[''], srs='EPSG:4326', bbox=(-70.8, 42, -70, 42.8), size=(300, 300), format='image/jpeg', transparent=True) - >>> out = open(scratch_file('massgis_shoreline.jpg'), 'wb') - >>> bytes_written = out.write(img.read()) - >>> out.close() + >>> try: + ... img = wms.getmap(layers=['massgis:GISDATA.SHORELINES_ARC'], styles=[''], + ... srs='EPSG:4326', bbox=(-70.8, 42, -70, 42.8), size=(300, 300), + ... format='image/jpeg', transparent=True) + ... out = open(scratch_file('massgis_shoreline.jpg'), 'wb') + ... bytes_written = out.write(img.read()) + ... out.close() + ... except requests.exceptions.ConnectTimeout: + ... print("Warning: Connection to the server timed out.") + From eda0ea6fb02b758955c8e8da9455feeb7f6b6ce4 Mon Sep 17 00:00:00 2001 From: sethg Date: Wed, 26 Feb 2025 16:14:01 +0100 Subject: [PATCH 06/17] Check service with GET if HEAD fails --- tests/utils.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/utils.py b/tests/utils.py index 580cf1d3..9a4f2e06 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -87,7 +87,11 @@ def service_ok(url, timeout=5): if 'html' in resp.headers['content-type']: ok = False else: - ok = resp.ok + if resp.ok is False: + # URL may refuse HEAD requests, so try with a GET + # and use stream=True to only download the headers + resp = requests.get(url, timeout=timeout, stream=True) + return resp.ok except requests.exceptions.ReadTimeout: ok = False except requests.exceptions.ConnectTimeout: From 9cb80a2cd12c2e3c2f99a100dbd204fedfb62500 Mon Sep 17 00:00:00 2001 From: sethg Date: Wed, 26 Feb 2025 16:15:16 +0100 Subject: [PATCH 07/17] Update URL and re-enable server check --- tests/test_opensearch_creodias.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/test_opensearch_creodias.py b/tests/test_opensearch_creodias.py index 2926d578..9f3d5fe4 100644 --- a/tests/test_opensearch_creodias.py +++ b/tests/test_opensearch_creodias.py @@ -4,13 +4,12 @@ from owslib.opensearch import OpenSearch -SERVICE_URL = 'https://finder.creodias.eu/resto/api/collections/Sentinel1/describe.xml' +SERVICE_URL = 'https://datahub.creodias.eu/resto/api/collections/Sentinel1/describe.xml' @pytest.mark.online -# service testing is commented out given CREODIAS does not allow HEAD requests -# @pytest.mark.skipif(not service_ok(SERVICE_URL), -# reason='service is unreachable') +@pytest.mark.skipif(not service_ok(SERVICE_URL), + reason='service is unreachable') def test_opensearch_creodias(): o = OpenSearch(SERVICE_URL) From 48728efe834e56e6fddc5de62cc56e1322af66dd Mon Sep 17 00:00:00 2001 From: sethg Date: Wed, 26 Feb 2025 17:08:43 +0100 Subject: [PATCH 08/17] Refactor function --- tests/utils.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/tests/utils.py b/tests/utils.py index 9a4f2e06..56de5205 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -84,14 +84,11 @@ def sorted_url_query(url): def service_ok(url, timeout=5): try: resp = requests.head(url, allow_redirects=True, timeout=timeout) - if 'html' in resp.headers['content-type']: - ok = False - else: - if resp.ok is False: - # URL may refuse HEAD requests, so try with a GET - # and use stream=True to only download the headers - resp = requests.get(url, timeout=timeout, stream=True) - return resp.ok + if 'html' in resp.headers.get('content-type', '').lower(): + return False + if not resp.ok: # if HEAD is not supported try GET with streaming + resp = requests.get(url, timeout=timeout, stream=True) + return resp.ok except requests.exceptions.ReadTimeout: ok = False except requests.exceptions.ConnectTimeout: From b14c82e5e765211dac3e1ac0305efe3d5c2bd7a0 Mon Sep 17 00:00:00 2001 From: sethg Date: Wed, 26 Feb 2025 17:19:59 +0100 Subject: [PATCH 09/17] Pin Sphinx version due to https://github.com/spatialaudio/nbsphinx/issues/825 --- docs/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index 79925427..837da77b 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -2,4 +2,4 @@ ipykernel nbconvert nbsphinx pypandoc -sphinx +sphinx==8.1.3 # issue with nbsphinx in sphinx 8.2, see https://github.com/spatialaudio/nbsphinx/issues/825 From c80d8b03421168acdc1bd68f2552ea8a989e2ab9 Mon Sep 17 00:00:00 2001 From: sethg Date: Thu, 27 Feb 2025 00:20:33 +0100 Subject: [PATCH 10/17] Add docs on using proxies --- docs/source/index.rst | 1 + docs/source/proxies.rst | 44 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 docs/source/proxies.rst diff --git a/docs/source/index.rst b/docs/source/index.rst index 09a65df6..afba5ae5 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -24,5 +24,6 @@ OWSLib |release| documentation development support logging + proxies license credits diff --git a/docs/source/proxies.rst b/docs/source/proxies.rst new file mode 100644 index 00000000..545682d8 --- /dev/null +++ b/docs/source/proxies.rst @@ -0,0 +1,44 @@ +Proxies Support +=============== + +OWSLib can be configured to work with proxy servers using environment variables. +These can either be set in a Python script (only affecting HTTP calls within that script), as in the example below: + +.. code-block:: python + + import os + from owslib.wms import WebMapService + + os.environ['HTTP_PROXY'] = 'http://10.10.1.10:3128' + os.environ['HTTPS_PROXY'] = 'http://10.10.1.10:1080' + wms = WebMapService('https://gibs.earthdata.nasa.gov/wms/epsg4326/best/wms.cgi?', version='1.3.0') + +Or through the operating system environment variables (Linux): + +.. code-block:: bash + + $ export HTTP_PROXY="http://10.10.1.10:3128" + $ export HTTPS_PROXY="http://10.10.1.10:1080" + $ export ALL_PROXY="socks5://10.10.1.10:3434" + + $ python + >>> from owslib.wms import WebMapService + >>> wms = WebMapService('https://gibs.earthdata.nasa.gov/wms/epsg4326/best/wms.cgi?', version='1.3.0') + +Windows (PowerShell): + +.. code-block:: ps1 + + $env:HTTP_PROXY = "http://10.10.1.10:3128" + $env:HTTPS_PROXY = "http://10.10.1.10:1080" + $env:ALL_PROXY = "socks5://10.10.1.10:3434" + +To use HTTP Basic Auth with your proxy, use the http://user:password@host/ syntax. For example: + +.. code-block:: python + + os.environ['HTTP_PROXY'] = 'http://username:password@10.10.1.10:3128' + + +For more details, refer to the `Requests library documentation `__, +which OWSLib uses for all HTTP requests. From e69da975b272c0953f52a3930f6c04fe882f89fc Mon Sep 17 00:00:00 2001 From: Seth G Date: Thu, 6 Mar 2025 10:02:17 +0100 Subject: [PATCH 11/17] Fix FutureWarnings for testing lxml elements (#979) --- owslib/feature/wfs110.py | 6 ++++-- owslib/feature/wfs200.py | 6 ++++-- owslib/map/wms130.py | 10 ++++++++-- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/owslib/feature/wfs110.py b/owslib/feature/wfs110.py index 5bf84c23..0a7c71d3 100644 --- a/owslib/feature/wfs110.py +++ b/owslib/feature/wfs110.py @@ -444,9 +444,11 @@ def parse_remote_metadata(self, timeout=30): elif metadataUrl["type"] in ["TC211", "19115", "19139"]: mdelem = doc.find( ".//" + nspath_eval("gmd:MD_Metadata", namespaces) - ) or doc.find( - ".//" + nspath_eval("gmi:MI_Metadata", namespaces) ) + if mdelem is None: + mdelem = doc.find( + ".//" + nspath_eval("gmi:MI_Metadata", namespaces) + ) if mdelem is not None: metadataUrl["metadata"] = MD_Metadata(mdelem) else: diff --git a/owslib/feature/wfs200.py b/owslib/feature/wfs200.py index d1133bb9..b5ed7fda 100644 --- a/owslib/feature/wfs200.py +++ b/owslib/feature/wfs200.py @@ -567,9 +567,11 @@ def parse_remote_metadata(self, timeout=30): mdelem = doc.find( ".//" + util.nspath_eval("gmd:MD_Metadata", n.get_namespaces(["gmd"])) - ) or doc.find( - ".//" + util.nspath_eval("gmi:MI_Metadata", n.get_namespaces(["gmi"])) ) + if mdelem is None: + mdelem = doc.find( + ".//" + util.nspath_eval("gmi:MI_Metadata", n.get_namespaces(["gmi"])) + ) if mdelem is not None: metadataUrl["metadata"] = MD_Metadata(mdelem) continue diff --git a/owslib/map/wms130.py b/owslib/map/wms130.py index 7cdfbdcc..5dc3c18c 100644 --- a/owslib/map/wms130.py +++ b/owslib/map/wms130.py @@ -703,8 +703,14 @@ def parse_remote_metadata(self, timeout=30): metadataUrl['metadata'] = Metadata(mdelem) continue - mdelem = doc.find('.//' + nspath_eval('gmd:MD_Metadata', n.get_namespaces(['gmd']))) \ - or doc.find('.//' + nspath_eval('gmi:MI_Metadata', n.get_namespaces(['gmi']))) + mdelem = doc.find( + './/' + nspath_eval('gmd:MD_Metadata', n.get_namespaces(['gmd'])) + ) + if mdelem is None: + doc.find( + './/' + nspath_eval('gmi:MI_Metadata', n.get_namespaces(['gmi'])) + ) + if mdelem is not None: metadataUrl['metadata'] = MD_Metadata(mdelem) continue From 01a69992ba843e3772ecc39260e271e93a484ba1 Mon Sep 17 00:00:00 2001 From: Seth G Date: Thu, 6 Mar 2025 10:02:39 +0100 Subject: [PATCH 12/17] Remove unknown pytest.mark.unit (#980) --- tests/test_iso3_parsing.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/test_iso3_parsing.py b/tests/test_iso3_parsing.py index 7e121578..a81d0384 100644 --- a/tests/test_iso3_parsing.py +++ b/tests/test_iso3_parsing.py @@ -45,8 +45,6 @@ MD_ReferenceSystem, MD_FeatureCatalogueDescription, MD_ImageDescription, MD_Band) -pytestmark = pytest.mark.unit - @pytest.fixture def ns(): From 39ad5a90c68925854424412a413b03728d38fcfa Mon Sep 17 00:00:00 2001 From: Seth G Date: Thu, 6 Mar 2025 10:27:57 +0100 Subject: [PATCH 13/17] Check https://demo.pycsw.org/cite is online (#982) --- tests/test_ogcapi_records_pycsw.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test_ogcapi_records_pycsw.py b/tests/test_ogcapi_records_pycsw.py index f89daccf..fea965bc 100644 --- a/tests/test_ogcapi_records_pycsw.py +++ b/tests/test_ogcapi_records_pycsw.py @@ -70,6 +70,8 @@ def test_ogcapi_records_pycsw(): @pytest.mark.online +@pytest.mark.skipif(not service_ok(SERVICE_URL), + reason='service is unreachable') @pytest.mark.parametrize("path, expected", [ ('collections/foo/1', 'https://demo.pycsw.org/cite/collections/foo/1'), ('collections/foo/https://example.org/11', 'https://demo.pycsw.org/cite/collections/foo/https://example.org/11') # noqa From 7ae09c7ca8dd0f4e37a64e6cb5ebc36addeddfbc Mon Sep 17 00:00:00 2001 From: Seth G Date: Thu, 6 Mar 2025 22:49:41 +0100 Subject: [PATCH 14/17] Default to text/xml if server doesn't return a Content-Type (#977) --- owslib/util.py | 3 ++- tests/test_util.py | 13 +++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/owslib/util.py b/owslib/util.py index f56b87cc..3165b484 100644 --- a/owslib/util.py +++ b/owslib/util.py @@ -342,7 +342,8 @@ def getXMLTree(rsp: ResponseWrapper) -> etree: et = etree.fromstring(raw_text) # check for response type - if it is not xml then raise an error - content_type = rsp.info()['Content-Type'] + # if the server doesn't provide a Content-Type then assume xml + content_type = rsp.info().get('Content-Type', 'text/xml') url = rsp.geturl() xml_types = ['text/xml', 'application/xml', 'application/vnd.ogc.wms_xml'] diff --git a/tests/test_util.py b/tests/test_util.py index 9947185a..7bccee26 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -71,6 +71,19 @@ def test_getXMLTree_valid(): assert et.find('.//Title').text == "Example" +def test_getXMLTree_valid_missing_content_type(): + + mock_resp = mock.Mock() + mock_resp.url = 'http:///example.org/?service=WFS&request=GetCapabilities&version=2.0.0' + mock_resp.content = b'\n' \ + b'Example' + mock_resp.headers = {} + resp_wrap = ResponseWrapper(mock_resp) + + et = getXMLTree(resp_wrap) + assert et.find('.//Title').text == "Example" + + def test_getXMLTree_invalid(): mock_resp = mock.Mock() From ea64e17bdd05ec9737c57305c053914ca2471c2f Mon Sep 17 00:00:00 2001 From: Paul van Genuchten Date: Sat, 8 Mar 2025 14:37:28 +0100 Subject: [PATCH 15/17] add a null check before using attrib (#978) * resolves issue #973 add a null check before using attrib * Add pytest_httpserver and unit test * Remove live server URL * Mark online --------- Co-authored-by: sethg --- owslib/iso.py | 13 +- requirements-dev.txt | 1 + .../resources/inspire-getrecords-response.xml | 1947 +++++++++++++++++ tests/test_csw_inspire.py | 59 + 4 files changed, 2015 insertions(+), 5 deletions(-) create mode 100644 tests/resources/inspire-getrecords-response.xml create mode 100644 tests/test_csw_inspire.py diff --git a/owslib/iso.py b/owslib/iso.py index 9c3971c5..f4f19f76 100644 --- a/owslib/iso.py +++ b/owslib/iso.py @@ -224,11 +224,14 @@ def __init__(self, md=None): self.charset = None else: self.id = md.attrib.get('id') - self.languagecode = md.find( - util.nspath_eval('gmd:languageCode/gmd:LanguageCode', namespaces)).attrib.get('codeListValue') - self.charset = md.find( - util.nspath_eval('gmd:characterEncoding/gmd:MD_CharacterSetCode', namespaces)).attrib.get( - 'codeListValue') + self.languagecode = None + languagecode = md.find(util.nspath_eval('gmd:languageCode/gmd:LanguageCode', namespaces)) + if languagecode is not None: + self.languagecode = languagecode.attrib.get('codeListValue') + self.charset = None + charset = md.find(util.nspath_eval('gmd:characterEncoding/gmd:MD_CharacterSetCode', namespaces)) + if charset is not None: + self.charset = charset.attrib.get('codeListValue') class CI_Date(object): diff --git a/requirements-dev.txt b/requirements-dev.txt index 318d435a..785f2e44 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -2,6 +2,7 @@ flake8 pytest pytest-cov +pytest_httpserver pytest-socket Pillow tox diff --git a/tests/resources/inspire-getrecords-response.xml b/tests/resources/inspire-getrecords-response.xml new file mode 100644 index 00000000..b04d4929 --- /dev/null +++ b/tests/resources/inspire-getrecords-response.xml @@ -0,0 +1,1947 @@ + + + + + + 8dad9c98-0512-4845-a2bf-3ace1c93df6f + + + + + + + + + + + + Webmap service + + + + + Floor Van Damme + + + National Geographic Institute + + + National Geographic Institute + + + Institut géographique national + + + Nationaal Geografisch Instituut + + + Nationales geographisches Institut + + + + + + + + + Kortenberglaan 115 + + + Kortenberglaan 115 + + + Avenue de Cortenbergh 115 + + + Kortenberglaan 115 + + + Avenue de Cortenbergh 115 + + + + + Brussels + + + Brussels + + + Bruxelles + + + Brussel + + + Brüssel + + + + + 1000 + + + Belgium + + + Belgium + + + Belgique + + + Belgie + + + Belgien + + + + + metadata@ngi.be + + + + + + + http://www.ngi.be + + + http://www.ngi.be + + + http://www.ngi.be + + + https://www.ngi.be/website/fr/ + + + http://www.ngi.be + + + http://www.ngi.be + + + + + + + + + + + + + + 2024-07-05T13:35:37 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + EPSG:3035 + + + EPSG:3035 + + + + + + + + + + + + + EPSG:4258 + + + EPSG:4258 + + + + + + + + + + + + + EPSG:3857 + + + EPSG:3857 + + + + + + + + + + + + + EPSG:4326 + + + EPSG:4326 + + + + + + + + + + + + + EPSG:3812 + + + EPSG:3812 + + + + + + + + + + + + + SUVIM station network WMS + + + SUVIM station network WMS + + + SUVIM station network WMS + + + SUVIM station network WMS + + + SUVIM station network WMS + + + + + + + 1993-03-29 + + + + + + + + + + 4f8bbdee-f02a-4050-9309-8aa6538ec8cc + + + BE.BIRA-IASB + + + + + + + The Solar Ultraviolet - Visible Irradiance Monitoring network (SUVIM) is formed of observation stations operated by the Royal Belgian Institute for Space Aeronomy (IASB-BIRA). At each station, UV solar radiation is measured by several instruments. The network produces UV indices, solar irradiances and ancillary measurements such as meteorological conditions at the stations in quasi-real time. The SUVIM Station Network dataset includes information on the stations. It does not include the measured data, which form the SUVIM Observations dataset. + + + The Solar Ultraviolet - Visible Irradiance Monitoring network (SUVIM) is formed of observation stations operated by the Royal Belgian Institute for Space Aeronomy (IASB-BIRA). At each station, UV solar radiation is measured by several instruments. The network produces UV indices, solar irradiances and ancillary measurements such as meteorological conditions at the stations in quasi-real time. The SUVIM Station Network dataset includes information on the stations. It does not include the measured data, which form the SUVIM Observations dataset. + + + The Solar Ultraviolet - Visible Irradiance Monitoring network (SUVIM) is formed of observation stations operated by the Royal Belgian Institute for Space Aeronomy (IASB-BIRA). At each station, UV solar radiation is measured by several instruments. The network produces UV indices, solar irradiances and ancillary measurements such as meteorological conditions at the stations in quasi-real time. The SUVIM Station Network dataset includes information on the stations. It does not include the measured data, which form the SUVIM Observations dataset. + + + The Solar Ultraviolet - Visible Irradiance Monitoring network (SUVIM) is formed of observation stations operated by the Royal Belgian Institute for Space Aeronomy (IASB-BIRA). At each station, UV solar radiation is measured by several instruments. The network produces UV indices, solar irradiances and ancillary measurements such as meteorological conditions at the stations in quasi-real time. The SUVIM Station Network dataset includes information on the stations. It does not include the measured data, which form the SUVIM Observations dataset. + + + The Solar Ultraviolet - Visible Irradiance Monitoring network (SUVIM) is formed of observation stations operated by the Royal Belgian Institute for Space Aeronomy (IASB-BIRA). At each station, UV solar radiation is measured by several instruments. The network produces UV indices, solar irradiances and ancillary measurements such as meteorological conditions at the stations in quasi-real time. The SUVIM Station Network dataset includes information on the stations. It does not include the measured data, which form the SUVIM Observations dataset. + + + + + + + National Geographic Institute + + + National Geographic Institute + + + Institut géographique national + + + Nationaal Geografisch Instituut + + + Nationales geographisches Institut + + + + + + + + + Kortenberglaan 115 + + + Kortenberglaan 115 + + + Avenue de Cortenbergh 115 + + + Kortenberglaan 115 + + + Avenue de Cortenbergh 115 + + + + + Brussels + + + Brussels + + + Bruxelles + + + Brussel + + + Brüssel + + + + + 1000 + + + Belgium + + + Belgium + + + Belgique + + + Belgie + + + Belgien + + + + + products@ngi.be + + + + + + + http://www.ngi.be + + + http://www.ngi.be + + + http://www.ngi.be + + + https://www.ngi.be/website/fr/ + + + http://www.ngi.be + + + http://www.ngi.be + + + + + + + + + + + + + + + + https://www.geo.be/thumbs/uv-station-suvim.jpg + + + + + + + Science and technology + + + Science and technology + + + Science et technologie + + + Wetenschap en technologie + + + Wissenschaft und Technologie + + + + + + + + + + Data.gov.be themes + + + Data.gov.be themes + + + + + + + 2019-01-31 + + + + + + + + + + geonetwork.thesaurus.external.theme.datagovthesaurus + + + + + + + + + + + Reporting INSPIRE + + + Reporting INSPIRE + + + Reporting INSPIRE + + + Reporting INSPIRE + + + Reporting INSPIRE + + + + + Meteorology, weather and radiation conditions + + + Meteorology, weather and radiation conditions + + + Météorologie, conditions atmosphériques et radiatives + + + Meteorologie, weers- en stralingsomstandigheden + + + Meteorologie, atmosphärische und Strahlungsbedingungen + + + + + + + + + + Belgian Federal Thesaurus + + + Belgian Federal Thesaurus + + + + + + + 2020-03-01 + + + + + + + + + + geonetwork.thesaurus.external.theme.federalthesaurus + + + + + + + + + + + National + + + National + + + National + + + Nationaal + + + National + + + + + + + + + + Spatial scope + + + Spatial scope + + + + + + + 2019-05-22 + + + + + + + + + + geonetwork.thesaurus.external.theme.httpinspireeceuropaeumetadatacodelistSpatialScope-SpatialScope + + + + + + + + + + + infoMapAccessService + + + infoMapAccessService + + + + + + + Annex D4 of the European Commission Regulation 1205/2008 + + + Annex D4 of the European Commission Regulation 1205/2008 + + + Annexe D4 du règlement 1205/2008 de la commission européenne + + + Bijlage D4 van Verordening 1205/2008 van de Europese Commissie + + + Anhang D4 der Verordnung 1205/2008 der Europäischen Kommission + + + + + + + 2008-12-03 + + + + + + + + + + + + + + atmospheric monitoring + + + atmospheric monitoring + + + + + cancer risk + + + cancer risk + + + + + carcinogenicity + + + carcinogenicity + + + + + dose-effect relationship + + + dose-effect relationship + + + + + environmental health + + + environmental health + + + + + environmental quality + + + environmental quality + + + + + ozone layer + + + ozone layer + + + + + radiation + + + radiation + + + + + solar radiation + + + solar radiation + + + + + stratospheric ozone depletion + + + stratospheric ozone depletion + + + + + ultraviolet radiation + + + ultraviolet radiation + + + + + + + EIONET GEMET Thesaurus Concepts + + + EIONET GEMET Thesaurus Concepts + + + EIONET GEMET Thesaurus Concepts + + + EIONET GEMET Thesaurus Concepts + + + EIONET GEMET Thesaurus Concepts + + + + + + + 2012-07-20 + + + + + + + + V.3.1 + + + + + + + + + solar_irradiance + + + solar_irradiance + + + + + atmosphere_mole_content_of_ozone + + + atmosphere_mole_content_of_ozone + + + + + + + CF Standard Name Table + + + CF Standard Name Table + + + + + + + 2016-03-08 + + + + + + + + V 31 + + + + + + + + + erythemal dose + + + erythemal dose + + + + + direct solar irradiance + + + direct solar irradiance + + + + + UV-A + + + UV-A + + + + + UV-B + + + UV-B + + + + + global UV index + + + global UV index + + + + + ultraviolet radiation + + + ultraviolet radiation + + + + + UV radiation + + + UV radiation + + + + + + + International Commission on Illumination (CIE) + + + International Commission on Illumination (CIE) + + + International Commission on Illumination (CIE) + + + International Commission on Illumination (CIE) + + + International Commission on Illumination (CIE) + + + + + + + 2014 + + + + + + + + + + + + + + Atmospheric conditions + + + Atmospheric conditions + + + Conditions atmosphériques + + + Atmosferische omstandigheden + + + Atmosphärische Bedingungen + + + + + Environmental monitoring facilities + + + Environmental monitoring facilities + + + Installations de suivi environnemental + + + Milieubewakingsvoorzieningen + + + Umweltüberwachung + + + + + Human health and safety + + + Human health and safety + + + Santé et sécurité des personnes + + + Menselijke gezondheid en veiligheid + + + Gesundheit und Sicherheit + + + + + + + + + + GEMET - INSPIRE themes, version 1.0 + + + GEMET - INSPIRE themes, version 1.0 + + + + + + + 2008-06-01 + + + + + + + + + + geonetwork.thesaurus.external.theme.httpinspireeceuropaeutheme-theme + + + + + + + + + + + antarctica + + + antarctica + + + + + + + + + + CF list of Standardized Region Names + + + CF list of Standardized Region Names + + + CF list of Standardized Region Names + + + CF list of Standardized Region Names + + + CF list of Standardized Region Names + + + + + + + 2016 + + + + + + + + + + + + + + Belgium + + + Belgium + + + + + Luxembourg + + + Luxembourg + + + + + Antarctica + + + Antarctica + + + + + + + + + + Getty Thesaurus of Geographic Names (TGN) + + + Getty Thesaurus of Geographic Names (TGN) + + + Getty Thesaurus of Geographic Names (TGN) + + + Getty Thesaurus of Geographic Names (TGN) + + + Getty Thesaurus of Geographic Names (TGN) + + + + + + + 2014-08-12 + + + + + + + + + + + + + + Federal viewer + + + Federal viewer + + + + + + + + + + + + federal government + + + federal government + + + gouvernement fédéral + + + federale regering + + + Bundesregierung + + + + + + + + + + GEMET - Concept themes, version 4.01 + + + GEMET - Concept themes, version 4.01 + + + + + + + 2012-07-20 + + + + + + + + + + geonetwork.thesaurus.external.theme.gemet + + + + + + + + + + + •The custodian of the resource holds the rights of property (including the rights of intellectual property) to the geographic files •The custodian grants the user the right to use the data for his internal use. •Commercial use of the data under any form is strictly forbidden •Custodian’s name must be mentioned each time the data are being used publically. + + + •The custodian of the resource holds the rights of property (including the rights of intellectual property) to the geographic files •The custodian grants the user the right to use the data for his internal use. •Commercial use of the data under any form is strictly forbidden •Custodian’s name must be mentioned each time the data are being used publically. + + + • Le gestionnaire du jeu de données tel qu’il est défini plus haut possède les droits de propriété (y compris les droits de propriété intellectuelle) se rapportant aux fichiers. • Le gestionnaire accorde au client le droit d’utiliser les données pour son usage interne. • L’usage des données à des fins commerciales, sous quelque forme que ce soit, est formellement interdit. • Le nom du gestionnaire doit apparaître lors de chaque utilisation publique des données. + + + •De beheerder van de bron bezit de eigendomsrechten (ook de rechten op de intellectuele eigendom) op de geografische bestanden • De beheerder geeft de klant het recht de gegevens te gebruiken voor intern gebruik •Het commercieel gebruik van de gegevens onder welke vorm dan ook is strikt verboden •De naam van de beheerder moet elke keer vermeld worden als de gegevens publiek gebruikt worden. + + + •De beheerder van de bron bezit de eigendomsrechten (ook de rechten op de intellectuele eigendom) op de geografische bestanden • De beheerder geeft de klant het recht de gegevens te gebruiken voor intern gebruik •Het commercieel gebruik van de gegevens onder welke vorm dan ook is strikt verboden •De naam van de beheerder moet elke keer vermeld worden als de gegevens publiek gebruikt worden. + + + + + + + + + + + + No limitations on public access + + + No limitations on public access + + + Pas de restrictions concernant l'accès public + + + Geen beperkingen op openbare toegang + + + Öffentliche Zugang nicht beschränkt + + + + + + + + + + + + •The custodian of the resource holds the rights of property (including the rights of intellectual property) to the geographic files •The custodian grants the user the right to use the data for his internal use. •Commercial use of the data under any form is strictly forbidden •Custodian’s name must be mentioned each time the data are being used publically. + + + •The custodian of the resource holds the rights of property (including the rights of intellectual property) to the geographic files •The custodian grants the user the right to use the data for his internal use. •Commercial use of the data under any form is strictly forbidden •Custodian’s name must be mentioned each time the data are being used publically. + + + • Le gestionnaire du jeu de données tel qu’il est défini plus haut possède les droits de propriété (y compris les droits de propriété intellectuelle) se rapportant aux fichiers. • Le gestionnaire accorde au client le droit d’utiliser les données pour son usage interne. • L’usage des données à des fins commerciales, sous quelque forme que ce soit, est formellement interdit. • Le nom du gestionnaire doit apparaître lors de chaque utilisation publique des données. + + + •De beheerder van de bron bezit de eigendomsrechten (ook de rechten op de intellectuele eigendom) op de geografische bestanden • De beheerder geeft de klant het recht de gegevens te gebruiken voor intern gebruik •Het commercieel gebruik van de gegevens onder welke vorm dan ook is strikt verboden •De naam van de beheerder moet elke keer vermeld worden als de gegevens publiek gebruikt worden. + + + • Der Datensatzverwalter wie höher beschrieben besitzt die Eigentumsrechte (geistiges Eigentum einbegriffen) über die Dateien.• Der Verwalter gewährt dem Kunden das Recht, die Daten intern zu benutzen.• Die Daten zu irgendwelchen kommerziellen Zwecken zu benutzen ist strikt verboten.• Der Name des Verwalters muss bei jeder öffentlichen Benutzung der Daten gemeldet werden. + + + + + + + view + + + + + + + + + GetCapabilities + + + + + + + + + https://wms.ngi.be/inspire/aeronomie/service + + + OGC:WMS + + + + + + + + + + + + + + + + https://wms.ngi.be/inspire/aeronomie/service?request=GetCapabilities&service=WMS&version=1.3.0 + + + OGC:WMS + + + view + + + View service + + + View service + + + Service de visualisation + + + Raadpleegdienst + + + Darstellungsdienste + + + + + + + + + + + + + + + + + + + + + + + Wemap service + + + + + + + + + INSPIRE Conformity + + + INSPIRE Conformity + + + Conformité INSPIRE + + + INSPIRE Conformiteit + + + INSPIRE Konformität + + + + + + + + + COMMISSION REGULATION (EU) No 976/2009 of 19 October 2009 implementing Directive 2007/2/EC of the European Parliament and of the Council as regards the Network Services + + + COMMISSION REGULATION (EU) No 976/2009 of 19 October 2009 implementing Directive 2007/2/EC of the European Parliament and of the Council as regards the Network Services + + + Règlement (UE) N° 976/2009 de la Commission du 19 octobre 2009 portant modalités d'application de la directive 2007/2/CE du Parlement européen et du Conseil en ce qui concerne les services en réseau + + + Verordening (EU) n r. 976/2009 van de Commissie van 19 oktober 2009 tot uitvoering van Richtlijn 2007/2/EG van het Europees Parlement en de Raad wat betreft de netwerkdiensten + + + Verordnung (EG) Nr. 976/2009 der Kommission vom 19. Oktober 2009 zur Durchführung der Richtlinie 2007/2/EG des Europäischen Parlaments und des Rates hinsichtlich der Netzdienste + + + + + + + 2009-08-19 + + + + + + + + + + The service described meets the technical requirements as defined by the Commission Regulation (EC) No 976/2009 of 19 October 2009 + + + The service described meets the technical requirements as defined by the Commission Regulation (EC) No 976/2009 of 19 October 2009 + + + Le service décrit répond aux exigences techniques telles qu’elles sont définies par le Règlement (UE) n° 976/2009 de la Commission du 19 octobre 2009 + + + De beschreven service voldoet aan de technische vereisten zoals bepaald in de Verordening (EC) nr 976/2009 van de Commissie van 19 oktober 2009 + + + Der beschriebene Dienst entspricht den technischen Anforderungen wie bestimmt in der Verordnung (EG) Nr. 976/2009 der Kommission vom 19. Oktober 2009 + + + + + true + + + + + + + + + + Archives: + The SUVIM Observations data are archived at (and are available from) + 1. the Royal Belgian Institute for Space Aeronomy (IASB-BIRA) – http://uvindex.aeronomie.be/ + 2. the European UV Database – http://uv.fmi.fi/uvdb/ + + History of instruments in operation at each station in Belgium and type of data available: + IASB-BIRA – Uccle (BRU) + 1. Spectral data (Global Solar Spectral Irradiance) + Wavelength range : 280 -600 nm + Field of view : 2 pi sr + Period : since March 29, 1993 + 2. Broadband data + UV-B meter (total) since February 2, 1995 + UV-B meter (diffuse) since July 16, 1996 + UV-A meter since May 11, 1995 + pyranometer since July 25, 1995 + 3. Filter radiometradata + 10-Channels SPUV-10 since March 21, 1996 + 7-Channels UVMFR-7 since October 14, 1999 + 7-Channels MFR-7 since December 18, 2003 + 5-Channels GUV-551C since May 23, 1996 + 6-Channels GUV-2511 since June 3, 2005 + 4. Cloud measurements + TSI (Total Sky Imager) since December 7, 1999 + CIR (Cloud Infrared Radiometer) since March 1, 2002 + 5. Meteorological measurements + Eole 100/200 since May 27, 1997 + 6. Sunshine Duration + SDM MS-093 since June 16, 2010 + + Euro Space Center – REDU (RED) + 1. Broadband data UV-B meter since June 15, 2004 + UV-A meter since June 15, 2004 + Pyranometer since June 15, 2004 + 2. Filter radiometer data 5-Channels GUV 511c since March 10, 2005 + 3. Cloud measurements CIR-4 /CIR-4V since December 7, 2006 + 4. Meteorological measurements Eole 200 since March 3, 2005 + 5. Sunshine Duration SDM MS-093 since August 1, 2011 + + Earth Explorer – Ostend (LIT) + 1. Broadband data UV-B meter since April 4, 2006 + UV-A meter since April 4, 2006 + Pyranometer since April 4, 2006 + 2. Filter radiometer data 6-Channels GUV 2511 since June 26, 2006 + 3. Cloud measurements CIR-4/CIR-4V since December 21, 2006 + 4. Meteorological measurements Eole 200 since April 4, 2006 + + Virton – City Hall (GAU) + 1. Broadband data UV-B meter since December 11, 2007 + UV-A meter since December 11, 2007 + Pyranometer since December 11, 2007 + 2. Filter radiometer data 6-Channels GUV 2511 since February 19, 2008 + 3. Cloud measurements CIR-4/CIR-4V since December 11, 2007 + 4. Meteorological measurements Eole 200 since December 11, 2007 + + VITO – Mol (CAM) + 1. Broadband data UV-B meter since December 16, 2008 + UV-A meter since December 16, 2008 + Pyranometer since December 16, 2008 + 2. Filter radiometer data 6-Channels GUV 2511 since February 19, 2008 + 3. Cloud measurements CIR-4/CIR-4V since December 16, 2008 + 4. Meteorological measurements Eole 200 since December 16, 2008 + + Hautes Fagnes Scientific Station - Mont Rigi (FAG) + 1. Broadband data UV-B meter since November 8, 2011 + UV-A meter since November 8, 2011 + Pyranometer since November 8, 2011 + 2. Filter radiometer data 6-Channels GUV 2511 since November 8, 2011 + 3. Cloud measurements CIR-4V since November 8, 2011 + 4. Meteorological measurements Eole 200 since November 8, 2011 + + + + + Archives: + The SUVIM Observations data are archived at (and are available from) + 1. the Royal Belgian Institute for Space Aeronomy (IASB-BIRA) – http://uvindex.aeronomie.be/ + 2. the European UV Database – http://uv.fmi.fi/uvdb/ + + History of instruments in operation at each station in Belgium and type of data available: + IASB-BIRA – Uccle (BRU) + 1. Spectral data (Global Solar Spectral Irradiance) + Wavelength range : 280 -600 nm + Field of view : 2 pi sr + Period : since March 29, 1993 + 2. Broadband data + UV-B meter (total) since February 2, 1995 + UV-B meter (diffuse) since July 16, 1996 + UV-A meter since May 11, 1995 + pyranometer since July 25, 1995 + 3. Filter radiometradata + 10-Channels SPUV-10 since March 21, 1996 + 7-Channels UVMFR-7 since October 14, 1999 + 7-Channels MFR-7 since December 18, 2003 + 5-Channels GUV-551C since May 23, 1996 + 6-Channels GUV-2511 since June 3, 2005 + 4. Cloud measurements + TSI (Total Sky Imager) since December 7, 1999 + CIR (Cloud Infrared Radiometer) since March 1, 2002 + 5. Meteorological measurements + Eole 100/200 since May 27, 1997 + 6. Sunshine Duration + SDM MS-093 since June 16, 2010 + + Euro Space Center – REDU (RED) + 1. Broadband data UV-B meter since June 15, 2004 + UV-A meter since June 15, 2004 + Pyranometer since June 15, 2004 + 2. Filter radiometer data 5-Channels GUV 511c since March 10, 2005 + 3. Cloud measurements CIR-4 /CIR-4V since December 7, 2006 + 4. Meteorological measurements Eole 200 since March 3, 2005 + 5. Sunshine Duration SDM MS-093 since August 1, 2011 + + Earth Explorer – Ostend (LIT) + 1. Broadband data UV-B meter since April 4, 2006 + UV-A meter since April 4, 2006 + Pyranometer since April 4, 2006 + 2. Filter radiometer data 6-Channels GUV 2511 since June 26, 2006 + 3. Cloud measurements CIR-4/CIR-4V since December 21, 2006 + 4. Meteorological measurements Eole 200 since April 4, 2006 + + Virton – City Hall (GAU) + 1. Broadband data UV-B meter since December 11, 2007 + UV-A meter since December 11, 2007 + Pyranometer since December 11, 2007 + 2. Filter radiometer data 6-Channels GUV 2511 since February 19, 2008 + 3. Cloud measurements CIR-4/CIR-4V since December 11, 2007 + 4. Meteorological measurements Eole 200 since December 11, 2007 + + VITO – Mol (CAM) + 1. Broadband data UV-B meter since December 16, 2008 + UV-A meter since December 16, 2008 + Pyranometer since December 16, 2008 + 2. Filter radiometer data 6-Channels GUV 2511 since February 19, 2008 + 3. Cloud measurements CIR-4/CIR-4V since December 16, 2008 + 4. Meteorological measurements Eole 200 since December 16, 2008 + + Hautes Fagnes Scientific Station - Mont Rigi (FAG) + 1. Broadband data UV-B meter since November 8, 2011 + UV-A meter since November 8, 2011 + Pyranometer since November 8, 2011 + 2. Filter radiometer data 6-Channels GUV 2511 since November 8, 2011 + 3. Cloud measurements CIR-4V since November 8, 2011 + 4. Meteorological measurements Eole 200 since November 8, 2011 + + + + + + + + + + + + + + + + + + + + + eeae2de7-0a09-4b69-b7a0-0b6b20903fd5 + + + + + + + + + discovery + + + + + ZAMG - Zentralanstalt für Meteorologie und Geodynamik + + + + + + + inspire-md@zamg.ac.at + + + + + + + http://www.zamg.ac.at + + + WWW:LINK-1.0-http--link + + + + + + + + + + + + 2020-11-20T00:00:02 + + + ISO19119 + + + 2005/PDAM 1 + + + + + + + CSW Suchdienst der ZAMG + + + + + 2013-10-31 + + + + + + + + + + INSPIRE Suchdienst (discovery service) der Zentralanstalt für Meteorologie und Geodynamik (Nationaler Wetterdienst Österreichs) + + + + + ZAMG - Zentralanstalt für Meteorologie und Geodynamik + + + + + + + inspire-md@zamg.ac.at + + + + + + + + + + + + + + humanCatalogueViewer + + + + + + + Atmosphärische Bedingungen + + + Meteorologisch-geografische Kennwerte + + + + + + + + GEMET - INSPIRE themes, version 1.0 + + + + + 2008-06-01 + + + publication + + + + + + + + + + + INSPIRE Service + + + + + + + + ZAMG - Target Plattform for ZAMG metadata + + + + + 2016-02-11 + + + + + + + + + + geonetwork.thesaurus.external.theme.zamg-mdtarget + + + + + + + + + + + humanCatalogueViewer + + + + + Commission Regulation (EC) No 1205/2008 of 3 December 2008 implementing Directive 2007/2/EC of the European Parliament and of the Council as regards metadata + + + + + 2008-12-03 + + + + + + + + + + + + + + National + + + + + + + + Spatial scope + + + + + 2019-05-22 + + + + + + + + + + + + + + keine Bedingungen anwendbar + + + + + + + license + + + No limitations on public access + + + + + + + + + + No conditions apply to access and use + + + + + discovery + + + 2.0.2 + + + + + + + 9.53357 + + + 17.16639 + + + 46.40749 + + + 49.01875 + + + + + + + + + + + + + + + + + + + + + + + + + application/vnd.ogc.csw_xml + + + 2.0.2 + + + + + + + + + http://catalog.zamg.ac.at/geonetwork/srv/ger/csw-inspire?SERVICE=CSW&VERSION=2.0.2&REQUEST=GetCapabilities&language=ger + + + + + + + + + + + + + + + + + + OGC CSW WebService + + + + + + + + + + + Conformity_001 + + + INSPIRE + + + + + + + + + VERORDNUNG (EG) Nr. 976/2009 DER KOMMISSION vom 19. Oktober 2009 zur Durchführung der Richtlinie 2007/2/EG des Europäischen Parlaments und des Rates hinsichtlich der Netzdienste + + + + + 2009-10-20 + + + + + + + + + + siehe referenzierte Spezifikation + + + true + + + + + + + + + + \ No newline at end of file diff --git a/tests/test_csw_inspire.py b/tests/test_csw_inspire.py new file mode 100644 index 00000000..35ed6714 --- /dev/null +++ b/tests/test_csw_inspire.py @@ -0,0 +1,59 @@ +# flake8: noqa: W503 + +import re +from pathlib import Path +import pytest +from pytest_httpserver import HTTPServer + +from owslib.csw import CatalogueServiceWeb +from owslib.fes import PropertyIsEqualTo + +MOCK_SERVER_PORT = 59950 +MOCK_SERVICE_URL = f"http://localhost:{MOCK_SERVER_PORT}/csw" + + +@pytest.fixture +def records(): + """Mock a GetRecords response from INSPIRE Geoportal + + Source: https://inspire-geoportal.ec.europa.eu/srv/eng/csw + """ + inspire_sample = str( + Path(__file__).parent.parent + / "tests" + / "resources" + / "inspire-getrecords-response.xml" + ) + + with open(inspire_sample, "r", encoding="utf-8") as f: + xml_str = f.read() + return xml_str + + +@pytest.mark.online +def test_language(records): + """Test records""" + + with HTTPServer(port=MOCK_SERVER_PORT) as httpserver: + httpserver.expect_request(re.compile("^/csw")).respond_with_data(records) + csw = CatalogueServiceWeb(url=MOCK_SERVICE_URL, skip_caps=True) + cq = PropertyIsEqualTo( + "th_httpinspireeceuropaeutheme-theme.link", + "http://inspire.ec.europa.eu/theme/ac", + ) + csw.getrecords2( + constraints=[cq], + outputschema="http://www.isotc211.org/2005/gmd", + maxrecords=2, + startposition=83, + esn="full", + ) + + assert len(csw.records) == 2 + rec1 = csw.records.get("8dad9c98-0512-4845-a2bf-3ace1c93df6f") + assert rec1.languagecode == "eng" + assert rec1.charset == "utf8" + + rec2 = csw.records.get("eeae2de7-0a09-4b69-b7a0-0b6b20903fd5") + assert rec2.languagecode == "ger" + assert rec2.charset is None From d6a546e18e3e19566c40bc598299fd4ef308e192 Mon Sep 17 00:00:00 2001 From: Seth G Date: Wed, 19 Mar 2025 16:14:51 +0100 Subject: [PATCH 16/17] Test for xml in response, regardless of mimetype (#984) --- owslib/util.py | 4 +++- tests/test_util.py | 14 ++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/owslib/util.py b/owslib/util.py index 3165b484..12c73400 100644 --- a/owslib/util.py +++ b/owslib/util.py @@ -346,8 +346,10 @@ def getXMLTree(rsp: ResponseWrapper) -> etree: content_type = rsp.info().get('Content-Type', 'text/xml') url = rsp.geturl() + has_xml_tag = raw_text.lstrip().startswith(b' 0: response_text = html_body.text.strip("\n") diff --git a/tests/test_util.py b/tests/test_util.py index 7bccee26..4db76189 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -71,6 +71,20 @@ def test_getXMLTree_valid(): assert et.find('.//Title').text == "Example" +def test_getXMLTree_non_xml_mime_type(): + + mock_resp = mock.Mock() + mock_resp.url = 'http:///example.org/?service=WFS&request=GetCapabilities&version=2.0.0' + mock_resp.content = b'\n' \ + b'Example' + # test with a non-XML mime type, but the response starts with Date: Wed, 19 Mar 2025 18:39:41 +0100 Subject: [PATCH 17/17] update release version --- owslib/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/owslib/__init__.py b/owslib/__init__.py index 55d5dba4..e3d0b7be 100644 --- a/owslib/__init__.py +++ b/owslib/__init__.py @@ -1 +1 @@ -__version__ = '0.33.dev0' +__version__ = '0.33.0'