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

Problem when geometry as a list and name passed together #146

Closed
sckott opened this issue Sep 17, 2015 · 3 comments
Closed

Problem when geometry as a list and name passed together #146

sckott opened this issue Sep 17, 2015 · 3 comments
Assignees
Labels
Milestone

Comments

@sckott
Copy link
Contributor

sckott commented Sep 17, 2015

From discussion forum https://discuss.ropensci.org/t/spocc-and-bounding-boxes/233/7

Ah, there must be some interaction when you give geometry as a list and when you also give a taxon name to query. I think i've identified the line of code that's causing the problem https://github.com/ropensci/spocc/blob/master/R/occ.r#L80 - looks like when a taxon name and geometry as a character or numeric vector we're fine, but if it's a list, then it blows up.

@sckott sckott added the bug label Sep 17, 2015
@sckott sckott self-assigned this Sep 17, 2015
@sckott sckott added this to the v0.4 milestone Sep 17, 2015
@sckott
Copy link
Contributor Author

sckott commented Sep 17, 2015

a bit complicated. We can either let users loop over many names, many geometry inputs, but not both

So, if many names, which is the problem here, then geometry could be collapsed to a single input. BUT, see below, none of the data sources accept a wkt POLYGON with multiple polygons in it.

So, we're forced to do a new query for each bounding box/WKT string given in this scenario

wkt & bbox

  • gbif - allows WKT or bounding box - does not allow multipolygon
  • bison - allows WKT or bounding box - does not allow multipolygon

bbox only

  • ecoengine - allows only bounding box
  • inat - allows only bounding box
  • idigbio - allows only bounding box

neither

@sckott
Copy link
Contributor Author

sckott commented Sep 17, 2015

issue opened in GBIF issue tracker to see if we can get support for more than 1 polygon passed in WKT string

sckott added a commit that referenced this issue Sep 18, 2015
this stil needs tests added
also added more details as to what happens with the diff scenarios of query/geometry
parameters combined
sckott added a commit that referenced this issue Sep 18, 2015
…pty results

added more tests for occ() for geometry based searches, #146
@sckott
Copy link
Contributor Author

sckott commented Sep 18, 2015

fixed now, AFAIK

@sckott sckott closed this as completed Sep 18, 2015
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