Data Models and Tagging
1
1
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
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
Why is tagging important?
4
Data without information (tags) creates a blank map
Humanitarian OpenStreetmap Team
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
Example tagging
6
When tagging a building, common keys include:
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
Examples
see tagging on the OSM website
7
X
DELETE - INSERT IMAGE HERE
Examples
see tagging on the OSM website
8
X
DELETE - INSERT IMAGE HERE
Examples
see tagging on Organic Maps
9
X
DELETE - INSERT IMAGE HERE
Examples
see tagging on JOSM
10
X
DELETE - INSERT IMAGE HERE
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
OSM Wiki Map Features
sort through and search for accepted OSM tags
http://wiki.openstreetmap.org/wiki/Map_Features
X
DELETE - INSERT IMAGE HERE
TagInfo
search keys and values to find commonly used tags
http://taginfo.openstreetmap.org
X
DELETE - INSERT IMAGE HERE
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
Creating a data model
15
Humanitarian OpenStreetmap Team
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 | |
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 | |
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
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
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 | |
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