/osm-addresser

Easily upload building addresses to OSM from public dataset

Primary LanguagePython

OSM Addresser

This tool assists with batch uploading address data to OpenStreetMap. Currently only designed to work with Charlotte Mecklenburg county's Open Mapping master address dataset, although I intend to implement a general solution if this project finds success.

Todo

  • Support for multifamily units
  • Reconcile addresses that already exist in OSM
  • Manual user review for non-confident matches
  • Match street names to physically nearest name match
  • Generalize for other datasets and address formats
  • Support for multiple cities, states, and countries
  • OSM account Oauth support
  • Automatically generate and upload OSM changeset
  • GUI?

Installation

Requirements

  • Python 3

Instructions

  1. Clone the repository
git clone https://github.com/alexwohlbruck/osm-addresser.git
cd osm-addresser
  1. Create a virtual environment
python3 -m venv venv
source venv/bin/activate
  1. Install the required packages
pip3 install -r requirements.txt

Usage

  1. Download your address dataset. As of now, this must be a shapefile with a format that matches the Mecklenburg County GIS Master Address Table. In the stage directory I have included a sample dataset with a only few dozen addresses. You can download a full copy here.
  2. Unzip the downloaded file and place all unzipped files in the stage directory. Replace existing files if necessary.
  3. Activate the virtual environment
source venv/bin/activate
  1. Run the script
python3 addresser.py ./stage/{shapefile name}.shp {city name} {state abbreviation}

Example for the Mecklenburg County dataset:

python3 addresser.py ./stage/MAT-filtered.shp Charlotte NC