Geospatial Search
The REST API for item search (https://www.sciencebase.gov/catalog/items) supports simple bounding box search functionality that locates items based on their footprint. This may be combined with other search operators for a composite search.
The parameter is called searchExtent and requires a parameter of the format [xmin,ymin,xmax,ymax]
where xmin, ymin, xmax, and ymax are replaced by geographic coordinates representing a bounding box. For instance, the following image of a bounding box may result in the parameter searchExtent=[-109.75206863611285,37.58594113282536,-100.43566238611533,41.5147462893932]
.
Warning: This searches by points, not polygons.
Suppose we have an item with the following footprint.
This footprint encompasses almost all of Utah, Arizona, Colorado, and New Mexico. However, since our search index only supports searching by points, this item is indexed as being a point near four corners.
Then, if I were to do a spatial search on a bounding box around Utah, this item would not be returned, even though its footprint contains Utah.