Skip to content

Repository files navigation

sds

CRAN status R-CMD-check

The goal of sds is to provide spatial data sources!!

Installation

You can install the development version of sds from GitHub with:

# install.packages("devtools")
devtools::install_github("hypertidy/sds")

Example

This shows some of the variety of the sources available.

library(sds)

gebco() ## a global seamless topography (bathymetry and elevation)
#> [1] "/vsicurl/https://projects.pawsey.org.au/idea-gebco-tif/GEBCO_2025.tif"

CGAZ()  ## a global nations boundaries dataset
#> [1] "/vsicurl/https://github.com/mdsumner/geoboundaries/releases/download/latest/geoBoundariesCGAZ_ADM0.parquet"

CGAZ_sql(c("New Zealand", "Australia")) ## a SQL query for the CGAZ polygons
#> [1] "SELECT shapeGroup FROM geoBoundariesCGAZ_ADM0 WHERE shapeGroup IN ('NZL','AUS')"

cop30()  ## a global 30m elevation data set 
#> [1] "/vsicurl/https://opentopography.s3.sdsc.edu/raster/COP30/COP30_hh.vrt"


mpc()  ## return STAC collections for use with GDAL
#> [1] "STACIT:\"https://planetarycomputer.microsoft.com/api/stac/v1/search?collections=sentinel-2-l2a&bbox=146.5,-43.2,147.5,-42.2&datetime=2026-07-31T00:00:00Z/2026-08-06T00:00:00Z\""

mpc( datetime = as.Date(c("2019-06-01", "2019-08-01")), 
    bbox = c(-148.56, -147.44, 60.80, 61.18), asset = "visual")
#> [1] "STACIT:\"https://planetarycomputer.microsoft.com/api/stac/v1/search?collections=sentinel-2-l2a&bbox=-148.56,60.8,-147.44,61.18&datetime=2019-06-01T00:00:00Z/2019-08-01T00:00:00Z\":asset=visual"

## or return just the string a for jsonlite read
js <- jsonlite::fromJSON(mpc(stacit  = F))
## do it how you like
js$features$assets$visual$href
#> [1] "https://sentinel2l2a01.blob.core.windows.net/sentinel2-l2/55/G/DP/2026/08/04/S2B_MSIL2A_20260804T001109_N0512_R073_T55GDP_20260804T032649.SAFE/GRANULE/L2A_T55GDP_A049148_20260804T001400/IMG_DATA/R10m/T55GDP_20260804T001109_TCI_10m.tif"
#> [2] "https://sentinel2l2a01.blob.core.windows.net/sentinel2-l2/55/G/DN/2026/08/04/S2B_MSIL2A_20260804T001109_N0512_R073_T55GDN_20260804T032649.SAFE/GRANULE/L2A_T55GDN_A049148_20260804T001400/IMG_DATA/R10m/T55GDN_20260804T001109_TCI_10m.tif"
#> [3] "https://sentinel2l2a01.blob.core.windows.net/sentinel2-l2/55/G/DP/2026/08/01/S2A_MSIL2A_20260801T001251_N0512_R073_T55GDP_20260801T093911.SAFE/GRANULE/L2A_T55GDP_A058014_20260801T001252/IMG_DATA/R10m/T55GDP_20260801T001251_TCI_10m.tif"
#> [4] "https://sentinel2l2a01.blob.core.windows.net/sentinel2-l2/55/G/DN/2026/08/01/S2A_MSIL2A_20260801T001251_N0512_R073_T55GDN_20260801T093911.SAFE/GRANULE/L2A_T55GDN_A058014_20260801T001252/IMG_DATA/R10m/T55GDN_20260801T001251_TCI_10m.tif"
#> [5] "https://sentinel2l2a01.blob.core.windows.net/sentinel2-l2/55/G/EP/2026/08/01/S2B_MSIL2A_20260801T000219_N0512_R030_T55GEP_20260801T031303.SAFE/GRANULE/L2A_T55GEP_A049105_20260801T000702/IMG_DATA/R10m/T55GEP_20260801T000219_TCI_10m.tif"
#> [6] "https://sentinel2l2a01.blob.core.windows.net/sentinel2-l2/55/G/EN/2026/08/01/S2B_MSIL2A_20260801T000219_N0512_R030_T55GEN_20260801T031303.SAFE/GRANULE/L2A_T55GEN_A049105_20260801T000702/IMG_DATA/R10m/T55GEN_20260801T000219_TCI_10m.tif"
#> [7] "https://sentinel2l2a01.blob.core.windows.net/sentinel2-l2/55/G/DP/2026/08/01/S2B_MSIL2A_20260801T000219_N0512_R030_T55GDP_20260801T031303.SAFE/GRANULE/L2A_T55GDP_A049105_20260801T000702/IMG_DATA/R10m/T55GDP_20260801T000219_TCI_10m.tif"
#> [8] "https://sentinel2l2a01.blob.core.windows.net/sentinel2-l2/55/G/DN/2026/08/01/S2B_MSIL2A_20260801T000219_N0512_R030_T55GDN_20260801T031303.SAFE/GRANULE/L2A_T55GDN_A049105_20260801T000702/IMG_DATA/R10m/T55GDN_20260801T000219_TCI_10m.tif"

