Geometric Features for Building Footprints in Sf Objects

Extracts reproducible geometric and urban-morphology descriptors from polygon and multipart polygon building footprints stored as sf objects. Methods include area, perimeter, compactness, shape, bounding-box, topology, convexity, and orientation measures, together with optional building-height, floor-count, gross-floor-area, floor-space-index, coverage, volume, and floor-height metrics derived from explicitly named attribute columns. The resulting sf objects preserve the source attributes and geometry for spatial analysis, visualization, and downstream statistical or machine-learning workflows, with optional future-based parallel processing for larger datasets.


geomorphR

A focused R package for extracting geometric and morphological features from polygon and multipolygon building footprints represented in sf objects.

Overview

The objective is to provide a clean, transparent, reproducible API to compute raw geometric and morphology descriptors that can feed further spatial or machine-learning workflows.

Installation

Install directly from GitHub with:

if (!requireNamespace("remotes", quietly = TRUE)) {
  install.packages("remotes")
}

remotes::install_github("YOUR_USERNAME/geomorphR")

Example

library(sf)
library(geomorphR)

geojson_path <- system.file("extdata", "central_gbg.geojson", package = "geomorphR")
buildings <- sf::st_read(geojson_path)
features <- extract_geometric_features(
  buildings,
  height_col = "height_m",
  floors_col = "floor_count",
  orientation_col = "orientation_degrees",
  gfa_col = "gfa_m2",
  plot_area_col = "plot_area_m2",
  verbose = FALSE,
  use_parallel = FALSE
)

Building morphology attributes

Attribute-based metrics are opt-in because datasets use different field names. Pass the source columns explicitly:

features <- extract_geometric_features(
  buildings,
  height_col = "height_m",
  floors_col = "floor_count",
  gfa_col = "gfa_m2",
  plot_area_col = "plot_area_m2",
  verbose = FALSE
)

The function adds building volume, floor height, GFA, FSI, coverage ratio, height-to-width ratio, and orientation in degrees. If no orientation column is supplied, orientation is estimated from the minimum rotated rectangle. Use validate_morphology_columns() to inspect whether source fields exist and are numeric before extraction.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("geomorphR")

0.1.0 by Jonathan Cohen, 12 hours ago


https://github.com/MakiJota/geomorphR


Report a bug at https://github.com/MakiJota/geomorphR/issues


Browse source code at https://github.com/cran/geomorphR


Authors: Jonathan Cohen [aut, cre]


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports sf, dplyr, future, future.apply, progressr

Suggests testthat


See at CRAN