OWSLib is a Python package for client programming with Open Geospatial Consortium (OGC) web service (hence OWS) interface standards, and their related content models.
As reported in Ref: https://github.com/cga-harvard/HHypermap/issues/242, when OWSLib initializes OWS class instances the usual behaviour is to internally build a full GetCapabilities request via HTTP GET. We need to ensure that URLs passed with the basic service elements (service, version, request) are stripped of these elements so they are not passed twice when OWSLib interacts with the OWS.
Examples:
>>> from owslib.csw import CatalogueServiceWeb as csw
>>> c = csw('http://demo.pycsw.org/cite/csw')
>>> c.request
'http://demo.pycsw.org/cite/csw?version=2.0.2&request=GetCapabilities&service=CSW'
>>> c = csw('http://demo.pycsw.org/cite/csw?service=CSW&version=2.0.2&request=GetCapabilitiesd')
>>> c.request
'http://demo.pycsw.org/cite/csw?service=CSW&version=2.0.2&request=GetCapabilitiesd&version=2.0.2&request=GetCapabilities&service=CSW'
>>> from owslib.wms import WebMapService as wms
>>> w = wms('http://tepeserwery.pl/tileservice/wms.php/icrsptixwh?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetCapabilities')
>>> w.request
'http://tepeserwery.pl/tileservice/wms.php/icrsptixwh?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetCapabilities&service=WMS&request=GetCapabilities&version=1.1.1'
As reported in Ref: https://github.com/cga-harvard/HHypermap/issues/242, when OWSLib initializes OWS class instances the usual behaviour is to internally build a full
GetCapabilities
request via HTTP GET. We need to ensure that URLs passed with the basic service elements (service
,version
,request
) are stripped of these elements so they are not passed twice when OWSLib interacts with the OWS.Examples: