Skip to content

Instantly share code, notes, and snippets.

@danyim
Created February 7, 2018 19:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save danyim/f604a246ccc1f45bda0fb9ac8953dbca to your computer and use it in GitHub Desktop.
Save danyim/f604a246ccc1f45bda0fb9ac8953dbca to your computer and use it in GitHub Desktop.
osm2pgrouting for Ubuntu
# Use with the following AWS AMI:
# Ubuntu Server 16.04 LTS (HVM), SSD Volume Type - ami-79873901
# Install dependencies
sudo apt-get -y update
sudo apt-get -y install expat
sudo apt-get -y install libexpat1-dev
sudo apt-get -y install libboost-dev
sudo apt-get -y install libboost-program-options-dev
sudo apt-get -y install postgresql postgresql-contrib
sudo apt install libpqxx-dev
sudo apt install cmake
# Clone the repository
cd ~
git clone https://github.com/pgRouting/osm2pgrouting
cd osm2pgrouting
# Download and extract OSM map data
wget -O bayarea.osm.bz2 https://s3.amazonaws.com/metro-extracts.mapzen.com/san-francisco-bay_california.osm.bz2
bzip2 -dk bayarea.osm.bz2
# At this point, following the installation directions from https://github.com/pgRouting/osm2pgrouting
# Left here for completeness:
cmake -H. -Bbuild
cd build/
make
make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment