iobis / robis

R client for the OBIS API
https://iobis.github.io/robis
Other
37 stars 11 forks source link

Issue with downloading checklist from a map-spanning multipolygon #24

Open jebyrnes opened 7 years ago

jebyrnes commented 7 years ago

I'm working with a set of polygons from Spalding's Marine Ecoregions of the World classification - https://academic.oup.com/bioscience/article/57/7/573/238419/Marine-Ecoregions-of-the-World-A and https://github.com/jebyrnes/meowr for access within R.

Some of the ecoregions span the international dateline and/or both sides of the map. For example, the Aleutian Islands. I've put the WKT for this region into https://gist.github.com/jebyrnes/329f09b0ce2abc8710bade92f126d5e8

So, the following code just kind of hangs with no return - or at least is taking far far far longer than equivalently sized ecoregions which are downloaded in a minute or so at most.

library(RCurl)
library(robis)

al <- getURLContent("https://gist.githubusercontent.com/jebyrnes/329f09b0ce2abc8710bade92f126d5e8/raw/345e93b90b9ab9d13fc8806c3d333d0d646806bc/aleutians.wkt")

al_check <- checklist(geometry = al)

What is going on and is there a straightforward fix?

ekleins commented 7 years ago

It is probably related, I'm trying checklist for the IHO Caribbean sea WKT, and checklist returned

Error in checklist(geometry = wkt) : Request Entity Too Large (HTTP 413).

How large is a Too Large WKT?

samuelbosch commented 6 years ago

@jebyrnes: With enough patience (a couple of minutes) the function returns a result with your wkt. I think some geospatial index lookup is failing because you're passing a multipolygon with features accross the dateline. We are currently working on a faster API which should also work better for this case.

@ekleins: this HTTP 413 was unrelated and has been fixed.