bbox_tile_extent {slippymath}R Documentation

bbox_tile_extent

Description

Convert a bounding box from latitude and longitude to tile numbers

Usage

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

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

[Package slippymath version 0.3.1 Index]