hypertidy / ceramic

read image server tiles direct with GDAL, or download image server tiles to a local cache
https://hypertidy.github.io/ceramic/
92 stars 6 forks source link

cannot use type = "elevation-tiles-prod" with cc_elevation #28

Closed mdsumner closed 4 years ago

mdsumner commented 4 years ago

Needs checking, it works with cc_location because cc_elevation must be special-cased, need to detect the use of type.

mdsumner commented 4 years ago

PROBLEM:

library(ceramic)
> a <- cc_elevation(cbind(0, 0), buffer = 5000, type = "elevation-tile-prod")
Error in cc_location(loc, buffer = buffer, type = "mapbox.terrain-rgb",  : 
  formal argument "type" matched by multiple actual arguments

## workaround
cc_location(cbind(0, 0), buffer = 5000, type = "elevation-tiles-prod")
Preparing to download: 16 tiles at zoom = 13 from 
https://s3.amazonaws.com/elevation-tiles-prod/geotiff/
class      : RasterBrick 
dimensions : 1048, 1048, 1098304, 1  (nrow, ncol, ncell, nlayers)
resolution : 9.554629, 9.554629  (x, y)
extent     : -5006.625, 5006.625, -5006.625, 5006.625  (xmin, xmax, ymin, ymax)
crs        : +proj=merc +a=6378137 +b=6378137 
source     : memory
names      :     layer 
min values : -4938.336 
max values : -4917.557