Skip to content

Instantly share code, notes, and snippets.

@JamesChevalier
Created February 8, 2014 00:13
Show Gist options
  • Save JamesChevalier/8874568 to your computer and use it in GitHub Desktop.
Save JamesChevalier/8874568 to your computer and use it in GitHub Desktop.
My complete process of generating OSMs from POLYs on DigitalOcean servers
# Server
apt-get update
apt-get install -y python-software-properties
add-apt-repository -y ppa:webupd8team/java
apt-get update
apt-get install -y oracle-java7-installer sysstat convmv ruby1.9.3
wget http://bretth.dev.openstreetmap.org/osmosis-build/osmosis-latest.tgz
mkdir osmosis
tar -xvzf osmosis-latest.tgz -C osmosis
chmod a+x osmosis/bin/osmosis
rm osmosis-latest.tgz
mkdir poly source done
cd source
wget http://download.geofabrik.de/SUBREGION/COUNTRY-latest.osm.pbf
cd ~/poly
# Locally
scp -C ~/PATHTO/REGION.zip root@IP:/root/poly
# Server
unzip REGION.zip
rm REGION.zip
mv REGION/* .
rmdir REGION
convmv -r -f utf8 -t utf8 --nfc --notest .
cd
ruby run.rb
tar -czf done.tar.gz done/
# Locally
scp -C root@IP:/root/done.tar.gz .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment