rosm (version 0.3.0)

as.tile_source: Deprecated interface

Description

The previous interface for rosm was written to support idioms that are no longer prevalent in modren r-spatial code. These functions may continue to exist; however, their use is not encouraged and the functions may be removed in a future release.

Usage

as.tile_source(x, ...)

is.tile_source(x)

source_from_url_format( url_format, max_zoom = tile.maxzoom.default(), min_zoom = 0, attribution = NULL, extension = tools::file_ext(url_format[1]), ... )

register_tile_source(...)

set_default_tile_source(x, ...)

get_default_tile_source()

osm.types()

bmaps.types()

bmaps.plot(bbox, type = "Aerial", key = NULL, ...)

extract_bbox(x, tolatlon = TRUE, ...)

osm.plot( bbox, zoomin = 0, zoom = NULL, type = NULL, forcedownload = FALSE, stoponlargerequest = TRUE, fusetiles = TRUE, cachedir = NULL, res = 150, project = TRUE, progress = c("text", "none"), quiet = TRUE, ... )

osm.image( x, zoomin = 0, zoom = NULL, type = NULL, forcedownload = FALSE, cachedir = NULL, progress = c("text", "none"), quiet = TRUE )

osm.raster( x, zoomin = 0, zoom = NULL, type = "osm", forcedownload = FALSE, cachedir = NULL, progress = c("text", "none"), quiet = TRUE, projection = NULL, crop = FALSE, filename = NULL, resample = "bilinear", ... )

osm.points(x, y = NULL, epsg = 4326, toepsg = 3857, ...)

osm.segments(x0, y0, x1 = x0, y1 = y0, epsg = 4326, toepsg = 3857, ...)

osm.lines(x, y = NULL, epsg = 4326, toepsg = 3857, ...)

osm.polygon(x, y = NULL, epsg = 4326, toepsg = 3857, ...)

osm.text(x, y = NULL, labels = seq_along(x), epsg = 4326, toepsg = 3857, ...)

makebbox(n, e, s, w)

zoombbox(bbox, factor = 1, offset = c(0, 0))

Arguments

x, y, x0, y0, x1, y1, url_format, max_zoom, min_zoom, attribution, extension

Deprecated

...

Arguments passed to other methods

bbox

A bounding box as generated by sp::bbox()

type

A map type; one of that returned by osm.types. User defined types are possible by defining tile.url.TYPENAME <- function(xtile, ytile, zoom){} and passing TYPENAME as the type argument.

key, tolatlon, epsg, toepsg, labels, n, e, s, w, factor, offset

Deprecated

zoomin

The amount by which to adjust the automatically calculated zoom (or manually specified if the zoom parameter is passed). Use +1 to zoom in, or -1 to zoom out.

zoom

Manually specify the zoom level (not reccomended; adjust zoomin or res instead.

forcedownload

TRUE if cached tiles should be re-downloaded. Useful if some tiles are corrupted.

stoponlargerequest

By default osm.plot will only load 32 tiles at a time. If plotting at a higher resolution it may be necessary to pass true here.

fusetiles

TRUE if tiles should be fused into a single image. This is the default because white lines appear between tiles if it is set to FALSE. PDFs appear not to have this problem, so when plotting large, high resolution PDFs it may be faster (and more memory efficient) to use fusetiles=FALSE.

cachedir

The directory in which tiles should be cached. Defaults to getwd()/rosm.cache.

res

The resolution used to calculate scale.

project

TRUE if tiles should be projected to a pseudo-mercator projection, FALSE if lat/lon should be maintained. Becuase sp::plot adjusts the aspect according to latitude for lat/lon coordinates, this makes little difference at high zoom and may make plotting overlays more convenient. Defaults to TRUE.

progress

A progress bar to use, or "none" to suppress progress updates

quiet

Pass FALSE to see more error messages, particularly if your tiles do not download/load properly.

projection

A map projection in which to reproject the RasterStack as generated by CRS() or Spatial*@proj4string. If a Spatial* object is passed as the first argument, this argument will be ignored.

crop

TRUE if results should be cropped to the specified bounding box (see x), FALSE otherwise.

filename

A filename to which the raster should be written (see raster::writeRaster()). Use a ".tif" extension to write as a GeoTIFF.

resample

One of "ngb" (nearest neighbour) or "bilinear". Passed to projectRaster.