# \donttest{
# Retrieve all the tiles
s2tiles <- s2_tiles()
# Extract a subset of all the tiles
s2tiles_ch <- s2tiles[grepl("32T[LMN][ST]", s2tiles$tile_id),]
s2_coords <- sf::st_coordinates(suppressWarnings(sf::st_centroid(s2tiles_ch)))
# Show the tiles
plot(s2tiles_ch$geometry, border = "black")
text(s2_coords[,1], s2_coords[,2], s2tiles_ch$tile_id, cex = .75)
# }
Run the code above in your browser using DataLab