get-tiles-constrained: Get tiles with specific constraints

get-tiles-constrainedR Documentation

Get tiles with specific constraints

Description

Get tiles by zoom, by overall dimension, or by buffer on a single point.

Usage

get_tiles_zoom(x, zoom = 0, ..., format = "png")

get_tiles_dim(x, dim = c(512, 512), ..., format = "png")

get_tiles_buffer(x, buffer = NULL, ..., max_tiles = 9, format = "png")

Arguments

x

a spatial object with an extent

zoom

desired zoom for tiles, use with caution - cannot be unset in get_tiles_zoom

...

passed to get_tiles()

format

defaults to "png", also available is "jpg"

dim

for get_tiles_dim the overall maximum dimensions of the image (padded out to tile size of 256x256)

buffer

width in metres to extend around the location, ignored if 'x' is a spatial object with extent

max_tiles

maximum number of tiles - if NULL is set by zoom constraints

Details

Each function expects an extent in longitude latitude or a spatial object with extent as the first argument.

get_tiles_zoom() requires a zoom value, defaulting to 0

get_tiles_dim() requires a dim value, default to c(512, 512), a set of 4 tiles

get_tiles_buffer() requires a single location (longitude, latitude) and a buffer in metres

Value

A list with files downloaded in character vector, a data frame of the tile indices, the zoom level used and the extent in xmin,xmax,ymin,ymax form.

See Also

get_tiles

Examples

if (!is.null(get_api_key())) {
 ex <- ext(146, 147, -43, -42)
 tile_infoz <- get_tiles_zoom(ex,  zoom = 1)

 tile_infod <- get_tiles_dim(ex,  dim = c(256, 256))

 tile_infob <- get_tiles_buffer(cbind(146.5, -42.5), buffer = 5000)
}

ceramic documentation built on June 22, 2024, 12:19 p.m.