search_3dglobdf {gloBFPr}R Documentation

search_3dglobdf

Description

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.

Usage

search_3dglobdf(
  bbox,
  metadata,
  crop = FALSE,
  out_type = "poly",
  mask = FALSE,
  cell_size = 1
)

Arguments

bbox

sf, sfc, or a numeric vector (xmin, ymin, xmax, ymax) defining the area of interest.

metadata

sf. Typically output from get_metadata(), containing tile extents and download URLs.

crop

logical. If TRUE, the resulting building footprint geometries will be cropped to the input bbox. Default is FALSE.

out_type

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.

mask

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".

cell_size

numeric (optional). Default is 1. Only used when out_type is "graduated_rast", "rast", or "all".

Value

Varies based on out_type:

Note

The downloading process may take some time, depending on the number and size of building footprint tiles.

This implementation relies on the current structure of the dataset as hosted on Figshare. It may break if the dataset owner changes the file organization or metadata format.

References

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

Examples

metadata <- gloBFPr::get_metadata(test=TRUE)
buildings <- gloBFPr::search_3dglobdf(bbox=c(-84.485519,45.636118,-84.462774,45.650639),
                     metadata=metadata)


[Package gloBFPr version 0.1.3 Index]