Skip to content

ai4up/geo-matcher

Repository files navigation

Labeling Tool for Buildings and Places Matching

A web app for labeling matching building and place pairs from two datasets. Runs locally as a Flask app, displaying Folium-generated maps of potential matching pairs.

🔗 Live demo: matching-demo.eubucco.com

📍 Supported feature types: Buildings & Places (POIs)

Install

pip install git+https://github.com/ai4up/geo-matcher@main

Usage

Step 1: Create a dataset of potential matching pairs from two datasets:

gmatch create-labeling-dataset dataset1.parquet dataset2.parquet

Step 2: Start browser-based labeling of pairs:

gmatch label

Demo

Create a dataset of potential matches of government buildings and Microsoft buildings for a small region in France that require manual labeling using the demo data in the repository. Include only buildings which overlap slightly (0-10%).

gmatch create-labeling-dataset \
    --min-intersection=0.1 \ # Minimum relative overlap for new buildings to be included in labeling dataset [0,1)
    --max-intersection=0.2 \ # Maximum relative overlap for new buildings to be included in labeling dataset (0,1]
    data/demo-gov.parquet data/demo-microsoft.parquet

The resulting dataset is locally stored as candidate-pairs.zip. To initiate the browser-based labeling, run:

gmatch label

Example of Building Footprint Matching Tool

Dockerized approach

Prerequisites

  • Ensure a dataset of candidate pairs (candidate-pairs.zip) is present in the data directory.
  • For production deployment, set a Flask session SECRET_KEY environment variable.

Serve the dockerized Flask app with an Nginx proxy at http://localhost:80:

docker-compose up

Development

Install dev dependencies using poetry:

poetry install --only dev

Install git pre-commit hooks:

pre-commit install

Build from source:

poetry build
pip install dist/geo_matcher-*.whl

About

Labeling matching building and POI pairs from two datasets 🏠

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •