Skip to content
Tools for working with Microsoft ODBL buildings
Python R
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Tools for conflating and importing the Microsoft building data available at .

Requires Python 3 and python-gdal with GEOS support. The R script requires R!

Retrieves current OpenStreetMap buildings from Overpass API. Takes an
Overpass QL style bounding box and output file name as input:

    python 42.312,-83.096,42.386,-83.007 detroit_buildings.osm

Calculates overlap between existing OSM buildings and Bing buildings. Input, in 
order, the osm building file, the bing shapefile and the filename to store the output in

    python osmxml MSBuildingshp outfile


Calculate a simple histogram from overlaps.txt
Finds OSM buildings with a large overlap with a Microsoft building and appends a 
height tag to those buildings. 

    python osmxml MSBuildingshp outfile

Finds buildings in a Microsoft shapefile that do not overlap with existing OSM buildings
and outputs a shapefile with simplified building geometries and suitable OSM tags.

    python detroit_buildings.osm /MS_buildings_michigan/ newbuildings

Example Session

Starting with the Microsoft data for Michigan stored in `/share/gis/MS_buildings_michigan/`.

    python 42.312,-83.096,42.386,-83.007 detroit_buildings.osm
    python detroit_buildings.osm /share/gis/MS_buildings_michigan/ overlaps.txt
    Rscript histo.R
    python detroit_buildings.osm /share/gis/MS_buildings_michigan/ detroit_heights.osm
    python detroit_buildings.osm /share/gis/MS_buildings_michigan/ newbuildings
You can’t perform that action at this time.