ropensci / rnaturalearth

An R package to hold and facilitate interaction with natural earth map data :earth_africa:
http://ropensci.github.io/rnaturalearth/
Other
214 stars 24 forks source link

potential breaking change - should default vector class be changed to sf from sp ? #65

Closed andysouth closed 2 weeks ago

andysouth commented 1 year ago

Currently the default returned vector class is sp ideally it would be sf, but this could be a breaking change for existing workflows.

If we changed it, the following would still work in existing workflows

ne_countries(returnclass='sf')
ne_countries(returnclass='sp')
ne_download(returnclass='sf')
ne_download(returnclass='sp')

But workflows with these could break.

ne_countries()
ne_download()

Thanks @rsbivand @Nowosad for the useful comments. Putting into own issue here.

https://github.com/ropensci/rnaturalearth/pull/63#issuecomment-1380286500

Links to https://r-spatial.org/r/2022/12/14/evolution2.html

mdsumner commented 1 year ago

my opinion, create new functions '_sf()', '_Spat()', '_wk()', maintain the old behaviour for as long as sf and sp work. New formats, new functions for when change inevitably comes again