Import/Catalogue/Provincia di Biella/Roads

From OpenStreetMap Wiki
Jump to navigation Jump to search

About

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

Please refer to master page for details.

Import Data

Background

Roads in most of the towns in the Province of Biella are already mapped quite well. Anyway there are some towns that are poorly mapped, especially in the mountain, such as Mezzana Mortigliengo.

Using Cygnus it is possible to conflate source data with OSM road data quite easily: http://www.openstreetmap.org/user/mvexel/diary/36746

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

This shapefile is periodically updated. This workflow has been validated with the version released on 22/02/2019 (stradario22022019.shp).

The keys and the corresponding values are described in this document provided by the Province of Biella.

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

Data Transformation Results

OSM XML file: https://raw.githubusercontent.com/musuruan/osm_imports/master/prov_bi/Stradario/stradario22022019.osm

OSM XML file (nocygnus): https://raw.githubusercontent.com/musuruan/osm_imports/master/prov_bi/Stradario/stradario22022019-nocygnus.osm

Data Merge Workflow

See #Workflow.

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 --add-timestamp --add-version --positive-id -e 32632 -t stradario.py -f stradario22022019.shp
  2. Run osmfilter to extract data for a specific town: osmfilter stradario22022019.osm --keep="is_in=NOME_COMUNE" --drop-tags="is_in" -o=stradario22022019-NOME_COMUNE.osm. NB: each space character within a value must be preceded by a backslash.
  3. Run osmconvert to convert the data to pbf (NB: the extension MUST be .osm.pbf): osmconvert stradario22022019-NOME_COMUNE.osm --out-pbf > stradario22022019-NOME_COMUNE.osm.pbf
  4. Upload NOME_COMUNE.osm.pbf to http://cygnus.improve-osm.org/
  5. Download the conflated OSM file
  6. Open the conflated OSM file in JOSM
  7. Download OSM data for the same area in the same layer
  8. Use JOSM Validator to fix minor issues
  9. Remove the telenav:graph-enhancer tags
  10. 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

Alternative Workflow

In this case, we won't use Cygnus for road conflation. It can be useful if Cygnus is down or if you just want to import very few roads.

Step by step instructions:

  1. Run ogr2osm to export the data in OSM XML: ogr2osm.py -e 32632 -t stradario.py -f stradario22022019.shp -o stradario22022019-nocygnus.osm
  2. Run osmfilter to extract data for a specific town: osmfilter stradario22022019-nocygnus.osm --keep="is_in=NOME_COMUNE" --drop-tags="is_in" -o=stradario22022019-nocygnus-NOME_COMUNE.osm. NB: each space character within a value must be preceded by a backslash.
  3. Open this file in JOSM
  4. Download OSM data for the same area in another layer
  5. Manually select roads you want to import
  6. Use "Merge selection" to copy these roads into the OSM data layer
  7. Manually join imported roads and existing OSM roads
  8. Use JOSM Validator to fix minor 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.

Missing road names will be added after importing address data.