Comments (11)
@rsignell-usgs the CWIC CSW will have to support HTTP POST for GetCapabilities, not just HTTP GET.
from owslib.
Okay, thanks, I'll tell them.
from owslib.
@rsignell-usgs turns out for GetCapabilities, HTTP POST is optional, and HTTP GET is mandatory to support. So the CWIC CSW is doing things right. So owslib.csw.CatalogueServiceWeb()
needs to be updated to send the GetCapabilities request as HTTP GET.
from owslib.
ref: http://portal.opengeospatial.org/files/?artifact_id=20555, table 54.
from owslib.
Great! That will be a nice enhancement for OWSLib. We certainly can't count on optional functionality!
from owslib.
How big a job is this?
from owslib.
@rsignell-usgs See branch at https://github.com/tomkralidis/OWSLib/tree/issue-76. I tried it and it works for me (although there are GetRecords which are not related -- another investigation). Does this work for you for GetCapabilities?
from owslib.
Yes, this fixed the GetCapabilities issue! (but as I suspect you are, I'm now getting a 500 server error when I try to get records)
from owslib.
Hi @tomkralidis
not sure if it is a related issue and before I open another issue: using this catalog, where POST in getrecords seems to be supported, I get the following error in getrecords:
from owslib.csw import CatalogueServiceWeb
csw = CatalogueServiceWeb('http://www.rndt.gov.it/RNDT/CSW?')
csw.getrecords(keywords=['test'], maxrecords=20)
UserWarning: Please use the updated 'getrecords2' method instead of 'getrecords'.
The 'getrecords' method will be upgraded to use the 'getrecords2' parameters
in a future version of OWSLib.
in a future version of OWSLib.""")
TypeError: int() argument must be a string or a number, not 'NoneType'
any idea? thanks
from owslib.
@capooti thanks for the info. My trace:
>>> c=s('http://www.rndt.gov.it/RNDT/CSW?')
>>> c.getrecords(keywords=['test'], maxrecords=20)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "owslib/csw.py", line 236, in getrecords
self.results['matches'] = int(util.testXMLValue(val, True))
TypeError: int() argument must be a string or a number, not 'NoneType'
>>> print c.response
<?xml version="1.0" encoding="utf-8"?>
<csw:GetRecordsResponse xmlns:csw="http://www.opengis.net/cat/csw/2.0.2">
<csw:RequestId xmlns:ogc="http://www.opengis.net/ogc" xmlns:ows="http://www.opengis.net/ows" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" />
<csw:SearchStatus />
<csw:SearchResults elementSet="summary" recordSchema="csw:Record" />
</csw:GetRecordsResponse>
. This is not a valid CSW endpoint. CSW 2.0.2 requires the numberOfRecordsReturned
and numberOfRecordsMatched
attributes within the csw:SearchResults
element as part of GetRecords
responses.
from owslib.
You are right, it was a problem of their implementation, now they have fixed. Thanks
from owslib.
Related Issues (20)
- Send files as ComplexData to WPS HOT 1
- Can't get a response with getCoverage for soil grid
- consider a getrecordbyid response wrapper when trying to import iso19139 HOT 1
- Branch rules
- OGC API bug ignores SSL verify flag of Authentication object
- Missing change logs for `0.28.x` versions HOT 1
- AttributeError: module 'logging' has no attribute 'isEnabledFor' HOT 2
- ValueError: could not convert string to float on WCS .boundingboxes
- bad exception parsing in owslib.util.openURL
- Bug in bounding box creation for WMS 1.1.1
- Small typo in doc
- Copy-Paste Error in README
- get_schema() unable to fully parse 'DescribeFeatureType' response
- provide option to not clean ows url? HOT 1
- broken WPS since 0.29.0 HOT 1
- Problem with parsing CRS84 srs identifier in WFS capabilities HOT 4
- Issue with clean_ows_url in wps.py when connecting to PyQGIS-WPS
- WFS 2.0.0 getFeature srsname
- Extend authentication method with requests_pkcs12 support
- dublin core as an import option HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from owslib.