This project is a community-lead effort to import building data distributed by Oregon Metro into OpenStreetMap.
There are few ways to get involved:
- Help with the import process
- Update and improve documentation on the wiki
- Help write and maintain code required to generate data for the import process
See the OSM Wiki page for this project for other details.
If you're interested in contributing code you're in the right place. If you'd like to help import data into OSM, see the wiki guide.
- PostgreSQL (Postgres.app)
- Osmosis (brew)
- ruby, rake, bundler
Because of its size, this repo does not contain the actual data. Just the code to manipulate it.
Create a PostgreSQL database (e.g. pdx_bldgs). In your database, load extensions postgis and hstore.
create database pdx_bldgs;
\connect pdx_bldgs
create extension postgis;
create extension hstore;
\quit
Edit the Rakefile to include your database configuration:
ENV['PGUSER']='myname'
ENV['PGDATABASE']='pdx_bldgs'
ENV['PGHOST']='myhost'
Create the OSM schema for your db from the scripts in your Osmosis directory.
psql pdx_bldgs -f pgsnapshot_schema_0.6.sql
psql pdx_bldgs -f pgsnapshot_schema_0.6_linestring.sql
Setup your repo. I use:
bundle install --path=vendor --binstubs
There are a number of rake tasks that will build the datasets. You can see them with 'rake -T'
The tasks to download the data are not automatic, you will have to run them manually.
There are a number of intermediate tables that get built and modified. The tasks to build these are in the tasks/*.rake files.
bundle exec rake osm/bldgs.osm.bz2 pdx_bldg_download pdx_addr_download
cd osm && bunzip2 -k -d bldgs.osm.bz2
bundle exec rake gall_osm_files