User:Simone

From OpenStreetMap

Jump to: navigation, search
Simone
Simone

Contents

About Me and GPS

My fascination for GPS technologies goes back to 1994 when I first heard about it, I was really amazed by the idea of a "beam" coming from outher space which would let you know your own position.

Then in 1998 I finally bought a Garmin e-map that I still own and use for wardriving.

What fascinate me is the ability to convert something real as my phisical presence in a given place, to a number pair representing that in the digital world.

About Me and OSM

I first heard about openstreetmap reading an NTK newsletter back in 2005. Contributed not that much to it, done some work on the comunity. I'm trying to map the area where I live: Pavia (north Italy).

This year I was one of the speakers at the annual State Of The Map conference, presenting the italian efforts in mapping our country. My slides are available on Slideshare

Risorse per i mappatori

comandi osmarender/osmosis

Di seguito i comandi per la mia macchina UBUNTU utili se si desidera estrarre una porzione di dati osm ad una qualunque data:

Prima si usa osmosis per estrarre dal file planet il poligono o il rettangolo richiesto:

rettangolo

bin/osmosis --read-xml file=planet.osm.bz2 --bounding-box top="45.2235" bottom="45.1472" left="9.1172" right="9.2628" --write-xml file=data.osm

poligono

bin/osmosis --read-xml file=planet-080130.osm.bz2 --bounding-polygon file=points-italy.txt --write-xml file=italy-20080130.osm

Scaricare qui il poligono corrispondente all'Italia.

per renderizzare una mappa a partire dal dato ricavato al punto precedente

xalan -in osm-map-features-z17.xml -out mappa.svg
(io uso xalan, ma xsltproc e xmlstarlet sono equivalenti)

Si converte poi in formato PNG usando inkscape

inkscape -D -e mappa.png mappa.svg

GIS

ogr2ogr -f "ESRI Shapefile" -s_srs "EPSG:3395" -t_srs "EPSG:4326" wgs84_shp com2001_s.shp

Opzione che ho provato ad usare per passare dai dati ISTAT a WGS84.

shp2text --gpx # # nome_file

genera GPX

modifiche globali al DB

bin/osmosis --rx italy.osm --tt  file="transform.xml" stats="statistiche.txt" --wx file="file-modificato.xml"
bin/osmosis --rx file-modificato.xml --rx italy.osm --derive-change --write-xml-change delta.xml

cat file.osm | grep '<tag k="name' | sort | uniq -c | sort -nr 

Esempio di file 'transform.xml'

<?xml version="1.0"?>
<translations>

 <translation>
   <name>Trasforma una via in Via</name>
   <description>Trasformazione per uniformare l'uso della maiuscola.</description>
   <match>
     <tag k="name" match_id="trovato" v="via(.*)"/>
   </match>
   <output>
     <copy-all/>
     <tag from_match="trovato" v="Via{1}"/>
   </output>
 </translation>

</translations>


elenco da trasformare

(aggiungete la vostra, asteriscati # sono quelli già implementati)

#VIA --> Via
#via --> Via
#piazza --> Piazza
#PIAZZA --> Piazza
#P.tta --> Piazzetta
#p.zza --> Piazza
c.so --> Corso
#C.so --> Corso
corso --> Corso
CORSO --> Corso
#V.le --> Viale
viale --> Viale
VIALE --> Viale
s.s. --> SS
s.p. --> SP
s.c. --> SC
S. S. --> SS
SS ** -->SS**
contrada --> Contrada
c.da -> Contrada
s.v. -> Strada Vicinale (oppure SV?)
strada --> Strada
lungomare --> Lungomare
vicolo --> Vicolo
traversa --> Traversa
P.za --> Piazza
p.za --> Piazza
vai --> Via
B.go --> Borgo
b.go --> Borgo
località --> Località
fattoria --> Fattoria
villa --> Villa
Personal tools
recent changes