# define a location of interest, and a circle of radius 10km around it
input.point = sf::st_point(c(x=-120.1, y=50.1)) |> sf::st_sfc(crs='EPSG:4326')
if( requireNamespace('units', quietly = TRUE) ) {
input.polygon = input.point |> sf::st_buffer(units::set_units(10, km))
if (FALSE) {
# the following downloads data from FRDR
# open the DEM mapsheets corresponding to the polygon and plot
opendata_bc(geo=input.polygon, 'dem') |> terra::plot()
}
}
Run the code above in your browser using DataLab