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

'ne_download': add 'sv' (SpatVector) to 'returnclass' options #49

Closed
AMBarbosa opened this issue Jan 3, 2022 · 2 comments
Closed

'ne_download': add 'sv' (SpatVector) to 'returnclass' options #49

AMBarbosa opened this issue Jan 3, 2022 · 2 comments
Assignees

Comments

@AMBarbosa
Copy link

The 'terra' package is becoming widey used and it replaces not only 'raster' but also 'sp' (and 'rgdal'). So, it would be highly relevant to add the 'SpatVector' class to the ne_download 'returnclass' options, and eventually even have it replace the default 'sp' class when it becomes obsolete. Cheers!

@PMassicotte
Copy link
Contributor

PMassicotte commented Jan 23, 2023

rnaturalearth is now using SpatRaster as implemented in v3.2.0 (#63).

r$> ne_download(scale = 50, type = "MSR_50M", category = "raster")
trying URL 'https://naturalearth.s3.amazonaws.com/50m_raster/MSR_50M.zip'
Content type 'application/zip' length 17984241 bytes (17.2 MB)
==================================================
downloaded 17.2 MB

class       : SpatRaster 
dimensions  : 5400, 10800, 1  (nrow, ncol, nlyr)
resolution  : 0.03333333, 0.03333333  (x, y)
extent      : -180, 180, -90, 90  (xmin, xmax, ymin, ymax)
coord. ref. : lon/lat WGS 84 (EPSG:4326) 
source      : MSR_50M.tif 
name        : MSR_50M 

Maybe add a new option returnclass = "sv" for SpatVec?

@PMassicotte PMassicotte self-assigned this Feb 4, 2023
@AMBarbosa
Copy link
Author

yes please, that would be great

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants