geopython / OWSLib

OWSLib is a Python package for client programming with Open Geospatial Consortium (OGC) web service (hence OWS) interface standards, and their related content models.
https://owslib.readthedocs.io
BSD 3-Clause "New" or "Revised" License
384 stars 275 forks source link

ValueError: could not convert string to float on WCS .boundingboxes #875

Open kannes opened 1 year ago

kannes commented 1 year ago

Following https://owslib.readthedocs.io/en/latest/usage.html#wcs I got an error:

from owslib.wcs import WebCoverageService

my_wcs = WebCoverageService('http://ows.rasdaman.org/rasdaman/ows', version='2.0.1')

my_wcs.contents['AvgLandTemp'].boundingboxes

results in

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
/tmp/ipykernel_82681/141903616.py in <module>
----> 1 my_wcs.contents['AvgLandTemp'].boundingboxes

/usr/lib/python3/dist-packages/owslib/coverage/wcs201.py in _getOtherBoundingBoxes(self)
    370             uc = envelope.find("{http://www.opengis.net/gml/3.2}upperCorner")
    371             uc = uc.text.split()
--> 372             bbox["bbox"] = (float(lc[0]), float(lc[1]), float(uc[0]), float(uc[1]))
    373             bboxes.append(bbox)
    374 

ValueError: could not convert string to float: '"2000-02-01T00:00:00.000Z"'

owslib '0.25.0' from Ubuntu 22.04/jammy repositories with Python 3.10.6, same with '0.29.2' from pypi.

github-actions[bot] commented 2 days ago

This Issue has been inactive for 90 days. In order to manage maintenance burden, it will be automatically closed in 7 days.