Import/Catalogue/Provincia di Biella/Addresses

From OpenStreetMap Wiki
Jump to: navigation, search

About

This page talks about importing address data provided by the Province of Biella (Italy).

Please refer to master page for details.

Import Data

Background

Address format

House numbering follows the European scheme.

An address 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).

The postal codes are missing in the source data. They may later be imported using other OdbL compatible sources. Postal code boundaries match municipal boundary in all the Province of Biella.

Legal

Please refer to master page for details.

Import Type

Please refer to master page for details.

Data Preparation

Tagging Plans

The data is presented as a shapefile.

The shapefile is shipped inside the zip file named "3027997Numeri_civici.zip" available at: http://cartografia.provincia.biella.it/on-line/Home/Repertorio/Consultazione/AT7Mobilitaetrasporti.html

This shapefile consists in a collection of punctual elements, one for each housenumber.

Each node has the keys:

  • NUMERO: housenumber with subordinate
  • Toponimo: street name
  • Nome_Comun: town name

The shapefile will be converted to OSM XML using ogr2osm. The projection must be specified as “EPSG:32632 (WGS 84 / UTM zone 32N)”.

This shapefile is periodically updated. This workflow has been validated with the version released on 23/01/2017 (Numeri_civici23012017.shp).

The tags that will be used in the final upload are addr:housenumber, addr:street, and addr:city.

The tags will be as follows:

  • addr:housenumber will contain the number in NUMERO converted to lowercase (for subordinates).
  • addr:street will contain the street name in Toponimo but normalized to follow Italian conventions.
  • addr:city will contain Nome_Comun.

Dedicated upload account

Please refer to master page for details.

Changeset Tags

Changeset will be tagged with:

  • source=Province of Biella Open Data
  • source:license=CC-BY
  • type=import
  • url=https://wiki.openstreetmap.org/wiki/Import/Catalogue/Provincia_di_Biella

Data Transformation

ogr2osm will be used to convert the shapefile to OSM XML format using the above tagging plan.

ogr2osm translation file can be found at https://github.com/musuruan/osm_imports/blob/master/prov_bi/numeri_civici.py

Data Transformation Results

OSM XML file: https://www.dropbox.com/s/6715gi34mirtklw/Numeri_civici23012017.osm?dl=0

Data Merge Workflow

Addresses already in OSM will be extracted using the following Overpass query (replace NOME_COMUNE with the actual town name):


<osm-script>
<query into="comune" type="area">
  <has-kv k="admin_level" v="8"/>
  <has-kv k="name" v="NOME_COMUNE"/>
</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>

There are just a few housenumbers (less than 500) in all the Province (with the exception of the City of Biella).

Address data in Italy must be placed exclusively on nodes because the housenumber identifies the external access that leads from the street to the housing units (houses, stores, offices, etc).

Therefore addresses placed on buildings will be removed.

Addresses already present will be merged manually since they are just a few. Generally, existing addresses will be kept because they are of better quality than the ones provided by the Province of Biella.

Team Approach

Please refer to master page for details.

Workflow

Step by step instructions:

  1. Run ogr2osm to export the data in OSM XML: ogr2osm.py -e 32632 -t numeri_civici.py -f Numeri_civici23012017.shp
  2. Run osmfilter to extract data for a specific town: osmfilter Numeri_civici23012017.osm --keep="addr:city=NOME_COMUNE" -o=Numeri_civici23012017-NOME_COMUNE.osm
  3. Open this file in JOSM
  4. Run above overpass query to export the existing addresses in another layer
  5. Merge these addresses, with the help of the JOSM Conflation Plugin
  6. Download OSM data for the same area
  7. Run JOSM validator and solve related issues
  8. Upload the changeset in OSM

The changeset will be small enough to be uploaded at once.

In case of import problem the changeset will be reverted using the JOSM Reverter Plugin

Conflation

See #Data Merge Workflow.

QA

Street names

After the import, addr:street names could be slightly different than current street names.

These differences should be caught using OSM Inspector (map already centered on the Province of Biella).

Unmarked streets

The result can be used to locate areas where streets are missing.

Missing roads will be created in JOSM using PCN 2012 areal images.

Unnamed streets

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:tms:http://tile3.poole.ch/noname/{zoom}/{x}/{y}.png

OSM Inspector can also be used to find these streets.