Allegheny County Building Import

From OpenStreetMap Wiki
Jump to: navigation, search

This import is an import of Allegheny County building footprints available from the county's GIS webpage. The data covers all of Allegheny County (The county that contains Pittsburgh, Pennsylvania) and very small areas just outside the county.

My plans are still a work in progress. Feedback and advice would be greatly appreciated.

Just for context, I am member of the community affected by this import. I map and live in the area covered by this import and I have been mapping it for over 2 years. I have recently contributed to a couple building imports but this is the first import I've tried to organize.


Add all the buildings from this dataset to OSM, except where someone already traced the buildings or the data is outdated (buildings have been demolished, etc.)


I hope to start the import before the end of 2017 but I don't any hard deadlines.

Import Data

Data Source:

Data License

I emailed the county about this data and they said, "Allegheny County GIS has no objections to geodata derived in part from Allegheny County Building Footprint Locations being incorporated into the OpenStreetMap project geodata database and released under a free and open license." They also expressed support for our efforts, so it looks like we have permission.

The license on the Web page doesn't mention anything about copying, just that the data is provided without any guarantees:

"Use Constraints: All parties acknowledge that the data is for informational purposes only, there is no guarantee as to its completeness or accuracy. Allegheny County Division of Computer Services Geographic Information Systems Group is not responsible for any reliance upon said data. Distribution Liability: The USER shall indemnify, save harmless, and, if requested, defend those parties involved with the development and distribution of this data, their officers, agents, and employees from and against any suits, claims, or actions for injury, death, or property damage arising out of the use of or any defect in the FILES or any accompanying documentation. Those parties involved with the development and distribution excluded any and all implied warranties, including warranties or merchantability and fitness for a particular purpose and makes no warranty or representation, either express or implied, with respect to the FILES or accompanying documentation, including its quality, performance, merchantability, or fitness for a particular purpose. The FILES and documentation are provided "as is" and the USER assumes the entire risk as to its quality and performance. Those parties involved with the development and distribution of this data will not be liable for any direct, indirect, special, incidental, or consequential damages arising out of the use or inability to use the FILES or any accompanying documentation."

Type of License (if applicable): Public domain? Either way we have permission.

ODbL Compliance Verified:

OSM Data Files Has the .osm file for the whole dataset and a few samples.

Import Type

A one-time import. We will convert and divide up the import data set automatically, but conflating the data will be done in JOSM through the OSM-US tasking manager.

Data Preparation

I will use ogr2osm to convert the shapefile into an OSM file. Then I plan on dividing the data into small chunks of about 200 buildings each, which I judge to be a good balance between not cutting the work into tiny pieces and avoiding huge changesets. I plan on dividing the data with osmconvert but I haven't decided how I will choose the boundaries.

Tagging Plans

The data only contains two useful attributes: The shape of the buildings and the building type: residential, unknown, outbuilding, industrial/commerical, or public building. Residential and industrial commercial are mostly compatible with our definition of these terms, but I don't think outbuilding or public building fit into our tagging scheme. Thus, I will leave those as building=yes just like unknown buildings. This is my own assessment of how tagging should be done but I'm open to suggestions.

FEATURECOD Government Tag OSM Tag
210 Residential building=residential
NULL, 200, 250 or 295 Unknown building=yes
240 Outbuilding building=yes
220 Industrial/Commercial building=commercial
230 Public building=yes

This is the translation file for ogr2osm that I used for the conversion:

Changeset Tags

Add source=Allegheny County GIS, as well as a hashtag in changeset comments.

Data Transformation

Use ogr2osm to convert the data to an OSM file. Then we'll have to divide it into manageable pieces of perhaps a few hundred buildings each: how to do this?

This is the script I'm using for the data conversion:

A translation function for Allegheny County GIS data.


def filterTags(attrs):
    if not attrs:

    tags = {}
    if attrs['FEATURECOD'] == '210':
        tags['building'] = 'residential'
    elif attrs['FEATURECOD'] == '220':
        tags['building'] = 'commercial'
        tags['building'] = 'yes'
    return tags 

Data Transformation Results


Data Merge Workflow

Team Approach

I would like to get this posted on the OSM-US tasking manager so people can work on it chunks but not sure how to do this, or whom to contact. More research required.



  • Select a tile from the task manager.
  • Open the OSM data in JOSM and an OSM file of the building outlines for that area.
  • Run validation on the buildings about to be imported and fix all problems.
  • Copy and paste the data from the county data layer to the OSM layer.
  • Then fix any issues associated with conflating the data:
    • Run validator and fix all warnings
    • If the new buildings overlap with existing buildings, conflate manually: If the imported version is better, use replace geometry to replace the OSM way with it. If the OSM version is better, delete the import version. Make sure to preserve tags and err towards not harming existing data.
    • Spot check the data for sanity.
    • Run validator and fix any issues you might find.
  • Upload to OSM and on to the next task.


If the building already exists in OSM and the shape is of comparable quality, don't change it. If there is already a building node there, use replace geometry in JOSM. In general we want to respect what other people (like me) have already mapped by hand.