bmaitner / RBIEN

Tools for accessing the Botanical Information and Ecology Network (BIEN) database
http://bien.nceas.ucsb.edu/bien/
Other
43 stars 10 forks source link

BIEN_ranges_load_species fails with hardcoded proj4string #32

Open levisc8 opened 2 years ago

levisc8 commented 2 years ago

I'm trying to download a set of range maps for a tutorial in an R package I'm building, and noticed that BIEN_ranges_load_species() now fails persistently, probably due to an update to sp/sf.

xanthium_strumarium <- BIEN_ranges_load_species(species = "Xanthium strumarium")

Error in CRS(p4s): NA

I tracked down the issue to here. It seems that this format for proj4string's is no longer used(?).

I've come up with a solution for this that replaces the hardcoded string with st_crs(4326)[[2]], but I'm not sure how sustainable that is. I'm happy to create a PR that introduces this temporary fix though.