[OWSLib-users] CSW query for datasets intersecting bounding box

Signell, Richard rsignell at usgs.gov
Mon Mar 3 10:30:53 PST 2014


On closer inspection, it appears that fes.BBox(bbox) is returning
datasets that are (1) completely within or (2) overlapping, but not
datasets where the bbox of interest is itself completely contained
within the dataset bounding box.

So it's not finding my dataset that is the whole US East Coast when I
specify New York Harbor because the the bounding box for New York
Harbor is completely within the bounding box for the US East Coast.

So I'm will wondering how to find my US East Coast model result with
my New York Harbor bbox, and more generally, how to specify these
different behaviors with OWSLib fes.

On Mon, Mar 3, 2014 at 1:21 PM, Signell, Richard <rsignell at usgs.gov> wrote:
> I want to use CSW to find all the datasets that overlap a specified
> bounding box (for example, if I specify my bounding box region of
> interest to be New York Harbor, I want to find datasets that span the
> whole east coast)
>
> The datasets are found correctly if I click "intersects" on the
> Geoportal Server GUI, which issues this geoportal rest command:
>
> 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
>
> but how do I do this in CSW?
>
> I tried:
>
> from owslib.csw import CatalogueServiceWeb
> from owslib import fes
> endpoint = 'http://geoport.whoi.edu/geoportal/csw'
> csw = CatalogueServiceWeb(endpoint,timeout=60)
>
> bbox = [-74.8738,40.2402,-73.468,41.0993]
> filter = fes.BBox(box)
> csw.getrecords2(constraints=[filter],maxrecords=5,esn='full')
>
> but it only returned datasets completely *within* the specified bounding box.
>
> Thanks,
> -Rich
>
>
>
> --
> Dr. Richard P. Signell   (508) 457-2229
> USGS, 384 Woods Hole Rd.
> Woods Hole, MA 02543-1598



-- 
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