[OWSLib-users] How to mimic this CSW XML Post Query using OWSlib
Signell, Richard
rsignell at usgs.gov
Thu Apr 25 13:16:28 PDT 2013
I have a CSW endpoint:
endpoint = 'http://www.ngdc.noaa.gov/geoportal/csw' # NGDC Geoportal
csw = CatalogueServiceWeb(endpoint, lang='en-US', version='2.0.2', timeout=30)
and I have a sample POST query:
xml_string='''
<?xml version="1.0"?>
<csw:GetRecords xmlns:csw="http://www.opengis.net/cat/csw/2.0.2"
version="2.0.2" service="CSW" resultType="results"
outputSchema="http://www.isotc211.org/2005/gmd" startPosition="1"
maxRecords="1000">
<csw:Query typeNames="csw:Record"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:gml="http://www.opengis.net/gml">
<csw:ElementSetName>full</csw:ElementSetName>
<csw:Constraint version="1.1.0">
<ogc:Filter>
<ogc:And>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>sys.siteuuid</ogc:PropertyName>
<ogc:Literal>{78C0463E-2FCE-4AB2-A9C9-6A34BF261F52}</ogc:Literal>
</ogc:PropertyIsEqualTo>
<ogc:PropertyIsLike wildCard="*" escape="\" singleChar="?">
<ogc:PropertyName>apiso:ServiceType</ogc:PropertyName>
<ogc:Literal>*opendap*</ogc:Literal>
</ogc:PropertyIsLike>
</ogc:And>
</ogc:Filter>
</csw:Constraint>
</csw:Query>
</csw:GetRecords>
'''
Is there a way to do this same query using the OWSlib methods?
I know how to do things like:
bbox=[-71.5, 39.5, -63.0, 46]
csw.getrecords(keywords=['sea_water_temperature'],bbox=bbox,maxrecords=10)
csw.results
But I don't know how to do the above query that is supposed to find
records with OPeNDAP responses.
Here is an Ipython Notebook that shows my testing of the CSW response
with OWSlib:
http://nbviewer.ipython.org/5462676
Thanks,
Rich
-
Dr. Richard P. Signell (508) 457-2229
USGS, 384 Woods Hole Rd.
Woods Hole, MA 02543-1598
More information about the OWSLib-users
mailing list