Search and retrieve 3D-GloBFP tiles that intersect a given bounding box or area of interest, with options to return vector or raster outputs including building polygons, binary presence rasters, and height-coded rasters.
search_3dglobdf(
bbox,
metadata,
crop = FALSE,
out_type = "poly",
mask = FALSE,
cell_size = 1
)Varies based on out_type:
If "poly": an sf object of building footprints.
If "binary_rast": a binary SpatRaster (terra) indicating building presence.
If "graduated_rast": a quantitative SpatRaster of building heights.
If "rast": a named list with two SpatRaster objects: binary and graduated.
If "all": a named list with poly (sf), binary, and graduated rasters.
sf, sfc, or a numeric vector (xmin, ymin, xmax, ymax)
defining the area of interest.
sf. Typically output from get_metadata(), containing tile
extents and download URLs.
logical. If TRUE, the resulting building footprint geometries
will be cropped to the input bbox. Default is FALSE.
character. Default is 'poly'.
Output type(s) to return. Options include:
"poly": building footprints as an sf polygon object.
"binary_rast": binary terra raster where buildings = 1.
"graduated_rast": terra raster encoding building height values.
"rast": a named list with both binary and graduated rasters.
"all": a named list including the polygon layer and both raster layers.
logical (optional). Default is FALSE. If TRUE, masks the
graduated raster using the building footprint layer. Only used when out_type
is "graduated_rast", "rast", or "all".
numeric (optional). Default is 1. Only used when out_type
is "graduated_rast", "rast", or "all".
Che Yangzi, Li Xuecao, Liu Xiaoping, Wang Yuhao, Liao Weilin, Zheng Xianwei, Zhang Xucai, Xu Xiaocong, Shi Qian, Zhu Jiajun, Zhang Honghui, Yuan Hua, & Dai Yongjiu (2024). 3D-GloBFP: the first global three-dimensional building footprint dataset. Earth Syst. Sci. Data, 16, 5357-5374
metadata <- gloBFPr::get_metadata(test=TRUE)
buildings <- gloBFPr::search_3dglobdf(bbox=c(-84.485519,45.636118,-84.462774,45.650639),
metadata=metadata)
Run the code above in your browser using DataLab