Get a SpatialPolygons around a point

get_pol(i, pts, dl = 1000, .crs = sp::CRS("+proj=longlat +datum=WGS84"))

Arguments

i

the indice of the requested points

pts

SpatialPoints

dl

a number of pixel added in all direction to the coordinates of the i-th point in order to create a square tile

.crs

a sp::CRS, usually the one from the DEM to be tiled