Changes between Version 1 and Version 2 of GIS/OpenStreetMap


Ignore:
Timestamp:
12/06/12 12:33:30 (9 years ago)
Author:
Fran Boon
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GIS/OpenStreetMap

    v1 v2  
    8282ALTER TABLE ways OWNER TO osm;
    8383\q
     84exit
    8485
    85 cd planet
    86 wget http://download.geofabrik.de/openstreetmap/africa.osm.bz2
    87 bzcat /home/osm/planet/africa.osm.bz2 | /home/osm/osmosis/bin/osmosis --read-xml file=/dev/stdin --tf accept-nodes amenity=hospital,place_of_worship,school --tf accept-ways amenity=hospital,place_of_worship,school --write-pbf /home/osm/planet/eurosha.osm.pbf
     86cd /home/osm/planet
     87wget http://download.geofabrik.de/openstreetmap/africa.osm.pbf
     88/home/osm/osmosis/bin/osmosis --read-pbf /home/osm/planet/africa.osm.pbf --tf accept-nodes amenity=hospital,place_of_worship,school --tf accept-ways amenity=hospital,place_of_worship,school --write-pbf /home/osm/planet/eurosha.osm.pbf
    8889su postgres
    8990/home/osm/osmosis/bin/osmosis --read-pbf /home/osm/planet/eurosha.osm.pbf --write-pgsql database=osm user=osm password=planet
     
    9192cd /home/osm/planet/replication
    9293/home/osm/osmosis/bin/osmosis --rrii
     94sudo -H -u postgres psql -d osm -c "select max(tstamp) from nodes";
    9395http://toolserver.org/~mazder/replicate-sequences/
    94 ls -l /home/osm/planet/africa.osm.bz2
    95 vi state.txt
     96Put timestamp into site, select hourly
     97vim state.txt
     98# paste in contents from website
     99vim configuration.txt
     100baseUrl=http://planet.openstreetmap.org/replication/hour
    96101
    97102/home/osm/osmosis/bin/osmosis --rri workingDirectory=/home/osm/planet/replication/ --simc --read-pbf /home/osm/planet/eurosha.osm.pbf --ac --tf accept-nodes amenity=hospital,place_of_worship,school --tf accept-ways amenity=hospital,place_of_worship,school --tf reject-relations --write-pbf /home/osm/planet/eurosha-new.osm.pbf
     
    109114/home/osm/osmosis/bin/osmosis --rri workingDirectory=/home/osm/planet/replication/ --simc --read-pbf /home/osm/planet/eurosha.osm.pbf --ac --tf accept-nodes amenity=hospital,place_of_worship,school --tf accept-ways amenity=hospital,place_of_worship,school --tf reject-relations --write-pbf /home/osm/planet/eurosha-new.osm.pbf
    110115/home/osm/osmosis/bin/osmosis --read-pbf /home/osm/planet/eurosha-new.osm.pbf --read-pbf /home/osm/planet/eurosha.osm.pbf --dc --write-pgsql-change database=osm user=osm password=planet
     116mv /home/osm/planet/eurosha-new.osm.pbf /home/osm/planet/eurosha.osm.pbf
    111117fi
    112118
    113119chmod 0755 /home/osm/replicate.sh
    114120vim /etc/crontab
    115 1 3   * * * root    /home/osm/replicate.sh
     1211 *   * * * root    /home/osm/replicate.sh
    116122}}}
    117123
    118124Monitor:
    119125{{{
     126su postgres
    120127psql -d osm -c "select max(tstamp) from nodes";
    121128}}}