define_image_size: Define image size variables from the given bounding box...

Description Usage Arguments Value Examples

View source: R/get_map_data.R

Description

Define image size variables from the given bounding box coordinates.

Usage

1
define_image_size(bbox, major_dim = 400)

Arguments

bbox

bounding box coordinates (list of 2 points with long/lat values)

major_dim

major image dimension, in pixels. Default is 400 (meaning larger dimension will be 400 pixels)

Value

list with items "width", "height", and "size" (string of format "width,height")

Examples

1
2
3
4
5
bbox <- list(
  p1 = list(long = -122.522, lat = 37.707),
  p2 = list(long = -122.354, lat = 37.84)
)
image_size <- define_image_size(bbox, 600)

nmcdev/nmcMetIO documentation built on Jan. 30, 2022, 5:09 a.m.