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

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.6.tar.gz (6.2 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.6-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: obe-0.0.6.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.11.11 Linux/6.8.0-1021-azure

File hashes

Hashes for obe-0.0.6.tar.gz
Algorithm Hash digest
SHA256 89877512ff0961d4384d12446344aa4371cf5d9e1e8ebd922391129d9ca1b6ed
MD5 59ab409053d48b0e15f9da5ebbef85e9
BLAKE2b-256 19310f54ee7daa5f9edcb985cbb49a0c31386807336d0d2a2100657c17cc103b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: obe-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 10.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.11.11 Linux/6.8.0-1021-azure

File hashes

Hashes for obe-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 b04edd53a2d098908a0894f607a797dd6ceaa1c01f2088d5b49dc9810ac97ee0
MD5 3c7a1a96fd59f73d9a07855c60bb710c
BLAKE2b-256 a77e920d88e3d9ceefd97b982b732f935108893ecca8d68db9007de590f8d40a

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