interdisciplinary project on openeventmap
TRANSCRIPT
Interdisciplinary Project on OpenEventMap
Bibek Shrestha - [email protected]@bibstha
Under supervision ofKhatereh Polous - [email protected]
Table of Contents
• Objectives
• Introduction
• The OpenStreetMap Technology Stack
• Events, Event Tags and EventEditor JOSM Plugin
• OpenEventMap Event Visualization
• Conclusion
Objectives
• Develop tools to enable collection and visualization of events within OpenStreetMap (OSM) platform.
• Install infrastructure to run OpenStreetMap (OSM) locally.
• Identify strategy for event data entry into OSM.
• Develop tools to facilitate data entry.
• Create web application for visualization of collected data.
Introduction
Introduction
[1] http://wiki.openstreetmap.org/wiki/List_of_OSM_based_Services
• “Free” : without much legal or technical limitations.“be creative” [1].
• Collaborative Ownership (wiki model).“go online, create an account and start editing”.
• Open database (downloadable) and modifiable.
• Open technology.“all software can be downloaded and run locally free of cost”.
OSM data
OSM data
• Key = Value pairs (tags) represent properties.
• Tags have meaning, affects how they are rendered in the map.
• Arbitrary tags can be entered.
• Maintainers use tools to check if unwanted tags are present. Fix them and even ban users.
• So we decided to setup the database in our own server.
OSM data
OSM data is all about tags.
highway=residentialname=Helene-Mayer-Ring 7maxspeed=180maxspeed:winter=80
The community agrees on certain key and value combinations for tags that are informal standards, documented extensively at [1]
No tags for events “yet”.
[1] http://wiki.openstreetmap.org/wiki/Map_Features
What we did
Collect Event Data
Enter intolocal
OSM database
Create Tag Syntax
Setup localdatabase
JOSM Editorplugin
What is an event?An activity associated with a physical location that happened at certain point or period of time.
Attributes that we capture for an event are:
namedescriptioncategorysub_categoryclassification.organizationstart_date
end_datea longer event.urlnumparticipantshowoftenrelated_items
OSM tags for events
Syntaxevent:<event_index>:<event_attribute> = value
event_index belongs to [0,1,2,3,..,N]event_attribute is one of the values like name, category, subcategory, ...
OSM tags for eventsname = kaufingerstraßehighway = pedestrianbicycle = nocycleway = no...event = yesevent:0:name = Christkindlemarktevent:0:category = socialevent:0:sub_category = Fairs / Festivals...event:1:name = Munich Carnivalevent:1:category = socialevent:1:sub_category = Fairs / Festivalsevent:1:start_date = 07/01/2013event:1:end_date = 12/02/2013event:1:howoften = Yearly...
Contains two events:
Christkindlemarkt,Munich Carnival.
OSM tags for events
OSM tags for events
Adding tags is not trivial.
OSM tags for events
OSM tags for events
OSM tags for events
OSM tags for events
OSM tags for events
OSM tags for events
OSM tags for events
OSM tags for events
OSM tags for events
Save
Event VisualizationGood for
• Storage
• Flexibility for different data types
• Easily modifiable.
Bad for
• Search
OSM database
Event Visualization
OSM database
Event database
Cron, OSM and OpenEventMap table formats
cron: is a time-based job scheduler in Unix-like computer operating systems.
The cron configuration runs a special script in the server every minute. This script generatesosmchange files in .osc format which contains addition, modification or deletion of any OSMElement within the last minute.
Each .osc file is processed by OpenEventMap script and inserted into a new table calledsearch_event. During this process, multiple tag based key - value pairs related to a singleevent are converted into a single row in the new table format.
Figure 3: Comparison between OpenStreetMap and OpenEventMap table structure
In OSM current_node_tags table, a single event data is stored across multiple rows asbelows:
node_id k v
12345 event yes
12345 event:0:name Oktoberfest
12345 event:0:category social
12345 event:1:name Frühlingsfest
12345 event:1:category social
11The two events are converted into two single rows in search_event table as following:
id event_type type_id number name category subcategory . . .
1 node 12345 0 Oktoberfest social . . .
2 node 12345 1 Frühlingsfest social . . .
The search_event table format makes it easier to do complex queries searching more thanone field at any time. For example the following query is now possible:
SELECT * FROM search_event WHERE name LIKE %val%AND category=’social’AND ...
The query above would be complicated to execute on current_node_tags table.
OpenEventMap web application
The web application allows any user to search event database.
Search parameters
There are four parameters to filter the search results by: event name does a partial matchingwith existing event names, category parameter searches for exact match in category andsubcategory fields, start date and end date creates a date range and returns all the eventsthat fall under given range. Date filter also takes care of repeating events. For example, anevent that occurred in March 5, 2012 and repeats yearly will be found when searching forevents between March 1, 2013 and March 10, 2013.
If search is performed with non of the parameters entered, it returns all matching eventswithin given map region.
Search results are color coded. Most of the popular event categories are assigned di�erentcolors which are shown on the textual search results section as well as a colorful pointer onthe map. As the pointer is clicked, all events belonging to the place is shown in a popup.
Event data can be exported along with OSM elements like node, ways and relations in OSMformat using the Export link in the Search Results Section. It redirects the user to the OSMwebpage.
There is also a feature to first search any location by name. This is achieved by OSM’sNominatim api. For given location name, a search is performed around Bayern area and theresults are listed. When clicked on the result, the map gets zoomed in.
12
into
Event Visualization
OSM database
Event database
Cron, OSM and OpenEventMap table formats
cron: is a time-based job scheduler in Unix-like computer operating systems.
The cron configuration runs a special script in the server every minute. This script generatesosmchange files in .osc format which contains addition, modification or deletion of any OSMElement within the last minute.
Each .osc file is processed by OpenEventMap script and inserted into a new table calledsearch_event. During this process, multiple tag based key - value pairs related to a singleevent are converted into a single row in the new table format.
Figure 3: Comparison between OpenStreetMap and OpenEventMap table structure
In OSM current_node_tags table, a single event data is stored across multiple rows asbelows:
node_id k v
12345 event yes
12345 event:0:name Oktoberfest
12345 event:0:category social
12345 event:1:name Frühlingsfest
12345 event:1:category social
11The two events are converted into two single rows in search_event table as following:
id event_type type_id number name category subcategory . . .
1 node 12345 0 Oktoberfest social . . .
2 node 12345 1 Frühlingsfest social . . .
The search_event table format makes it easier to do complex queries searching more thanone field at any time. For example the following query is now possible:
SELECT * FROM search_event WHERE name LIKE %val%AND category=’social’AND ...
The query above would be complicated to execute on current_node_tags table.
OpenEventMap web application
The web application allows any user to search event database.
Search parameters
There are four parameters to filter the search results by: event name does a partial matchingwith existing event names, category parameter searches for exact match in category andsubcategory fields, start date and end date creates a date range and returns all the eventsthat fall under given range. Date filter also takes care of repeating events. For example, anevent that occurred in March 5, 2012 and repeats yearly will be found when searching forevents between March 1, 2013 and March 10, 2013.
If search is performed with non of the parameters entered, it returns all matching eventswithin given map region.
Search results are color coded. Most of the popular event categories are assigned di�erentcolors which are shown on the textual search results section as well as a colorful pointer onthe map. As the pointer is clicked, all events belonging to the place is shown in a popup.
Event data can be exported along with OSM elements like node, ways and relations in OSMformat using the Export link in the Search Results Section. It redirects the user to the OSMwebpage.
There is also a feature to first search any location by name. This is achieved by OSM’sNominatim api. For given location name, a search is performed around Bayern area and theresults are listed. When clicked on the result, the map gets zoomed in.
12
intochecks for changes every minute
Event Visualization
Event database
Open Event Maphttp://www.openeventmap.tum.de
+
Event Visualization
SearchForm
Event Visualization
Search Results
Event Visualization
Event Visualization
Location Search
Conclusion• Objectives accomplished:
• Infrastructure of OSM installed locally.
• Strategy to enter events data developed.
• Data entry tool for events developed.
• Web application for visualization of collected data created.
• Learning Experience:
• Working with OSM, Map Server and Map Rendering.
• Basics of Cartography and Map making.
• Data visualization and its importance.
Links to download
Our source codes are online.
OpenEventMap web applicationhttps://bitbucket.org/polous/openeventmap
JOSM pluginhttps://bitbucket.org/polous/osm-event-plugin
Project documentationhttps://bitbucket.org/polous/openeventmap/wiki/Home