bbox_tile_extent: bbox_tile_extent

Description Usage Arguments Details Value Examples

Description

Convert a bounding box from latitude and longitude to tile numbers

Usage

1
bbox_tile_extent(bbox, zoom)

Arguments

bbox

a bbox object created by 'sf::st_bbox', or a vector with names 'xmin', 'xmax', 'ymin', 'ymax'

zoom

zoom level to calculate the tile grid on.

Details

This function creates an analog of a bounding box but in tile numbers. It returns the min and max x and y tile numbers for a tile grid that would fit the bounding box for a given zoom level.

Value

a list of 'x_min', 'y_min', 'x_max', 'y_max'

Examples

1
2
3
tibrogargan<- c(xmin = 152.938485, ymin = -26.93345, xmax = 152.956467, 
               ymax = -26.921463)
bbox_tile_extent(tibrogargan, zoom = 15)

slippymath documentation built on June 28, 2019, 5:04 p.m.