Skip to main content

Open Buildings Extractor

Project description

OBE (Open Buildings Extractor)

A Python package to extract building footprints from multiple open data sources including Google Open Buildings, Microsoft Building Footprints, OpenStreetMap, and Overture Maps.

Example

Run Example Notebook here:

Features

  • Extract building footprints from multiple sources:
    • Google Open Buildings
    • Microsoft Building Footprints
    • OpenStreetMap
    • Overture Maps
  • Support for multiple output formats:
    • GeoJSON
    • GeoPackage
    • Shapefile
    • GeoJSONSeq
    • GeoParquet
  • Command-line
  • Python API
  • Streamlit web interface

Installation

Using pip:

pip install obe

Using poetry

poetry add obe

Usage

Command line interface

obe --source <source> --input <input.geojson> --output <output.geojson>

Examples:

# Google Open Buildings
obe --source google --input area.geojson --output google_buildings.geojson

# Microsoft Building Footprints (requires location)
obe --source microsoft --input area.geojson --output ms_buildings.geojson --location Nepal

# OpenStreetMap
obe --source osm --input area.geojson --output osm_buildings.geojson

# Overture Maps
obe --source overture --input area.geojson --output overture_buildings.geojson

Python API

from obe.app import download_buildings

# Download buildings from any source
download_buildings(
    source="google",  # or "microsoft", "osm", "overture"
    input_path="area.geojson",
    output_path="buildings.geojson",
    format="geojson",  # or "geopackage", "shapefile", "geojsonseq", "geoparquet"
    location=None  # required for Microsoft ("Nepal", "India", etc.)
)

Example Input

{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "properties": {},
      "geometry": {
        "type": "Polygon",
        "coordinates": [
          [
            [83.96184435207743, 28.212767538129086],
            [83.96184435207743, 28.20236573207498],
            [83.97605449676462, 28.20236573207498],
            [83.97605449676462, 28.212767538129086],
            [83.96184435207743, 28.212767538129086]
          ]
        ]
      }
    }
  ]
}

Example Output

image

Authors

  • Initiated by @kshitijrajsharma

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

obe-0.0.8.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

obe-0.0.8-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

Details for the file obe-0.0.8.tar.gz.

File metadata

  • Download URL: obe-0.0.8.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.4 CPython/3.11.13 Linux/6.11.0-1018-azure

File hashes

Hashes for obe-0.0.8.tar.gz
Algorithm Hash digest
SHA256 cc5be4dae656f8706f864f76a3c7adf907570f841781bc343d3141ad1c6632dd
MD5 f7ec04b40dcb1616fd8262f67b2ad892
BLAKE2b-256 bbbb47ae299063d11f070fa0cc0b41d803255c2b105812e66c7772822e6269b4

See more details on using hashes here.

File details

Details for the file obe-0.0.8-py3-none-any.whl.

File metadata

  • Download URL: obe-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 10.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.4 CPython/3.11.13 Linux/6.11.0-1018-azure

File hashes

Hashes for obe-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 bf9a3bebed38b7c59e5a8f7939da373dbe65e56a8c901a699b2acd5175460e96
MD5 5608fc55ed5583ef0c988a61b96bf3ed
BLAKE2b-256 794578acc99232a3e5ed27ded710679c4eeee085cdaade9a0a0c7a054ae7e71a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page