View source: R/get_tilecodes.R
get_tilecodes | R Documentation |
Given a spatial object returns the tile codes for Albers Tiles used by Geoscience Australia and others
get_tilecodes(spobj) tiles_as_sf(tilecodes)
spobj |
an sp object |
tilecodes |
A list of tile codes. |
a named vector of tile codes
tiles_as_sf
: Make sf polygons showing the tiles
tilecodes <- unlist(read.csv(system.file("austilecodes.txt", package = "sflddata"))) names(tilecodes) <- NULL tiles <- tiles_as_sf(tilecodes) ausstates <- readRDS("./private/data/basemaps/ausstates.rds") sf::st_crs(ausstates) <- sf::st_crs(ausstates) ausstates <- sf::st_transform(ausstates, sf::st_crs(tiles)) # check that tiles cover all land mass library(ggplot2) ggplot() + geom_sf(aes(), fill = "red", data = ausstates) + geom_sf(aes(), data = tiles)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.