Background
Downloaded Alberta OSM data from Geofabrik and have it running on a private Linux server using PostgreSQL 9.1, PostGIS 2.0, Mapnik 2.1.0, osm2pgsql, Apache 2, mod_tile, renderd, and OpenLayers:
The data was imported using osm2pgsql
as follows:
osm2pgsql -W -K -S /usr/local/share/osm2pgsql/default.style -d osm alberta.osm.bz2
Problem
The OSM data for Alberta is incomplete. I was given a set of shapefiles that improves upon the OSM data:
City.dbf, City.prj, City.sbn, City.sbx, City.shp, City.shp.xml, City.shx
Plus additional shapefiles for villages, urban areas, municipal district boundaries, and so forth. I have successfully imported the shapefiles into PostgreSQL using a pgAdmin plugin. The City.prj
file describes its projection as follows:
GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]
The shapefile data and OpenStreetMap (OSM) data each have their own database, but I believe I want to import the shapefile data into the OSM database. (This is a private server and a local copy of the OSM data; the shapefile data cannot legally be shared.)
Update #1
To be clear, the shapefiles do not contain roads: only municipality boundaries (that are definitely not part of the OSM data), cities (some of which are part of the OSM data), and city boundaries for larger cities (some of which might conflict with the OSM data).
Question
How do I merge the shapefile data with OSM data so that the new cities appear on the map?
Note: My main concern is resolving duplicate data (e.g., Edmonton is listed in both OSM and the procured shapefiles).
Related Links
- http://wiki.openstreetmap.org/wiki/Shapefiles
- http://wiki.openstreetmap.org/wiki/Import/Shapefile
- http://wiki.openstreetmap.org/wiki/Convert_shp_to_osm_using_grass_and_gpsbabel
- https://github.com/wavded/js-shapefile-to-geojson
- http://redmine.yellowbkpk.com/projects/list_files/geo
- http://www.gdal.org/ogr2ogr.html
- http://wiki.openstreetmap.org/wiki/Ogr2osm
- https://github.com/andrewguertin/ogr2osm
- http://svn.openstreetmap.org/applications/utils/import/shp2osm/
- http://crschmidt.net/blog/archives/354/polyshp2osm/
- http://www.mail-archive.com/talk@openstreetmap.org/msg12487.html
Thank you!