Skip to content

Instantly share code, notes, and snippets.

@upsilon
Created January 27, 2013 11:40
Show Gist options
  • Select an option

  • Save upsilon/4647977 to your computer and use it in GitHub Desktop.

Select an option

Save upsilon/4647977 to your computer and use it in GitHub Desktop.
PostGISとOsmosisセットアップめも
wget http://bretth.dev.openstreetmap.org/osmosis-build/osmosis-latest.zip
unzip osmosis-latest.zip
chmod +x osmosis-0.41/bin/osmosis
sudo -u postgres
createuser osm
createdb osm
psql -U osm -c 'CREATE EXTENSION hstore'
psql -U osm < /usr/share/postgresql/9.1/contrib/postgis-1.5/postgis.sql
psql -U osm < /usr/share/postgresql/9.1/contrib/postgis-1.5/spatial_ref_sys.sql
psql -U osm < ./osmosis-0.41/script/pgsnapshot_schema_0.6.sql
psql -U osm < ./osmosis-0.41/script/pgsnapshot_schema_0.6_action.sql
psql -U osm < ./osmosis-0.41/script/pgsnapshot_schema_0.6_bbox.sql
psql -U osm < ./osmosis-0.41/script/pgsnapshot_schema_0.6_linestring.sql
exit
wget http://planet.openstreetmap.org/pbf/planet-latest.osm.pbf
./osmosis-0.41/bin/osmosis -v --rbf file=planet-latest.osm.pbf workers=4 --bp file=382313.poly --wp password=***
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment