biodiversitydata-se / SBDI4R

R package to search and access data made available through the Swedish biodiversity data infrastructure SBDI
https://biodiversitydata-se.github.io/SBDI4R/
GNU Affero General Public License v3.0
1 stars 2 forks source link

a weird search #12

Closed aleruete closed 3 years ago

aleruete commented 3 years ago

A search within a very Swedish polygon

wkt <- "POLYGON((14.94 58.88, 14.94 59.69, 18.92 59.69, 18.92 58.88, 14.94 58.88))" env_layers <- c("el10007","el10011") x <- occurrences(taxon="family:Fabaceae", wkt=wkt, qa="none", download_reason_id="testing", extra=env_layers)

returns observations in e.g. Alaska... The observation is from LUND collection which is not either within the search polygon

aleruete commented 3 years ago

2

aleruete commented 3 years ago

image

longitudes all over the place

aleruete commented 3 years ago

locations... the latitude of the search is right, but longitude not image

aleruete commented 3 years ago

the same search seems right in the bioatlas portal image

aleruete commented 3 years ago

@shahmanash any idea why this could be like this? the order of the coordinates?

aleruete commented 3 years ago

@shahmanash I saw in the Bioatlas portal that spatial searches like the one above use the parameter MULTIPOLYGON() instead of POLYGON. When changes "POLYGON((14.94 58.88, 14.94 59.69, 18.92 59.69, 18.92 58.88, 14.94 58.88))" by "MULTIPOLYGON(((14.94 58.88, 14.94 59.69, 18.92 59.69, 18.92 58.88, 14.94 58.88)))" the search went just fine!.

aleruete commented 3 years ago

I add a note to this example