Open mdsumner opened 1 year ago
this also works
img <- "vrt://WMTS:https://basemap.nationalmap.gov/arcgis/rest/services/USGSImageryTopo/MapServer/WMTS/1.0.0/WMTSCapabilities.xml,layer=USGSImageryTopo,tilematrixset=default028mm?ovr=6"
pt <- cbind(37.8199286,-122.4782551)[,2:1, drop = FALSE]
terra::plotRGB(terra::project(terra::rast(img), terra::rast(terra::ext(c(-1, 1, -1, 1) * 5e3), ncols = 512, nrows = 512, crs = sprintf("+proj=laea +lon_0=%f +lat_0=%f", pt[1], pt[2]))))
and a couple of other layers in there: https://basemap.nationalmap.gov/arcgis/rest/services
this came out of quickmapr:
created with gdal_translate -of WMTS ... x.xml