Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

an idigbio eg erroring #180

Closed
sckott opened this issue Dec 1, 2017 · 0 comments
Closed

an idigbio eg erroring #180

sckott opened this issue Dec 1, 2017 · 0 comments
Labels
Milestone

Comments

@sckott
Copy link
Contributor

sckott commented Dec 1, 2017

library(spocc)
wkt <- 'POLYGON((-98.9 44.2,-89.1 36.6,-116.7 37.5,-102.5 39.6,-98.9 44.2))'
occ(from = "idigbio", geometry = wkt, limit = 10)
#> Searched: idigbio
#> Occurrences - Found: 0, Returned: 0
#> Search type: Geometry
#> Warning message:
#> In foo_idigbio(sources, x, y, s, z, hc, w, idigbioopts) : HTTP failure: 400
#> Error message from API server: {"error":"Terms not found in index for type records","statusCode":400,"name":"TermNotFoundError","terms":["min_x","min_y","max_x","max_y"]}

see https://github.com/idigbio/idigbio-search-api/wiki/Query-Format#geographic-point-fields

need to change to doing

{
  "geopoint": {
    "type": "geo_bounding_box",
    "top_left": {
      "lat": 19.23,
      "lon": -130
    },
    "bottom_right": {
      "lat": -45.1119,
      "lon": 179.99999
    }
  }
}
@sckott sckott added the bug label Dec 1, 2017
@sckott sckott added this to the v0.8 milestone Dec 1, 2017
@sckott sckott closed this as completed in 1154391 Dec 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant