Scriptscaricoosm
#!/bin/bash
#
# Copyright 2009 Luca Delucchi
# lucadeluge@gmail.com
# version 1.0
#
#
# This program is free software; you can redistribute it and/or odify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#Scarica i dati italiani di OpenStreetMap, li estrae dall'archivio, li carica sul vostro database Postgresql/Postgis e infine crea il file .img da caricare sui garmin cartografici
# PREREQUISITI
# Bisogna avere un database Postgresql/Postgis e osm2pgsql installato
# Ricordarsi di modificare con i proprio parametri
db=nome_database
table=nome_prefisso_tabelle_osm
user=nome_utente_postgresql
pass=password_utente_postgresql
#Scarica i dati dell'italia
wget http://download.geofabrik.de/osm/europe/italy.osm.bz2
#Estrae i dati
bzip2 -f -d italy.osm.bz2
#Setta la password di postgresql in modo tale da non doverla impostare a mano
export PGPASSWORD="$pass"
#carica i dati sul database
osm2pgsql -l -U $user -d $db -p $table italy.osm

News from www.lucadelu.org
