<div dir="ltr">Unfortunately, the entire FES suite is not included in the owslib.fes module.<div><br></div><div>I've opened an issue for this: <a href="https://github.com/geopython/OWSLib/issues/128">https://github.com/geopython/OWSLib/issues/128</a><br>
<div><br></div><div>In the meantime, you can create the XML object yourself and pass it to the 'getrecords2' method.  It should look something like this:</div><div><br></div><div><...></div><div><fes:Filter> 
<br> <fes:Intersects> 
<br> <fes:PropertyName>{{ your property }}</fes:PropertyName> 
<br>    <gml:Envelope ... /><br> </fes:Intersects> 
<br> </fes:Filter><br></div><div></...></div><div><br></div><div>On a side note, the GeoPortal documentation says ogc:BBOX and ogc:Intersects queries should both return "Overlaps" (I'm not sure if that helps):</div>
<div><a href="http://sourceforge.net/apps/mediawiki/geoportal/index.php?title=Catalog_Service#Spatial_Queries">http://sourceforge.net/apps/mediawiki/geoportal/index.php?title=Catalog_Service#Spatial_Queries</a><br></div><div>
<br></div><div>That document could also be out of date... it was last edited in 2010!</div><div><br></div><div><br></div><div><br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Mar 3, 2014 at 1:30 PM, Signell, Richard <span dir="ltr"><<a href="mailto:rsignell@usgs.gov" target="_blank">rsignell@usgs.gov</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On closer inspection, it appears that fes.BBox(bbox) is returning<br>
datasets that are (1) completely within or (2) overlapping, but not<br>
datasets where the bbox of interest is itself completely contained<br>
within the dataset bounding box.<br>
<br>
So it's not finding my dataset that is the whole US East Coast when I<br>
specify New York Harbor because the the bounding box for New York<br>
Harbor is completely within the bounding box for the US East Coast.<br>
<br>
So I'm will wondering how to find my US East Coast model result with<br>
my New York Harbor bbox, and more generally, how to specify these<br>
different behaviors with OWSLib fes.<br>
<div class="HOEnZb"><div class="h5"><br>
On Mon, Mar 3, 2014 at 1:21 PM, Signell, Richard <<a href="mailto:rsignell@usgs.gov">rsignell@usgs.gov</a>> wrote:<br>
> I want to use CSW to find all the datasets that overlap a specified<br>
> bounding box (for example, if I specify my bounding box region of<br>
> interest to be New York Harbor, I want to find datasets that span the<br>
> whole east coast)<br>
><br>
> The datasets are found correctly if I click "intersects" on the<br>
> Geoportal Server GUI, which issues this geoportal rest command:<br>
><br>
> <a href="http://geoport.whoi.edu/geoportal/rest/find/document?rid=local&ridName=Geoportal%20Instance&rids=local&searchText=ROMS%20OR%20ADCIRC%20OR%20POM&start=1&max=10&orderBy=relevance&spatialRel=esriSpatialRelOverlaps&bbox=-74.8738,40.2402,-73.468,41.0993&maxSearchTimeMilliSec=10000&f=searchpageresults&dojo.preventCache=1393870427656" target="_blank">http://geoport.whoi.edu/geoportal/rest/find/document?rid=local&ridName=Geoportal%20Instance&rids=local&searchText=ROMS%20OR%20ADCIRC%20OR%20POM&start=1&max=10&orderBy=relevance&spatialRel=esriSpatialRelOverlaps&bbox=-74.8738,40.2402,-73.468,41.0993&maxSearchTimeMilliSec=10000&f=searchpageresults&dojo.preventCache=1393870427656</a><br>

><br>
> but how do I do this in CSW?<br>
><br>
> I tried:<br>
><br>
> from owslib.csw import CatalogueServiceWeb<br>
> from owslib import fes<br>
> endpoint = '<a href="http://geoport.whoi.edu/geoportal/csw" target="_blank">http://geoport.whoi.edu/geoportal/csw</a>'<br>
> csw = CatalogueServiceWeb(endpoint,timeout=60)<br>
><br>
> bbox = [-74.8738,40.2402,-73.468,41.0993]<br>
> filter = fes.BBox(box)<br>
> csw.getrecords2(constraints=[filter],maxrecords=5,esn='full')<br>
><br>
> but it only returned datasets completely *within* the specified bounding box.<br>
><br>
> Thanks,<br>
> -Rich<br>
><br>
><br>
><br>
> --<br>
> Dr. Richard P. Signell   (508) 457-2229<br>
> USGS, 384 Woods Hole Rd.<br>
> Woods Hole, MA 02543-1598<br>
<br>
<br>
<br>
--<br>
Dr. Richard P. Signell   (508) 457-2229<br>
USGS, 384 Woods Hole Rd.<br>
Woods Hole, MA 02543-1598<br>
_______________________________________________<br>
OWSLib-users mailing list<br>
<a href="mailto:OWSLib-users@lists.osgeo.org">OWSLib-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/owslib-users" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/owslib-users</a><br>
</div></div></blockquote></div><br></div>