-
Notifications
You must be signed in to change notification settings - Fork 0
/
sources.R
354 lines (322 loc) · 23 KB
/
sources.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
#' USGS seamless DEM
#'
#' @param vsicurl if TRUE prefix /vsicurl
#' @export
#' @examples
#'
#' usgs_seamless()
#'
usgs_seamless <- function(vsicurl = TRUE) {
url <- "https://prd-tnm.s3.amazonaws.com/StagedProducts/Elevation/1/TIFF/USGS_Seamless_DEM_1.vrt"
if (vsicurl) {
url <- sprintf("/vsicurl/%s", url)
}
url
}
#' Imagery online sources
#'
#' Raster and imagery online
#'
#' @name dsn-sources
#' @export
wms_arcgis_mapserver_ESRI.WorldImagery_tms <- function() "<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>"
#' @name dsn-sources
#' @export
wms_bluemarble_s3_tms <- function() "<GDAL_WMS><Service name=\"TMS\"><ServerUrl>http://s3.amazonaws.com/com.modestmaps.bluemarble/${z}-r${y}-c${x}.jpg</ServerUrl></Service><DataWindow><UpperLeftX>-20037508.34</UpperLeftX><UpperLeftY>20037508.34</UpperLeftY><LowerRightX>20037508.34</LowerRightX><LowerRightY>-20037508.34</LowerRightY><TileLevel>9</TileLevel><TileCountX>1</TileCountX><TileCountY>1</TileCountY><YOrigin>top</YOrigin></DataWindow><Projection>EPSG:900913</Projection><BlockSizeX>256</BlockSizeX><BlockSizeY>256</BlockSizeY><BandsCount>3</BandsCount><Cache/><ZeroBlockHttpCodes>204,404,403</ZeroBlockHttpCodes></GDAL_WMS>"
#' @name dsn-sources
#' @export
wms_googlehybrid_tms <- function()"<GDAL_WMS><!-- Data is subject to term of use detailed at http://code.google.com/intl/nl/apis/maps/terms.html andhttp://www.google.com/intl/en_ALL/help/terms_maps.html --><Service name=\"TMS\"><!-- ServerUrl>http://mt.google.com/vt/lyrs=m&x=${x}&y=${y}&z=${z}</ServerUrl> --><!-- Map --><!-- <ServerUrl>http://mt.google.com/vt/lyrs=s&x=${x}&y=${y}&z=${z}</ServerUrl> --> <!-- Satellite --><ServerUrl>http://mt.google.com/vt/lyrs=y&x=${x}&y=${y}&z=${z}</ServerUrl> <!-- Hybrid --><!-- <ServerUrl>http://mt.google.com/vt/lyrs=t&x=${x}&y=${y}&z=${z}</ServerUrl> --> <!-- Terrain --><!-- <ServerUrl>http://mt.google.com/vt/lyrs=p&x=${x}&y=${y}&z=${z}</ServerUrl> --> <!-- Terrain, Streets and Water --></Service><DataWindow><UpperLeftX>-20037508.34</UpperLeftX><UpperLeftY>20037508.34</UpperLeftY><LowerRightX>20037508.34</LowerRightX><LowerRightY>-20037508.34</LowerRightY><TileLevel>20</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>5</MaxConnections><Cache /></GDAL_WMS>"
#' @name dsn-sources
#' @export
wms_virtualearth <- function()"<GDAL_WMS><Service name=\"VirtualEarth\"><ServerUrl>http://a${server_num}.ortho.tiles.virtualearth.net/tiles/a${quadkey}.jpeg?g=90</ServerUrl></Service><MaxConnections>4</MaxConnections><Cache/></GDAL_WMS>"
#' @name dsn-sources
#' @export
wms_ESA_worldcover_2020_tms <- function()"<GDAL_WMS><Service name=\"WMS\"><Version>1.1.1</Version><ServerUrl>https://services.terrascope.be/wms/v2?SERVICE=WMS</ServerUrl><Layers>WORLDCOVER_2020_MAP</Layers><SRS>EPSG:3857</SRS><ImageFormat>image/jpeg</ImageFormat><Transparent>FALSE</Transparent><BBoxOrder>xyXY</BBoxOrder></Service><DataWindow><UpperLeftX>-2.003750834E7</UpperLeftX><UpperLeftY>2.003750834E7</UpperLeftY><LowerRightX>2.003750834E7</LowerRightX><LowerRightY>-2.003750834E7</LowerRightY><SizeX>1073741824</SizeX><SizeY>1073741824</SizeY></DataWindow><BandsCount>3</BandsCount><BlockSizeX>1024</BlockSizeX><BlockSizeY>1024</BlockSizeY><OverviewCount>20</OverviewCount></GDAL_WMS>"
#' @name dsn-sources
#' @export
wms_mapbox_satellite <- function()"<GDAL_WMS><Service name=\"TMS\"><ServerUrl>https://api.mapbox.com/v4/mapbox.satellite/${z}/${x}/${y}.jpg?access_token=%s</ServerUrl></Service><DataWindow><UpperLeftX>-20037508.34</UpperLeftX><UpperLeftY>20037508.34</UpperLeftY><LowerRightX>20037508.34</LowerRightX><LowerRightY>-20037508.34</LowerRightY><TileLevel>22</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 /><ZeroBlockHttpCodes>204,404,401</ZeroBlockHttpCodes><ZeroBlockOnServerException>true</ZeroBlockOnServerException></GDAL_WMS>"
#' @name dsn-sources
#' @export
wms_amazon_elevation <- function() "<GDAL_WMS>\n <Service name=\"TMS\">\n <ServerUrl>https://s3.amazonaws.com/elevation-tiles-prod/geotiff/${z}/${x}/${y}.tif</ServerUrl>\n </Service>\n <DataWindow>\n <UpperLeftX>-20037508.340000</UpperLeftX>\n <UpperLeftY>20037508.340000</UpperLeftY>\n <LowerRightX>20037508.340000</LowerRightX>\n <LowerRightY>-20037508.340000</LowerRightY>\n <TileLevel>15</TileLevel>\n <TileCountX>1</TileCountX>\n <TileCountY>1</TileCountY>\n <YOrigin>top</YOrigin>\n </DataWindow>\n <Projection>EPSG:3857</Projection>\n <BlockSizeX>256</BlockSizeX>\n <BlockSizeY>256</BlockSizeY>\n <BandsCount>1</BandsCount>\n <UserAgent>RStudio Server (2022.7.0.548); R (4.2.1 x86_64-pc-linux-gnu x86_64 linux-gnu)</UserAgent>\n</GDAL_WMS>"
#' @name dsn-sources
#' @export
wms_mapbox_terrain <- function() "<GDAL_WMS><Service name=\"TMS\"><ServerUrl>https://api.mapbox.com/v4/mapbox.terrain-rgb/${z}/${x}/${y}@2x.png?access_token=%s</ServerUrl></Service><DataWindow><UpperLeftX>-20037508.34</UpperLeftX><UpperLeftY>20037508.34</UpperLeftY><LowerRightX>20037508.34</LowerRightX><LowerRightY>-20037508.34</LowerRightY><TileLevel>15</TileLevel><TileCountX>1</TileCountX><TileCountY>1</TileCountY><YOrigin>top</YOrigin></DataWindow><Projection>EPSG:3857</Projection><BlockSizeX>512</BlockSizeX><BlockSizeY>512</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>"
#' @name dsn-sources
#' @export
wms_openstreetmap_tms <- function() "<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>"
#' @name dsn-sources
#' @export
wms_googleterrainstreets_tms <- function() "<GDAL_WMS><!-- Data is subject to term of use detailed at http://code.google.com/intl/nl/apis/maps/terms.html andhttp://www.google.com/intl/en_ALL/help/terms_maps.html --><Service name=\"TMS\"><!-- <ServerUrl>http://mt.google.com/vt/lyrs=m&x=${x}&y=${y}&z=${z}</ServerUrl> --><!-- Map --><!-- <ServerUrl>http://mt.google.com/vt/lyrs=s&x=${x}&y=${y}&z=${z}</ServerUrl> --> <!-- Satellite --><!-- <ServerUrl>http://mt.google.com/vt/lyrs=y&x=${x}&y=${y}&z=${z}</ServerUrl> --> <!-- Hybrid --><!-- <ServerUrl>http://mt.google.com/vt/lyrs=t&x=${x}&y=${y}&z=${z}</ServerUrl> --> <!-- Terrain --><ServerUrl>http://mt.google.com/vt/lyrs=p&x=${x}&y=${y}&z=${z}</ServerUrl> <!-- Terrain, Streets and Water --></Service><DataWindow><UpperLeftX>-20037508.34</UpperLeftX><UpperLeftY>20037508.34</UpperLeftY><LowerRightX>20037508.34</LowerRightX><LowerRightY>-20037508.34</LowerRightY><TileLevel>20</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>5</MaxConnections><Cache /><ZeroBlockHttpCodes>204,404,401</ZeroBlockHttpCodes><ZeroBlockOnServerException>true</ZeroBlockOnServerException></GDAL_WMS>"
#' @name dsn-sources
#' @export
wms_virtualearth_street <- function() "<GDAL_WMS><Service name=\"VirtualEarth\"><ServerUrl>http://r${server_num}.ortho.tiles.virtualearth.net/tiles/r${quadkey}.jpeg?g=90</ServerUrl></Service><MaxConnections>4</MaxConnections><Cache/></GDAL_WMS>"
#' @name dsn-sources
#' @export
wms_arcgis_mapserver_tms <- function() "<GDAL_WMS><Service name=\"TMS\"><ServerUrl>http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/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 /></GDAL_WMS>"
#' @name dsn-sources
#' @export
nasadem <- function() "/vsicurl/https://opentopography.s3.sdsc.edu/raster/NASADEM/NASADEM_be.vrt"
#' @name dsn-sources
#' @export
cop90 <- function() "/vsicurl/https://opentopography.s3.sdsc.edu/raster/COP90/COP90_hh.vrt"
#' @name dsn-sources
#' @export
cop30 <- function() "/vsicurl/https://opentopography.s3.sdsc.edu/raster/COP30/COP30_hh.vrt"
#' @name dsn-sources
#' @export
srtm15 <- function() "/vsicurl/https://opentopography.s3.sdsc.edu/raster/SRTM15Plus/SRTM15Plus_srtm.vrt"
#' GEBCO source dsn
#'
#' A data source name to the GEBCO elevation 'COG' GeoTIFF.
#'
#' GEBCO 2023 and 2022 is created and hosted by Philippe Massicotte.
#'
#' GEBCO 2019 and 2021 created and hosted by the Australian Antarctic Division.
#'
#' See note about which forms of the bedrock vs ice surface are available. Generally we use the ice surface form, because that is what encountered while navigating the surface of the Earth. But, the bedrock is of course also of interest.
#'
#'
#' @section warning: please note that `gebco21()`, `gebco19()` return the *ice surface* form, while `gebco22()` returns the bedrock form. With `gebco23()` and `gebco23_bedrock()` these are now both avaiable, again thanks to Philippe Massicotte.
#'
#' @param vsi include the 'vsicurl' prefix (`TRUE` is default)
#'
#' @returns character string, URL to online GeoTIFF
#' @export
#'
#' @aliases gebco22 gebco21 gebco19
#' @examples
#' gebco()
gebco <- function(vsi = TRUE) {
gebco23(vsi = vsi)
}
#' @name gebco
#' @export
gebco21 <- function(vsi = TRUE) {
url <- "https://public.services.aad.gov.au/datasets/science/GEBCO_2021_GEOTIFF/GEBCO_2021.tif"
if (vsi) url <- file.path("/vsicurl", url)
url
}
#' @name gebco
#' @export
gebco23_bedrock <- function(vsi = TRUE) {
url <- "https://gebco2023.s3.valeria.science/gebco_2023_sub_ice_topo_cog.tif"
if (vsi) url <- file.path("/vsicurl", url)
url
}
#' @name gebco
#' @export
gebco23 <- function(vsi = TRUE) {
url <- "https://gebco2023.s3.valeria.science/gebco_2023_land_cog.tif"
if (vsi) url <- file.path("/vsicurl", url)
url
}
#' @name gebco
#' @export
gebco22 <- function (vsi = TRUE)
{
url <- "https://gebco2022.s3.valeria.science/gebco_2022_complete_cog.tif"
if (vsi)
url <- file.path("/vsicurl", url)
url
}
#' @name gebco
#' @export
gebco19 <- function(vsi = TRUE) {
url <- "https://public.services.aad.gov.au/datasets/science/GEBCO_2019_GEOTIFF/GEBCO_2019.tif"
if (vsi) url <- file.path("/vsicurl", url)
url
}
#' the geoBoundaries countries
#'
#' CGAZ() returns the DSN, a shapefile of geo boundaries, CGAZ_sql() returns SQL suitable for use
#' with GDAL, for the names or codes of countries.
#'
#' @export
#' @name CGAZ
#' @aliases CGAZ_sql
CGAZ <- function() "/vsizip//vsicurl/https://github.com/wmgeolab/geoBoundaries/raw/main/releaseData/CGAZ/geoBoundariesCGAZ_ADM0.zip"
#' @param codes a list of iso3 country codes, or country names (this is a bit sketchy)
#'
#' @export
#' @importFrom countrycode countrycode
#' @name CGAZ
#' @examples
#' CGAZ_sql(c("Australia", "New Zealand"))
#' CGAZ_sql(c("AUS", "NZL"))
#' ## do something like gdal_raster_data(gebco(), target_res = 1,
#' ## options = c("-crop_to_cutline",
#' ## "-cutline", CGAZ(),
#' ## "-csql", CGAZ_sql(c("Australia", "New Zealand")) ))
CGAZ_sql <- function(codes) {
if (missing(codes)) {
return("SELECT * FROM geoBoundariesCGAZ_ADM0")
}
dsn <- CGAZ()
#where <- c("Australia", "New Zealand", "Antarctica")[1]
layer <- "geoBoundariesCGAZ_ADM0" ##vapour::vapour_layer_names(dsn)[1L]
if (any(!nchar(codes) == 3L)) {
codes <- countrycode::countrycode(codes, "country.name", "iso3c")
}
csql <- sprintf("SELECT shapeGroup FROM %s WHERE shapeGroup IN (%s)", layer, paste(paste0("'", codes, "'"), collapse = ","))
#g <- vapour::vapour_read_geometry(dsn, sql = csql)
#geb <- "/vsicurl/https://public.services.aad.gov.au/datasets/science/GEBCO_2021_GEOTIFF/GEBCO_2021.tif"
#vapour::gdal_raster_data(geb, target_dim = c(100, 100), options = c("-cutline", dsn, "-csql", csql, "-crop_to_cutline"))
csql
}
#' REMA reference elevation model of Antarctica
#'
#' This is a single description string for all of the 2m REMA. The VRT is crafted with efficient
#' overviews so is much more performant with the warper API than other existing descriptions.
#'
#' See [rema-ovr](https://github.com/mdsumner/rema-ovr) for examples.
#'
#' @export
#' @aliases rema_v2
#' @return character string, GDAL-readable raster data source name
rema <- function() {
rema_v2()
}
#' @name rema
#' @export
rema_v2 <- function() {
"/vsicurl/https://raw.githubusercontent.com/mdsumner/rema-ovr/main/REMA-2m_dem_ovr.vrt"
}
#' Tasmania DEM (2m)
#'
#' by MRT 2021
#'
#' @param vsicurl prefix with vsicurl or not
#'
#' @return data source name for Tasmania 2m DEM
#' @export
#'
#' @examples
#' tas_dem()
tas_dem <- function(vsicurl = TRUE) {
url <- "https://s3.us-west-2.amazonaws.com/us-west-2.opendata.source.coop/alexgleith/tasmania-dem-2m/Tasmania_Statewide_2m_DEM_14-08-2021.tif"
if (vsicurl) {
file.path("/vsicurl", url)
} else {
url
}
}
#' MURSST (GHRSST) sst Zarr source
#'
#' This is used a lot of noisy fanfare about why everyone must move to Zarr in
#' the cloud. It's really big, daily netcdf blended/observation/model data on a
#' 36000x18000 grid, a regular grid in -180, 180, -90, 90.
#'
#'
#' It seems like this source doesn't go past "2020-01-21" or band 6443, don't know why that is.
#'
#'
#' @param band a band number (defaults to 0, which is 2002-06-01)
#'
#' @return a string, a dsn for Zarr MURSST
#' @export
#'
#' @examples
#' mursst()
#' mursst_time("2019-10-08")
mursst <- function(band = 0) {
Sys.setenv("AWS_NO_SIGN_REQUEST"="yes")
sprintf("ZARR:\"/vsis3/mur-sst/zarr\":/analysed_sst:%i", band)
}
#' @param time a time value to pick, see Details
#'
#' @name mursst
#' @export
mursst_time <- function(time = NULL) {
Sys.setenv("AWS_NO_SIGN_REQUEST"="yes")
epoch <- as.Date("2002-06-01")
if (!is.null(time)) {
time <- as.Date(as.POSIXct(time))
} else {
time <- epoch
}
## basically days since
band <- as.Date(time) - epoch
if (band < 0) stop("time is before the beginning")
if (time > (Sys.Date()-5)) message("time is only 5 days ago or in the future")
mursst(band)
}
usgs_hydro <- function() {
"WMTS:https://basemap.nationalmap.gov/arcgis/rest/services/USGSHydroCached/MapServer/WMTS/1.0.0/WMTSCapabilities.xml,layer=USGSHydroCached,tilematrixset=default028mm"
}
usgs_imagery <- function() {
"WMTS:https://basemap.nationalmap.gov/arcgis/rest/services/USGSImageryOnly/MapServer/WMTS/1.0.0/WMTSCapabilities.xml,layer=USGSImageryOnly,tilematrixset=default028mm"
}
usgs_image_topo <- function() {
"WMTS:https://basemap.nationalmap.gov/arcgis/rest/services/USGSImageryTopo/MapServer/WMTS/1.0.0/WMTSCapabilities.xml,layer=USGSImageryTopo,tilematrixset=default028mm"
}
usgs_shade <- function() {
"WMTS:https://basemap.nationalmap.gov/arcgis/rest/services/USGSShadedReliefOnly/MapServer/WMTS/1.0.0/WMTSCapabilities.xml,layer=USGSShadedReliefOnly,tilematrixset=default028mm"
}
usgs_shade <- function() {
"WMTS:https://basemap.nationalmap.gov/arcgis/rest/services/USGSShadedReliefOnly/MapServer/WMTS/1.0.0/WMTSCapabilities.xml,layer=USGSShadedReliefOnly,tilematrixset=default028mm"
}
usgs_tnmblank <- function() {
"WMTS:https://basemap.nationalmap.gov/arcgis/rest/services/USGSTNMBlank/MapServer/WMTS/1.0.0/WMTSCapabilities.xml,layer=USGSTNMBlank,tilematrixset=default028mm"
}
usgs_topo <- function() {
"WMTS:https://basemap.nationalmap.gov/arcgis/rest/services/USGSTopo/MapServer/WMTS/1.0.0/WMTSCapabilities.xml,layer=USGSTopo,tilematrixset=default028mm"
}
tasmap_sources <- function() {
c(aerialphoto2020 = "WMTS:https://services.thelist.tas.gov.au/arcgis/rest/services/Basemaps/AerialPhoto2020/MapServer/WMTS/1.0.0/WMTSCapabilities.xml,layer=Basemaps_AerialPhoto2020,tilematrixset=default028mm",
aerialphoto2021 = "WMTS:https://services.thelist.tas.gov.au/arcgis/rest/services/Basemaps/AerialPhoto2021/MapServer/WMTS/1.0.0/WMTSCapabilities.xml,layer=Basemaps_AerialPhoto2021,tilematrixset=default028mm",
aerialphoto2022 = "WMTS:https://services.thelist.tas.gov.au/arcgis/rest/services/Basemaps/AerialPhoto2022/MapServer/WMTS/1.0.0/WMTSCapabilities.xml,layer=Basemaps_AerialPhoto2022,tilematrixset=default028mm",
aerialphoto2023 = "WMTS:https://services.thelist.tas.gov.au/arcgis/rest/services/Basemaps/AerialPhoto2023/MapServer/WMTS/1.0.0/WMTSCapabilities.xml,layer=Basemaps_AerialPhoto2023,tilematrixset=default028mm",
esgismapbookpublic = "WMTS:https://services.thelist.tas.gov.au/arcgis/rest/services/Basemaps/ESgisMapBookPUBLIC/MapServer/WMTS/1.0.0/WMTSCapabilities.xml,layer=Basemaps_ESgisMapBookPUBLIC,tilematrixset=default028mm",
hillshadegrey = "WMTS:https://services.thelist.tas.gov.au/arcgis/rest/services/Basemaps/HillshadeGrey/MapServer/WMTS/1.0.0/WMTSCapabilities.xml,layer=Basemaps_HillshadeGrey,tilematrixset=default028mm",
hillshade = "WMTS:https://services.thelist.tas.gov.au/arcgis/rest/services/Basemaps/Hillshade/MapServer/WMTS/1.0.0/WMTSCapabilities.xml,layer=Basemaps_Hillshade,tilematrixset=default028mm",
orthophoto = "WMTS:https://services.thelist.tas.gov.au/arcgis/rest/services/Basemaps/Orthophoto/MapServer/WMTS/1.0.0/WMTSCapabilities.xml,layer=Basemaps_Orthophoto,tilematrixset=default028mm",
simplebasemap = "WMTS:https://services.thelist.tas.gov.au/arcgis/rest/services/Basemaps/SimpleBasemap/MapServer/WMTS/1.0.0/WMTSCapabilities.xml,layer=Basemaps_SimpleBasemap,tilematrixset=default028mm",
tasmap100k = "WMTS:https://services.thelist.tas.gov.au/arcgis/rest/services/Basemaps/Tasmap100K/MapServer/WMTS/1.0.0/WMTSCapabilities.xml,layer=Basemaps_Tasmap100K,tilematrixset=default028mm",
tasmap250k = "WMTS:https://services.thelist.tas.gov.au/arcgis/rest/services/Basemaps/Tasmap250K/MapServer/WMTS/1.0.0/WMTSCapabilities.xml,layer=Basemaps_Tasmap250K,tilematrixset=default028mm",
tasmap25k = "WMTS:https://services.thelist.tas.gov.au/arcgis/rest/services/Basemaps/Tasmap25K/MapServer/WMTS/1.0.0/WMTSCapabilities.xml,layer=Basemaps_Tasmap25K,tilematrixset=default028mm",
tasmap500k = "WMTS:https://services.thelist.tas.gov.au/arcgis/rest/services/Basemaps/Tasmap500K/MapServer/WMTS/1.0.0/WMTSCapabilities.xml,layer=Basemaps_Tasmap500K,tilematrixset=default028mm",
tasmapraster = "WMTS:https://services.thelist.tas.gov.au/arcgis/rest/services/Basemaps/TasmapRaster/MapServer/WMTS/1.0.0/WMTSCapabilities.xml,layer=Basemaps_TasmapRaster,tilematrixset=default028mm",
topographicgrayscale = "WMTS:https://services.thelist.tas.gov.au/arcgis/rest/services/Basemaps/TopographicGrayScale/MapServer/WMTS/1.0.0/WMTSCapabilities.xml,layer=Basemaps_TopographicGrayScale,tilematrixset=default028mm",
topographic = "WMTS:https://services.thelist.tas.gov.au/arcgis/rest/services/Basemaps/Topographic/MapServer/WMTS/1.0.0/WMTSCapabilities.xml,layer=Basemaps_Topographic,tilematrixset=default028mm",
street = "https://services.thelist.tas.gov.au/arcgis/rest/services/Raster/TTSA/MapServer/WMTS/1.0.0/WMTSCapabilities.xml"
)
}
## see here for examples
## https://gist.github.com/mdsumner/c3f7dad2703b1ef73b95a4caa1daef55
ozgrab_bag_sources <- c("WMTS:https://maps.sa.gov.au/arcgis/rest/services/BaseMaps/StreetMap_wmas/MapServer/WMTS/1.0.0/WMTSCapabilities.xml",
"WMTS:https://spatial-gis.information.qld.gov.au/arcgis/rest/services/Basemaps/QldMap_Topo/MapServer/WMTS/1.0.0/WMTSCapabilities.xml",
"WMTS:https://mapprod1.environment.nsw.gov.au/arcgis/rest/services/LandCap/LandAndSoilCapability_EDP/MapServer/WMTS/1.0.0/WMTSCapabilities.xml",
"WMS:http://services.ga.gov.au/gis/services/Ausimage_Canberra_2014/ImageServer/WMSServer?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=Ausimage_Canberra_2014&SRS=EPSG:4326&BBOX=148.887753,-35.516701,149.293527,-35.122388",
"WMTS:https://services.ga.gov.au/gis/rest/services/Topographic_Base_Map/MapServer/WMTS/1.0.0/WMTSCapabilities.xml",
"WMS:https://services.ga.gov.au/gis/services/Marine_Geomorphic_Features/MapServer/WmsServer?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=Geomorphic_Features&SRS=EPSG:4326&BBOX=93.412315,-60.923248,171.801102,-8.472063",
"WMTS:https://gissdi.dmp.wa.gov.au/gisexternal/rest/services/External/GSD_Basemap_External/MapServer/WMTS/1.0.0/WMTSCapabilities.xml",
"WMTS:https://base.maps.vic.gov.au/service?service=wmts&request=getCapabilities,layer=CARTO_WM_256"
)
#' IBCOS source dsn
#'
#' A data source name to the IBCSO elevation 'COG' GeoTIFF.
#'
#' Currently at v2.
#'
#' @param vsi include the 'vsicurl' prefix (`TRUE` is default)
#' @param chart the image or the data? set to TRUE for image (it's a PDF)
#'
#' @returns character string, URL to online raster
#' @export
#'
#' @examples
#' ibcso()
#'
ibcso <- function(vsi = TRUE, chart = FALSE) {
u <- "https://github.com/mdsumner/ibcso-cog/raw/main/IBCSO_v2_ice-surface_cog.tif"
if (chart) u <- "https://github.com/mdsumner/ibcso-cog/raw/main/IBSCO_v2_digital_chart.tif"
if (vsi) u <- sprintf("/vsicurl/%s", u)
u
}
#' DEA 250m dem
#' @export
dea_250m_dem <- function(vsi = TRUE) {
u <- "https://s3.ap-southeast-2.amazonaws.com/ausseabed-public-warehouse-bathymetry/L3/6009f454-290d-4c9a-a43d-00b254681696/Australian_Bathymetry_and_Topography_2023_250m_MSL_cog.tif"
if (vsi) u <- sprintf("/vsicurl/%s", u)
u
}