Learn R Programming

osmplotr (version 0.2.0)

get_bbox: get_bbox

Description

Converts a string of latitudes and longitudes into a square matrix to be passed as a 'bbox' argument (to extract_osm_objects(), plot_osm_basemap (), make_osm_map (), or extract_highway ()).

Usage

get_bbox(latlon)

Arguments

latlon
A vector of (longitude, latitude, longitude, latitude) values

Value

  • A 2-by-2 matrix of 4 elements with columns of min and max values, and rows of x and y values.

Examples

Run this code
bbox <- get_bbox (c (-0.15, 51.5, -0.1, 51.52))

Run the code above in your browser using DataLab