User:Samwilson/Blog/Updating OSM with MRWA-514

The Main Roads Western Australia Road Network (MRWA-514) that (was previously) available under a CC-BY licence! This is good. Now I just need to figure out what bits of it are missing from OpenStreetMap and add them. Simple?

1. Download the shapefile from data.wa.gov.au RoadNetworkMRWA_514.zip (free login required) and unzip it.

2. Import it into postgres (install what is required, change the postgres password, and run the import with Qgis): sudo apt install postgresql qgis sudo -u postgres createdb mrwa sudo -u postgres ogr2ogr -f PostgreSQL PG:dbname=mrwa "RoadNetworkMRWA_514_1.shp"

3. Get the OSM data for Western Australia

Tried with the Overpass API “highway=* and highway!=footway and highway!=pedestrian and -highway!=path” and a bounding box of 111.8847656,-35.8178132,129.1992188,-11.4369552, but it's too big. So just get the whole country and go with that.

Oh, but it doesn't like to append to a database with existing data (osm2pgsql --append gives "Osm2pgsql failed due to ERROR: Problem reading geometry information for table planet_osm_point - does it exist?") so I'll just import it fresh, and then reimport the MRWA data.

apt install osm2pgsql sudo -u postgres psql -d mrwa -c 'CREATE EXTENSION postgis; CREATE EXTENSION hstore;' sudo -u postgres osm2pgsql --create --database mrwa australia-latest.osm.pbf

Give up. Turns out the easiest thing to do is to use Landgate's WMS service of the dataset, load it up in JOSM, and with the help of the nonames report at http://qa.poole.ch/ just pretty much manually go around fixing names and missing roads! Simple, and easy, and accurate. Perhaps a tiny bit slower, but not really.