User:Rgaudin

From OpenStreetMap Wiki
Jump to navigation Jump to search

Contributor from Bamako, Mali


MaliSchoolsImport

Goals

Add Schools of Mali with metadata.

  • 10,156 schools with GPS location.
  • Proper metadata (operator, type, academy, cap, latrines, nb of pupils, etc)
  • Data is relatively recent (2013)
  • Data is almost inexistent in OSM
  • We have a group of people ready to enhance it directly in OSM for Bamako area.
  • We have a couple NGOs in need for this and willing to contribute to.
  • There's apparently no Mali community besides HOT but it's not related to HOT.

Schedule

  • Data is very simple: only GPS coordinates with metadata.
  • No shapes, no relations, only points.
  • Data is ready.
  • Need to validate some of the data with author.
  • Tested successfuly on Dev Server.

Import Data

Background

Data source site: https://github.com/jokkolabs/mali_schools/raw/master/MLI_schools.csv
Data license: https://raw.githubusercontent.com/jokkolabs/mali_schools/master/LICENSE
Type of license: Public Domain (CC0)
ODbL Compliance verified: yes

OSM Data Files

https://github.com/jokkolabs/mali_schools/tree/master/changesets

Import Type

  • one-time import
  • using ./upload-python2.py (tested on master.apis.dev successfuly)
  • using dedicated account "opendatamali"

Data Preparation

Data Reduction & Simplification

  • OSM XML files only contains nodes and selected metadata.
  • All files represent ~ 10K nodes for about 10M.
  • Data looks OK in jOSM

Tagging Plans

  • Carefully searched for similar tags in taginfo.
  • Reusing the following tags/values:
    • amenity=school
    • operator_type=community|private_religious|private_laic|public
    • school:first_cycle=yes|no
    • school:second_cycle=yes|no
    • is_in:country=Mali
    • is_in:region=*
    • is_in:cercle=*
    • is_in:commune=*
    • is_in:village=*
    • school:ML:academie=*
    • school:ML:cap=*
    • restaurant=yes|no
    • toilets=yes|no
    • toilets:number=*
    • drinking_water=yes|no
    • drinking_water:type=tap|working_drilling|inexhaustible_well|exhaustible_well (new values!)

Changeset Tags

  • One changeset file per academy (17)
  • Largest file is 1.2M, 1214 nodes.

Data Transformation

Transformation of CSV data to OSM XML is done through a very simple Python script https://github.com/jokkolabs/mali_schools/blob/master/csv2osm.py

Team Approach

Solo effort.

Workflow

  • Generate changeset files (OSM XML) : 17
  • Loop through changeset files
    • upload using bulk_upload.py
    • check for failed uploads
    • manualy delete/retry erroneous changesets