Import-for-Taiwan-Shelters

From OpenStreetMap Wiki
Jump to navigation Jump to search

Import for Taiwan Shelters

"Import for Taiwan Shelters" is an import of "避難收容處所開設情形" (http://portal.emic.gov.tw/pub/DSP/OpenData/EEA/Shelter.xml) dataset on Open Data Platform (http://data.gov.tw/node/12849) from National Fire Agency. This dataset has all the shelters location and information in Taiwan. The importation has done and cleaned up on 9th June, 2017.

Goals

To tag more than 6800 shelters in Taiwan is a huge effort. The shelter information includes the name of shelter, address, the number of people of the shelter can accommodate, and so on. It allows either the citizens or the visitors in Taiwan know better about the shelter, in case of the disaster strikes.

Schedule

Start Importation: 2nd June, 2017 Cleaned up: 9th June, 2017

Import Data

Background

The raw data is from National Fire Agency, Ministry of Interior of Taiwan government. ‘’’Data source site:’’’ DATA.GOV.TW ‘’’Data license:’’’ Open Government Data License, version 1.0 ODbL Compliance verified: yes/no

OSM Data Files

Shelters in Taiwan

Import Type

This is a one-time import and it is doing with automated scripts.

Data Preparation

Data Reduction & Simplification

The following is one of the shelter information in raw data.

<shelterInfo adaptForWeaker=“是”

address=“彰化縣北斗鎮新政里文苑路一段32號”

county=“彰化縣”

defaultville=“居仁里、五權里”

disastertype=“水災,震災,土石流,海嘯”

isIndoor=“是”

isOutdoor=“否”

lat=“23.875762"

lon=“120.523284”

name=“北斗國小”

openstatus=“撤除”

peopleno=“230"

refugedno=“”

shelterCode=“SN521-0008"

shelterId=“2”

town=“北斗鎮”

twd97x=“201451.32”

twd97y=“2641344.11155"

village=“新政里“/>

The field is described as below.

adaptForWeaker
Is the shelter is suitable for the weak
contain: 是/否 (yes/no)
address
The shelter address
county
The county where the shelter is located
defaultville
Estimated village of the shelter to accommodate
disastertype
The type of disaster that the shelter can
contain: 水災/震災/土石流/海嘯 (floods/earthquake/mudslide/tsunami)
isIndoor
Is the shelter indoor
contain: 是/否 (means yes/no)
isOutdoor
Is shelter outdoor
contain: 是/否 (means yes/no)
lat
The shelter latitude
lon
The shelter longitude
name
The shelter name
openstatus
The status of the shelter
contain: 開設/已滿/撤除 (means open/full/closed)
peopleno
Estimated number of people of the shelter can accommodate
shelterCode
The numbering of the shelter
It is a temporary shelter if the first 2 letters is TW
shelterId
The shelter id
town
The town where the shelter is located
twd97x
The coordinate of TWD97 x-axis
twd97y
The coordinate of TWD97 y-axis
village
The village where the shelter is located

Tagging Plans

Case 1:Usually, school or public building will be leveraged as shelter during a disaster. If OSM building exists for the given coordinates of shelter location from dataset, update the tags of that building with an emergency prefix.

evacuation_center=yes

emergency=assembly_point

emergency:amenity=social_facility

emergency:social_facility=shelter

emergency:social_facility:id={3162}

emergency:social_facility:for=displaced_people

emergency:social_facility:source=內政部消防署

emergency:shelter_type={水災,震災,土石流,海嘯}

emergency:social_facility:association_villages={東門里}

Case 2
If there is no OSM building, add POI with the following tags.

amenity=social_facility

social_facility=shelter

evacuation_center=yes

name={北斗國小}

addr:full={彰化縣北斗鎮新政里文苑路一段32號}

addr:country=TW

emergency=assembly_point

emergency:amenity=social_facility

emergency:social_facility=shelter

emergency:social_facility:id={2}

emergency:social_facility:for=displaced_people

emergency:social_facility:source=內政部消防署

emergency:shelter_type={水災,震災,土石流,海嘯}

emergency:social_facility:association_villages={東門里}.

Changeset Tags

The changeset tags are proposed according to the discussion in mapping events and the Facebook interactions of OpenStreetMap Taiwan.

addr:country TW

addr:full county, town, village, address

emergency assembly_point

emergency:amenity social_facility

emergency:shelter_type disastertype

emergency:social_facility shelter

emergency:social_facility:association_villages defaultville

emergency:social_facility:for displaced_people

emergency:social_facility:idshelter Id

emergency:social_facility:source 內政部消防署

evacuation_centeryes

name name

Data Transformation

We developed the Python code as a script and run that from the Virtual Machine hosted on Microsoft Azure.

Data Transformation Results

As a result, we transformed 6359 shelter objects into OSM.

OSM changeset
OSM changeset
OSM changeset
OSM changeset
OSM changeset
OSM changeset
OSM changeset

Data Merge Workflow

Workflow

  1. Download the XML data with shelter information from National Fire Agency in Taiwan.
  2. Parse the XML data to shelter objects in Python.
  3. For each shelter object, get the bounding box of this shelter with 3 km distance.
  4. Use Overpass Query API to get all polygon objects with building tag inside the bounding box.
  5. For each polygon object, check if the shelter is inside this polygon, if yes, update the tags of the polygon object, else, create a POI object with tags.

Conflation

If there is an existing object on shelter coordinate, we keep the existing data(including nodes, tags, and relations) and just add additional tags to it.

QA

There are some incorrect data in the raw data. We will clean them up by the following steps.

  1. Remove the shelter which location is out of Taiwan boundary.
  2. Use GeoCoding API of Google Maps to converting addresses into geographic coordinates. Compare the longitude and latitude of results with the raw data, and remove the shelters which the gap is more than 3 km.
  3. Manually double check every shelter which the gap is more than 3 km to verify if it is incorrect.
  4. Request assistance of the local community to assist correcting the shelter information.

Team Approach

This changeset was created by GeoThings Inc.

Discussion with Community

The Discussion with OSM TW Community on OSM TW Hackpad The Discussion with OSM TW Community in Facebook Group The Discussion with OSM TW Community in Facebook Group

References