
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
A Python library for regularizing building footprints in geospatial data. This library helps clean up and standardize building polygon geometries by aligning edges to principal directions.
A Python library for regularizing building footprints in geospatial data. This library helps clean up and standardize building polygon geometries by aligning edges to principal directions. Built as an open source alternative to the ArcGIS Regularize Building Footprint (3D Analyst) tool.
Before and after regularization:
Building footprints extracted from remote sensing imagery often contain noise, irregular edges, and geometric inconsistencies. This library provides tools to regularize these footprints by:
Inspired by RS-building-regularization, this library takes a geometric approach to building regularization with improvements for usability and integration with the GeoPandas ecosystem.
pip install buildingregulariser
or
conda install conda-forge::buildingregulariser
or
uv add buildingregulariser
import geopandas as gpd
from buildingregulariser import regularize_geodataframe
# Load your building footprints
buildings = gpd.read_file("buildings.gpkg")
# Regularize the building footprints
regularized_buildings = regularize_geodataframe(
buildings,
)
# Save the results
regularized_buildings.to_file("regularized_buildings.gpkg")
from buildingregulariser import regularize_geodataframe
import geopandas as gpd
buildings = gpd.read_file("buildings.gpkg")
regularized = regularize_geodataframe(buildings)
regularized = regularize_geodataframe(
buildings,
parallel_threshold=2.0, # Higher values allow less edge alignment
simplify_tolerance=0.5, # Controls simplification level, should be 2-3 x the raster pixel size
allow_45_degree=True, # Enable 45-degree angles
allow_circles=True, # Enable circle detection
circle_threshold=0.9 # IOU threshold for circle detection
neighbor_alignment=True, # After regularization try to align each building with neighboring buildings
neighbor_search_distance: float = 100.0, # The search distance around each building to find neighbors
neighbor_max_rotation: float = 10, # The maximum rotation allowed to align with neighbors
)
This project is licensed under the MIT License
This library was inspired by the RS-building-regularization project, with improvements for integration with the GeoPandas ecosystem and enhanced regularization algorithms.
FAQs
A Python library for regularizing building footprints in geospatial data. This library helps clean up and standardize building polygon geometries by aligning edges to principal directions.
We found that buildingregulariser demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.