local Minutely Mapnik
this is modified for San Luis Obispo County for use with a California Planet extract (?not sure if right terminology?) from this original snippet from the OpenStreetMap Wiki and some help from Weait.com
bzcat Documents/california.osm.bz2 | osmosis --read-xml enableDateParsing=no file=- --bounding-box left=-121.348 right=-119.473 top=35.7952 bottom=34.8975 --write-xml file=Documents/slo.osm
extract bbox from california.osm.bz2 to .osm - the only thing it does different is kick out a .osm file instead of another .bz2 like in the wiki example.
You can also do this on a .pbf with osmconvert, I found the California Planet extract to be almost a month older on Cloudmade - compared to Geofabrik.
./osmconvert /mnt/osm_data/california.osm.pbf -b=-121.348,34.8975,-119.473,35.7952 >/mnt/osm_data/slo.pbf
then load into PostGIS with: osm2pgsql --bbox -121.348,34.8975,-119.473,35.7952 -m -d osm -H localhost --slim -S /usr/local/Cellar/osm2pgsql/HEAD/share/osm2pgsql/default.style Documents/california.osm.bz2
and follow the next steps of Minutely Mapnik
export $WORKDIR_OSM=~/.osmosis
osmosis --read-replication-interval-init workingDirectory=$WORKDIR_OSM
osmosis --read-replication-interval workingDirectory=$WORKDIR_OSM --simplify-change --write-xml-change changes.osc.gz
DON’T FORGET `—append`:
osm2pgsql --append --bbox -121.348,34.8975,-119.473,35.7952 -m -d osm -H localhost --slim -S /usr/local/Cellar/osm2pgsql/HEAD/share/osm2pgsql/default.style changes.osc.gz