There are image tile servers:

wms_arcgis_mapserver_ESRI.WorldImagery_tms()
#> [1] "<GDAL_WMS><Service name=\"TMS\"><ServerUrl>http://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/${z}/${y}/${x}</ServerUrl></Service><DataWindow><UpperLeftX>-20037508.34</UpperLeftX><UpperLeftY>20037508.34</UpperLeftY><LowerRightX>20037508.34</LowerRightX><LowerRightY>-20037508.34</LowerRightY><TileLevel>17</TileLevel><TileCountX>1</TileCountX><TileCountY>1</TileCountY><YOrigin>top</YOrigin></DataWindow><Projection>EPSG:900913</Projection><BlockSizeX>256</BlockSizeX><BlockSizeY>256</BlockSizeY><BandsCount>3</BandsCount><MaxConnections>10</MaxConnections><Cache /><ZeroBlockHttpCodes>204,404,403</ZeroBlockHttpCodes></GDAL_WMS>"
wms_openstreetmap_tms()
#> [1] "<GDAL_WMS><Service name=\"TMS\"><ServerUrl>https://tile.openstreetmap.org/${z}/${x}/${y}.png</ServerUrl></Service><DataWindow><UpperLeftX>-20037508.34</UpperLeftX><UpperLeftY>20037508.34</UpperLeftY><LowerRightX>20037508.34</LowerRightX><LowerRightY>-20037508.34</LowerRightY><TileLevel>18</TileLevel><TileCountX>1</TileCountX><TileCountY>1</TileCountY><YOrigin>top</YOrigin></DataWindow><Projection>EPSG:3857</Projection><BlockSizeX>256</BlockSizeX><BlockSizeY>256</BlockSizeY><BandsCount>3</BandsCount><!--<UserAgent>Please add a specific user agent text, to avoid the default one being used, and potentially blocked by OSM servers in case a too big usage of it would be seen</UserAgent>--><Cache /></GDAL_WMS>"

## not shown else will reveal my INSTANCE_ID
wms <- sentinel2_wms()

And a very specific sea ice source:

nsidc_seaice(hemisphere = "south")
#> [1] "/vsicurl/https://noaadata.apps.nsidc.org/NOAA/G02135/south/daily/geotiff/2026/07_Jul/S_20260729_concentration_v4.0.tif"
nsidc_seaice(hemisphere = "north")
#> [1] "/vsicurl/https://noaadata.apps.nsidc.org/NOAA/G02135/north/daily/geotiff/2026/07_Jul/N_20260729_concentration_v4.0.tif"

Code of Conduct

Please note that the sds project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

About

Spatial Data Sources!

Resources

Code of conduct

Stars

8 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages