Import/Catalogue/Address import for Torino
- 1 About
- 2 Import Plan Outline
- 3 Goals
- 4 Schedule
- 5 Import Data
- 6 Data Preparation
- 7 Data Merge Workflow
- 8 QA
This page talks about importing addresses using the data provided by the Municipality of Torino (Italy).
Import Plan Outline
This import goal is to use the high-quality dataset provided by the Municipality of Torino in order to steadily improve the addresses available in OSM. It will not be a blind import, data will be checked by a local mappers.
Address format in Torino
House numbering in Torino follows the European scheme.
An address in Torino is determined by its streetname and housenumber.
A housenumber is also unique per street.
Housenumbers can include a subordinate. These are noted with suffix letters (e.g. in "7a", "a" is the subordinate). Subordinates usually arise when a new house is build between existing houses with subsequent housenumbers. E.g. when a house is build between numbers 7 and 9, the new house will most likely get number 7a (since even numbers are reserved for the other side).
Data source site: http://aperto.comune.torino.it/?q=node/260
Data license: http://www.dati.gov.it/iodl/2.0/
Type of license: IODL v2.0
OSM attribution: http://wiki.openstreetmap.org/wiki/Contributors#Torino
ODbL Compliance verified: yes
From the IODL 2.0 license (in Italian): "indicare la fonte delle Informazioni e il nome del Licenziante, includendo, se possibile, una copia di questa licenza o un collegamento (link) ad essa."
Translation: "state the data source and the licensor name, including, if possible, a copy of this License or a connection (link) to it."
It should be enough to add the attribution in the Contributors page, like already done for Venice.
The dataset will be imported as a single changeset.
The dataset will be loaded in JOSM and it will be merge with existing OpenStreetMap data manually and prior to the upload.
The data is presented as a csv file. This csv file consists in a collection of punctual elements, one for each housenumber.
Each row has the keys:
- Sedime: highway type
- Denominazione: street name
- Denominazione_breve: short street name
- Denominazione_prima_parte: short street name
- Numero_Radice: housenumber
- Secondario: subordinate, if present
- Cap: zip code
- Cimitero: cemetery
- Cod_Sezione_Elettorale: electoral section code
- Parrocchia: parish
- latitudine: latitude
- longitudine: longitude
- circoscrizione: district
The csv file will be converted to OSM XML using csv2osm. The projection is EPSG:4326 (WGS84 latitude-longitude).
The tags that will be used in the final upload are addr:housenumber, addr:street, addr:postcode and addr:city.
The tags will be as follows:
- addr:housenumber will contain the housenumbe concatenating Numero_Radice and Secondario converted to lowercase.
- addr:street will contain the street name concatenating Sedime and space and Denominazione but normalized to follow Italian conventions.
- is_in:suburb will contain the borough.
- addr:postcode will contain Cap.
- addr:city will contain "Torino".
Dedicated upload account
The account Andrea Musuruane import will be used to upload the imported data.
csv2osm will be used to convert the csv file to OSM XML format using the above tagging plan. csv2osm can be found at: https://github.com/OsmQc/mtl2osm/blob/master/mtl2osm/csv2osm.py
It needs a patch to handle correctly Turin address data: https://github.com/OsmQc/mtl2osm/issues/18
Source scripts can be found at https://github.com/musuruan/osm_imports
Data Transformation Results
OSM XML with addresses already in OSM merged: TODO
Data Merge Workflow
Addresses already in OSM will be extracted using the following Overpass query:
<osm-script> <query into="comune" type="area"> <has-kv k="admin_level" v="8"/> <has-kv k="name" v="Torino"/> </query> <union> <query type="node"> <area-query from="comune"/> <has-kv k="addr:housenumber"/> </query> <query type="way"> <area-query from="comune" /> <has-kv k="addr:housenumber"/> </query> <item/> <recurse type="down"/> </union> <print mode="meta" /> </osm-script>
Since address data in the Municipaly of Torino data source are placed exclusively on nodes (a wise choice because a building can have different entrances and therefore different addresses) the addresses for buildings will be removed.
DISCUSS HOW TO MERGE CURRENT ADDRESSES
Import will be managed by Andrea Musuruane. Looking for mappers to check data on field.
Step by step instructions:
- Run csv2osm to export the data in OSM XML
- Open the OSM file in JOSM and remove the data not roughly inside the city boundaries (these addresses have wrong longitute and/or latitude)
- Run overpass query to export the existing addresses
- Make a changeset per borough
- Merge current addresses in JOSM
- Upload the changesets in OSM
Overpass query to extract Torino city boundaries:
It will be uploaded a changeset for each borough (there are 10 in total).
In case of import problem the changeset will be reverted using the JOSM Reverter Plugin
See #Data Merge Workflow.
After the import, addr:street names could be slightly different than street names.
These differences should be catched using OSM Inspector (map already centered on Torino).
The result can be used to locate areas where streets are missing.
Missing roads will be created in JOSM using PCN 2012 areal images.
The result can be used to derive street names for unnamed streets when all the nodes along the street has the same addr:street value.
Missing road names will be identified using the OpenStreetMap NoName Map Overlay:
OSM Inspector can also be used to find these streets.