Import/Catalogue/Provincia di Biella/Toponyms

From OpenStreetMap Wiki
Jump to: navigation, 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 "3026619toponimi150714.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 15/07/2014 (toponimi150714.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://www.dropbox.com/s/qqgj5qpfr5yrcbj/toponimi150714.osm?dl=0

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="node">
    <area-query from="comune"/>
    <has-kv k="place" v="farm"/>
  </query>
  <query type="node">
    <area-query from="comune"/>
    <has-kv k="place" v="isolated_dwelling"/>
  </query>
  <query type="node">
    <area-query from="comune"/>
    <has-kv k="place" v="hamlet"/>
  </query>
  <query type="node">
    <area-query from="comune"/>
    <has-kv k="place" v="village"/>
  </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="natural" v="water"/>
  </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>
  <item/>
</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 toponimi150714.shp
  2. Run osmfilter to extract data for a specific town: osmfilter toponimi150714.osm --keep="is_in=NOME_COMUNE" -o=toponimi150714-NOME_COMUNE.osm
  3. Remove the is_in tag from the dataset: osmfilter toponimi150714-NOME_COMUNE.osm --drop-tags="is_in" -o=toponimi150714-NOME_COMUNE-def.osm
  4. Open this file in JOSM
  5. Run above overpass query to export the existing topoymns in another layer
  6. Merge these toponyms, with the help of the JOSM Conflation Plugin
  7. Download OSM data for the same area
  8. Run JOSM validator and solve related issues
  9. 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.