ML project: Real Time Map Matching with HMMs
- Download California .pbf file from http://download.geofabrik.de/north-america/us/california.html
- Download and install osmconvert: http://wiki.openstreetmap.org/wiki/Osmconvert
- Run
osmconvert ./california-latest.osm.pbf >california.osm
- Download and install osmfilter: http://wiki.openstreetmap.org/wiki/Osmfilter
- Run
osmfilter ./california.osm --keep="highway=" -o=california_roads.osm
- Install Postgres and get PostGIS (Google instructions)
- Install osm2pgsql (on mac with homebrew: brew install osm2pgsql)
- Create a Postgres database
- Enable PostGIS on the db:
- Connect to db:
psql databasename
- In the db prompt:
CREATE EXTENSION postgis;
- Connect to db:
- Run
osm2pgsql -s -U username -d databasename /path/to/file.osm