November 2018
Intermediate to advanced
360 pages
9h 36m
English
It is possible to extract the occurrence records based on geographical coordinates. In the previous recipe, add a parameter geometry to your do_request/get_all_records call. This should be a textual representation in a subset of well-known text (http://en.wikipedia.org/wiki/Well-known_text). For details of the supported subset, refer to http://www.gbif.org/developer/occurrence. As an example, a rectangular area near the Galápagos area can be represented as follows:
start = 2, -93end = 1, -91geom = 'POLYGON(({xi} {yi}, {xf} {yi}, {xf} {yf}, {xi} {yf}, {xi}{yi}))'.format(xi=start[1], xf=end[1], yi=start[0], yf=end[0])
If you want to find out more about tiling coordinates, refer to http://wiki.openstreetmap.org/wiki/Slippy_map_tilenames ...