Created
November 1, 2010 07:23
-
-
Save springmeyer/657772 to your computer and use it in GitHub Desktop.
Revisions
-
springmeyer created this gist
Nov 1, 2010 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ # note: there is work afoot to load pbf directly with osm2pgsql # http://lists.openstreetmap.org/pipermail/dev/2010-October/020953.html # but for now osmosis >= 0.37 works best # install java/osmosis if you don't already have it sudo apt-get install sun-java6-jre wget http://bretth.dev.openstreetmap.org/osmosis-build/osmosis-0.37.zip unzip osmosis-0.37.zip cd osmosis-0.37 chmod +x bin/osmosis cd bin export PATH=`pwd`:$PATH # grab a pbf # region graphic: http://en.wikipedia.org/wiki/File:Census_Regions_and_Divisions.PNG wget wget http://download.geofabrik.de/osm/north-america/us-south.osm.pbf # read with osmosis and stream into osm2pgsql, note '-' arg to both osmosis --read-bin us-south.osm.pbf --write-xml - | osm2pgsql --slim -d <dbname> -