[OWSLib-users] CSW BBox constraint

Thomas Kræmer thomakra at gmail.com
Sun Jun 11 03:34:00 PDT 2017


Hi Tom,

The CSW URL looks like this:
/gw/catalog/csw?service=CSW-ebRIM?request=GetCapabilities&service=CSW&version=2.0.2&request=GetCapabilities

Here is the XML from catalog.request:

<csw:GetRecords xmlns:csw="http://www.opengis.net/cat/csw/2.0.2"xmlns:gml="
http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc"xmlns:xsi
="http://www.w3.org/2001/XMLSchema-instance" outputSchema="EBRIM"
outputFormat="application/xml" version="2.0.2" service="CSW" resultType="
results"maxRecords="10" xsi:schemaLocation="
http://www.opengis.net/cat/csw/2.0.2
http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd">
<csw:Query typeNames="csw:Record">
<csw:ElementSetName>full</csw:ElementSetName>
<csw:Constraint version="1.1.0">
<ogc:Filter>
<ogc:BBOX>
<ogc:PropertyName>ows:BoundingBox</ogc:PropertyName>
<gml:Envelope srsName="EPSG:4326">
<gml:lowerCorner>-10.0 52.0</gml:lowerCorner>
<gml:upperCorner>10.0 60.0</gml:upperCorner>
</gml:Envelope>
</ogc:BBOX>
</ogc:Filter>
</csw:Constraint>
</csw:Query>
</csw:GetRecords>

The server requires basic auth and it's not my server, so unfortunately you
cannot interact directly with the server.

-Thomas-


On Sun, Jun 11, 2017 at 1:41 AM Tom Kralidis <tomkralidis at gmail.com> wrote:

> Hi Thomas: any chance you can provide the CSW URL (even offline)? In
> addition what does catalog.request look like? This represents the XML that
> OWSLib sends to the CSW server.
>
> Cheers
>
> ..Tom
>
> On Sat, Jun 10, 2017 at 7:37 PM, Thomas Kræmer <thomakra at gmail.com> wrote:
> > Dear All,
> >
> > I've been trying to use the BBox filter to limit the results in a CSW
> query,
> > but for some reason it always returns 0 results.
> > My attempt:
> >
> >    catalog = csw.CatalogueServiceWeb(url,
> >       username=username,
> >       password=password
> >     )
> >   constraints = [fes.BBox([-15, 40, 15, 60], crs='EPSG:4326')]
> >   catalog.getrecords2(
> >        constraints=constraints,
> >        esn='full',
> >        outputschema='EBRIM',
> >        maxrecords=10
> >        )
> >
> > I get lot's of results when filtering with fes.PropertyIsLike so I know
> that
> > I can interact with the server and that there are datasets covering my
> BBox.
> > I've tried with and without specifying the crs parameter.
> > Am I missing something? Any help getting this working would be much
> > appreciated.
> >
> > -Thomas-
> >
> >
> >
> > _______________________________________________
> > OWSLib-users mailing list
> > OWSLib-users at lists.osgeo.org
> > https://lists.osgeo.org/mailman/listinfo/owslib-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/owslib-users/attachments/20170611/851e98c1/attachment.html>


More information about the OWSLib-users mailing list