get_left_right_tiles: Get left and right tiles

Description Usage Arguments Value Examples

View source: R/get_left_right_tiles.R

Description

Get left and right OSM tiles for a given BCU - necessary for BCUs that cross the 180th meridian line (i.e., Fiji BCUs), as tmaptools::read_osm uses a fixed projection that cannot be changed and so cuts off.

Usage

1
get_left_right_tiles(bcus, bcu_name, bcu_ext, tile_type = "bing", zoom = NULL)

Arguments

bcus

Indicator data for BCUs, from data/bcus_list.rds

bcu_name

Name of BCU that tiles are being pulled for

bcu_ext

Extension factor of the BCU's bounding box, from data/bcus_ext.rds

tile_type

Type of OSM tile to get. Defaults to "bing".

zoom

Tile zoom. Defaults to NULL, in which case it is determined automatically

Value

A named list ("left" and "right") of OSM tiles.

Examples

1
2
3
4
5
bcu_name <- "Vatu-i-Ra"
bcus <- readRDS(here::here("data", "bcus_list.rds"))
bcu_ext <- readRDS(here::here("data", "bcus_ext.rds"))[[bcu_name]]

get_left_right_tiles(bcus, bcu_name, bcu_ext)

WCS-Marine/local-reef-pressures documentation built on Feb. 13, 2022, 9:26 a.m.