Import/Catalogue/Provincia di Biella/Toponyms

From OpenStreetMap Wiki
Jump to navigation Jump to search

About

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

Please refer to master page for details.

Import Data

Background

Most toponyms in the Province of Biella are already present. We will import only toponyms about farms, peaks, lakes, hamlets alpine huts and wilderness huts.

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 "3026619toponimi141117.zip" available at: http://cartografia.provincia.biella.it/on-line/Home/Repertorio/Consultazione/articolo3000189.html

This shapefile is periodically updated. This workflow has been validated with the version released on 14/11/2017 (toponimi141117.shp).

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

Please refer to the osg2osm translation file for further info about tagging.

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/toponimi.py

Data Transformation Results

OSM XML file: https://raw.githubusercontent.com/musuruan/osm_imports/master/prov_bi/Toponimi/toponimi141117.osm

Data Merge Workflow

Toponyms 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="way">
    <area-query from="comune"/>
    <has-kv k="natural" v="water"/>
  </query>
 <query type="node">
    <area-query from="comune"/>
    <has-kv k="place"/>
  </query>
  <query type="node">
    <area-query from="comune"/>
    <has-kv k="natural" v="peak"/>
  </query>
  <query type="node">
    <area-query from="comune"/>
    <has-kv k="tourism" v="alpine_hut"/>
  </query>
  <query type="node">
    <area-query from="comune"/>
    <has-kv k="tourism" v="wilderness_hut"/>
  </query>
  </union>
  <union>
    <item/>
    <recurse type="down"/>
  </union>
  <print mode="meta"/>
</osm-script>

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 toponimi.py -f toponimi141117.shp
  2. Run osmfilter to extract data for a specific town: osmfilter toponimi141117.osm --keep="is_in=NOME_COMUNE" --drop-tags="is_in" -o=toponimi141117-NOME_COMUNE.osm
  3. Open this file in JOSM
  4. Run above overpass query to export the existing topoymns in another layer
  5. Merge these toponyms, 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 #Workflow.

QA

Josm validator should catch most issues prior to uploading the data.