[API-users] API download using geometry

Dag Endresen dag.endresen at gmail.com
Thu Feb 18 14:33:12 CET 2016


Hi all,

I am trying to download all occurrences inside the CAFF boundary area
following a request from the CAFF focal point in Norway. I have
converted the polygon to a Well Known Text object for use with the
GBIF API. (The WKT polygon looks fine when I test to open in QGIS).

http://www.gbif.org/developer/summary#authentication
http://www.gbif.org/developer/occurrence#predicates
http://www.gbif.org/developer/occurrence#p_geometry

My filter.json file is attached and looks like this (the polygon
definition is truncated here at (...) for the purpose as example):

{
  "creator":"dag.endresen",
  "notification_address": ["dag.endresen at gmail.com"],
  "predicate":
  {
    "type":"within",
    "geometry":"POLYGON((179.285633734761433
50.81429697072722,179.600130309538514 50.798132663162107,180.0
50.825202656741141,-179.985731034706419
50.826168623278733,-179.642658093259286
50.834515997684633,-179.213664117412264 (...)
50.826278190103068,179.014229185979531
50.811745655072343,179.285633734761433 50.81429697072722))"
  }
}


Error message:
Instantiation of [simple type, class
org.gbif.api.model.occurrence.predicate.WithinPredicate] value failed:
null (through reference chain:
org.gbif.api.model.occurrence.predicate.WithinPredicate["geometry"])


It might possible to download all occurrence data north of 50 degrees
(southernmost edge of the CAFF area) - and cut to CAFF area offline.
But because this is more than 200 million records, I am very
interested to check if it is possible to filter using the CAFF
boundary polygon.

http://www.gbif.org/occurrence/search?HAS_COORDINATE=true&decimalLatitude=50,90


Best wishes
Dag

-- 
Dag Endresen
Node manager for GBIF Norway
ORCID: http://orcid.org/0000-0002-2352-5497
-------------- next part --------------
A non-text attachment was scrubbed...
Name: filter.json
Type: application/json
Size: 45899 bytes
Desc: not available
URL: <http://lists.gbif.org/pipermail/api-users/attachments/20160218/9922fe89/attachment-0001.json>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: caff_wkt_wgs84.csv
Type: text/csv
Size: 45928 bytes
Desc: not available
URL: <http://lists.gbif.org/pipermail/api-users/attachments/20160218/9922fe89/attachment-0001.csv>


More information about the API-users mailing list