BNHM / reservemapper

Mapping Biodiversity data on our natural reserves
https://reservemapper.berkeley.edu
GNU General Public License v3.0
1 stars 6 forks source link

Building Better Searches with the Right GBIF Tools #69

Open jdeck88 opened 4 months ago

jdeck88 commented 4 months ago

Following is a thread excerpted from the GBIF portal-feedback log: https://github.com/gbif/portal-feedback/issues/4678

There are some ways of using the GBIF API that will work alot better for us rather than the current query, which is slow and breaks after 50K records. An example of our current search against the GBIF API looks like:

https://api.gbif.org/v1/occurrence/search?limit=300&offset=0&taxonKey=2877951&decimalLongitude=-123.66600525641043,-123.57191049108845&decimalLatitude=39.68616475677514,39.76299236926137

GBIF MAP API-- has a png and a vector tile service-- instead of returning the JSON for every record return images of query results and overlay:

Documentation is here https://www.gbif.org/developer/maps
Live usage of png is here https://www.gbif.org/occurrence/map?occurrence_status=present showing billions of 
Live usage of vector tiles is here https://www.gbif.us/data/?view=MAP (it needs a proper loader, so be patient)

Faceted Searching (useful for the Statistics Tab):

https://api.gbif.org/v1/occurrence/search?limit=0&offset=6300&decimalLongitude=-123.66600525641043,-123.57191049108845&decimalLatitude=39.68616475677514,39.76299236926137&facet=institutionCode&facetLimit=20

WKT Polygon Searching (instead of bounding box):

https://api.gbif.org/v1/occurrence/search?geometry=POLYGON((30.1%2010.1,%2040%2040,%2020%2040,%2010%2020,%2030.1%2010.1))