Skip to content

Provides tools to access, search, and download global 3D building footprint datasets (3D-GloBFP). The package includes functions to retrieve metadata, filter by bounding box, and download building height tiles.

License

Notifications You must be signed in to change notification settings

billbillbilly/gloBFPr

Repository files navigation

gloBFPr forestdata website

Lifecycle: experimental R-CMD-check

Access and analyze the Building Footprint Datasets.

Overview

The gloBFPr package allows R users to search, download, and process global building footprint tiles with associated height information, derived from the 3D-GloBFP dataset published by Che et al. (2024, 2025). The data is hosted on Zenodo and covers global urban areas in shapefile format. The package will look to include more global Building Dataset in the future.

Features

📦 Access tiled metadata of 3D-GloBFP dataset

🔍 Search tiles by bounding box (BBOX) or area of interest

⬇️ Download only the necessary files

🏗️ Retrieve building polygons and height attributes

🌍 Generate rasters of binary presence or graduated height

🗺️ Output spatial data in sf or terra raster format

Installation

Install the development version:

# Install devtools if needed
install.packages("devtools")

# Install from GitHub
devtools::install_github("billbillbilly/gloBFPr")

The package will be on CRAN soon.

Usage

  1. Load metadata
library(gloBFPr)
metadata <- get_metadata()
  1. Search and download data by bounding box
bbox <- c(-83.065644,42.333792,-83.045217,42.346988)
buildings_list <- search_3dglobdf(bbox = bbox,
                                  metadata = metadata, 
                                  out_type = "all", 
                                  # mask = TRUE,
                                  cell_size = 1)

This will return a list containing:

  • poly: an sf object of 3D building footprints
  • binary: a binary raster of building presence
  • graduated: a raster representing building height in meters

Specify cell_size = 1 to generate raster layers with 1-meter resolution, ensuring detailed spatial representation of building geometries within the defined area of interest.

Setting mask = TRUE ensures the height raster is masked by the building footprints.

Output examples:

       

               

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.

Please read the function documentation carefully. The dataset may require proper citation when used.

Issues and bugs

If you discover a bug not associated with connection to the API that is not already a reported issue, please open a new issue providing a reproducible example.

About

Provides tools to access, search, and download global 3D building footprint datasets (3D-GloBFP). The package includes functions to retrieve metadata, filter by bounding box, and download building height tiles.

Topics

Resources

License

Stars

Watchers

Forks

Languages