if (FALSE) {
# Example 1: AOI from bounding box (Zurich, Switzerland)
res_bbox <- chm_analysis(
bbox = c(8.51, 47.36, 8.56, 47.40),
output_dir = tempdir(), max_tiles = 2, create_plots = TRUE
)
print(res_bbox$stats)
# Example 2: AOI from location string (Parc La Grange, Geneva)
res_loc <- chm_analysis(
location = "Parc La Grange, Geneva, Switzerland",
output_dir = tempdir(), max_tiles = 2
)
print(res_loc$stats)
# Example 3: Analyze a user-supplied CHM raster
# Assume you have a file "my_canopy.tif" (projected or WGS84)
res_tif <- chm_analysis(
chm_tif = "my_canopy.tif",
output_dir = tempdir(),
create_plots = TRUE,
height_threshold = 3
)
print(res_tif$stats)
}
Run the code above in your browser using DataLab