1 of 21

Data Models and Tagging

1

1

2 of 21

What is a tag?

2

“a label attached to something for the purpose of identification, or to give other information.”

Used in OSM to categorize features, and to add information that is useful for:

> Understanding of the map

> Planning

> Routing

> Querying

Humanitarian OpenStreetmap Team

3 of 21

OSM Tagging

3

OSM doesn’t work with layers or attribute tables, but tags.

Each tag consists of a key, and a value.

Each map feature should have 1 or more tags

Such as:

> building=residential

> highway=primary

> amenity=school

highway=residential

name=Broad Street

amenity=fuel

name=Total

Humanitarian OpenStreetmap Team

4 of 21

Why is tagging important?

4

Data without information (tags) creates a blank map

Humanitarian OpenStreetmap Team

5 of 21

Why is tagging important?

5

Does this line represent… a road? A river? A railroad? A boundary?

Tagging is required to convey useful information

> to viewers

> to other mappers

> to other computers/APIs

> to map rendering

Humanitarian OpenStreetmap Team

6 of 21

Example tagging

6

When tagging a building, common keys include:

  • addr:* tags providing address & location information
  • building tags providing information on the purpose or use
  • levels, material, and roof information are also common

Key

Value

addr:village

<name of village>

addr:street

<name of street>

building

construction, apartments, residential, roof, church, commercial, commercial;residential, public, school, hospital, industrial, utility, kitchen, toilet, bathroom, hut, barn, shed, cowshed, sty, chicken_coop, abandoned, other

building:levels

<number of levels in the building>

building:material

brick, cement_block, concrete, glass, loam, metal, plaster, reed, wood, mud, canvas, grass, other

building:roof

thatch, wood, asphalt, tile, metal, plastic, cement, other (free text)

Humanitarian OpenStreetmap Team

7 of 21

Examples

see tagging on the OSM website

7

X

DELETE - INSERT IMAGE HERE

8 of 21

Examples

see tagging on the OSM website

8

X

DELETE - INSERT IMAGE HERE

9 of 21

Examples

see tagging on Organic Maps

9

X

DELETE - INSERT IMAGE HERE

10 of 21

Examples

see tagging on JOSM

10

X

DELETE - INSERT IMAGE HERE

11 of 21

Selecting the best tags

11

What is the purpose of your project?

Which data is important to achieve that?

How do maps/spatial data contribute to this?

What data, and which attributes, do you need?

What data is currently available, and could be imported?

Are there any you can derive from aerial imagery?

Which ones require people to actually go there?

What tags should I use?

Humanitarian OpenStreetmap Team

12 of 21

OSM Wiki Map Features

sort through and search for accepted OSM tags

http://wiki.openstreetmap.org/wiki/Map_Features

X

DELETE - INSERT IMAGE HERE

13 of 21

TagInfo

search keys and values to find commonly used tags

http://taginfo.openstreetmap.org

X

DELETE - INSERT IMAGE HERE

14 of 21

What is a data model?

A data model defines what features are surveyed or mapped and what attributes are collected for each feature.

If a project will upload data to OpenStreetMap, the data model should be designed to match OSM tagging.

14

15 of 21

Creating a data model

15

  1. What is the focus of the data collection? Consider how the data will be used.
  2. What features do you want to collect? Identify the focus of the data collection.
  3. Where are you collecting data? Data models can differ based on their location.
  4. What has been done before? Draft data model by leveraging similar models.
  5. What tags exist for features?
    1. Verify tag status through OSM Wiki
    2. Verify tag usage through TagInfo
    3. Use approved tags where possible in data model
  6. Do all stakeholders agree on the data model? Review data model and incorporate feedback from project partners (adding, removing, or changing data model features can delay field data collection and decrease data quality!)

Humanitarian OpenStreetmap Team

16 of 21

Ramani Huria

Objective: assist communities and government to plan for, and mitigate the impacts of urban flooding

> What are the major hazards considered? Flooding itself, but also its secondary effects

> What contributes to/exacerbates the flooding?

> What could be done to mitigate flooding, and the impacts of flooding?

16

Duration

Goals

Achievements

17 of 21

METEOR: Nepal

Objective: help develop accurate exposure data in order to better identify risk and enable more effective decision-making in the face of natural disasters.

> How can exposure data be used to minimize the risk of natural disasters?

> What information is necessary for local and national decision-makers to develop life-saving policies and measures?

> What could be done to mitigate the impact of natural disasters such as earthquakes on buildings using open data?

17

Duration

Goals

Achievements

18 of 21

Example:

Creating a data model

Objective: create high-quality operational maps for use by the Ministry of Health and National Malaria Programme in upcoming malaria interventions

Data model creation process

Data model for malaria mapping

18

19 of 21

Creating the data model

19

What tags exist for features?

05

What has been done before?

04

Where are you collecting data?

03

In Botswana…

> Are there any unique building types?

> What building types and materials are common?

What features do you want to collect?

02

Features and attributes that would inform these decisions include

> Building use - residential, commercial, etc

> Building materials

> Number of rooms in a house, painted rooms, sleeping spaces

What is the focus of the data collection?

01

These data models informed ours…

> Local Empowerment for Government Inclusion and Transparency in Liberia

> Uganda Financial Inclusion

For features that we had not collected before, we searched for existing OSM tags on

> TagInfo

> OSM Wiki Map Features

To map features and attributes that determine what infrastructure is suitable for malaria interventions, and help set up logistics, procurement, etc

Humanitarian OpenStreetmap Team

20 of 21

The result

What if we need to collect private data?

Private data should never be uploaded to OSM.

For this project, the data model included unique tags that were created for this project for private data that needed to be collected.

This data was NEVER uploaded to OSM. Only provided to project partners.

After reviewing previously used data models, existing OSM tags, and consulting with project partners, the data model was created.

20

Key

Value

To MoH

To OSM

addr:village

<name of village>

addr:street

<name of street>

building

construction, apartments, residential, roof, church, commercial, commercial;residential, public, school, hospital, industrial, utility, kitchen, toilet, bathroom, hut, barn, shed, cowshed, sty, chicken_coop, abandoned, other

building:levels

<number of levels in the building>

building:material

brick, cement_block, concrete, glass, loam, metal, plaster, reed, wood, mud, canvas, grass, other

building:roof

thatch, wood, asphalt, tile, metal, plastic, cement, other (free text)

building:population

<number of household members>

X

building:

sleeping_spaces

<number of beds, mattresses, cots (sleeping spaces>

X

building:rooms

<total number of rooms in house>

X

building:

rooms_painted

<total number of paintedrooms in house>

X

Duration

Goals

Achievements

21 of 21

Data model to Final Product

21

A data model informs how and what data is collected. This defines what data is available to be analyzed and developed into final products for decision making.

Humanitarian OpenStreetmap Team