mz_bbox {rmapzen}R Documentation

Get the bounding box

Description

Returns the bottom left and top right corners of the box that contains a mapzen object (mz_geo_list, mz_isochrone_list, or mapzen_vector_tiles). In the case of mz_rect, creates such a box from the specified coordinates. The returned value can be used directly as the boundary.rect parameter for search functions, as well as converted to x, y, zoom coordinates to use with mz_vector_tiles.

Usage

mz_bbox(geo)

## S3 method for class 'mapzen_geo_list'
mz_bbox(geo)

## S3 method for class 'mapzen_isochrone_list'
mz_bbox(geo)

mz_rect(min_lon, min_lat, max_lon, max_lat)

Arguments

geo

A mapzen geo list or isochrone list

min_lon, min_lat, max_lon, max_lat

The bottom left and top right corners, expressed as latitude and longitude, of a rectangle.

Value

A single-row tibble with columns min_lon, min_lat, max_lon, max_lat.

Examples

mz_rect(min_lon = -122.2856, min_lat = 37.73742, max_lon = -122.1749, max_lat = 37.84632)
mz_bbox(oakland_public)


[Package rmapzen version 0.5.1 Index]