OpenStreetMap for the Web



Similar documents
Extending Yioop! With Geographical Location Local Search. A Writing Project. Presented to. The Faculty of the Department of Computer Science

XML Processing and Web Services. Chapter 17

OpenStreetMap for Web Developers. Serge Wroclawski State of the Map US August 2010

M GIS. A Short Introduction to Volunteered Geographic Information Presentation of the OpenStreetMap Project

GO_SYNC - A FRAMEWORK TO SYNCHRONIZE CROWD-SOURCED MAPPING CONTRIBUTIONS FROM ONLINE COMMUNITIES AND TRANSIT AGENCY BUS STOP INVENTORIES

Sensors talk and humans sense Part II

Developing Fleet and Asset Tracking Solutions with Web Maps

OSM-in-a-box A Ready-Made Highly Configurable Map Server

Implementation of a system of the mobile terminal position tracking using Google Maps

Cost Effective GPS-GPRS Based Object Tracking System

Taxi Service Design Description

Big data and urban mobility

Implementation of Location based Services in Android using GPS and Web Services

Visualize your World. Democratization i of Geographic Data

The Open Source Knowledge Discovery and Document Analysis Platform

Event Detection and Visualization of VGI

WORLD WEATHER ONLINE

Log management with Logstash and Elasticsearch. Matteo Dessalvi

Perl & NoSQL Focus on MongoDB. Jean-Marie Gouarné jmgdoc@cpan.org

Key words: GPS, Geocoder, WWO Server, Google Server, Android, RAM, Mobile Equipment, OS.

Using OpenStreetMap data. Nick Whitelegg Southampton Solent University, RM424

Practical Essbase Web Services

How To Write A Web Server In Javascript

Development and Implementation of the OpenLR Map Interface for Shapefiles

Arm Hardware Platform for Vehicle Monitoring and Tracking System Using GPRS

Methods of Social Media Research: Data Collection & Use in Social Media

MongoDB Developer and Administrator Certification Course Agenda

Documentation for Online Travel Site. Ashish Khullar Dushyant Bansal Saurabh Gupta Vianyak Bhavnani

DYNAMIC GOOGLE REMOTE DATA COLLECTION

Google Earth Digitale Wege in eine bekannte Welt Sep. 2006

Visualizing MongoDB Objects in Concept and Practice

PHP on the D-BUS. Welcome!

IDENTIFICATION OF KEY LOCATIONS BASED ON ONLINE SOCIAL NETWORK ACTIVITY

Open Paper Maps Michal Migurski, Stamen Design

TRIBHUWAN UNIVERSITY INSTITUTE OF ENGINEERING PULCHOWK CAMPUS A REPORT ON ROUTEFINDER (MINOR PROJECT) AUGUST 27, 2013 SUBMITTED BY

A RESTful Web Service for Whois. Andy Newton Chief Engineer, ARIN

ITP 140 Mobile Technologies. Mobile Topics

1.5.3 Project 3: Traffic Monitoring

New indoor data scheme for OSM

NO SQL! NO INJECTION?

GEM global earthquake model. User guide: Android mobile tool for field data collection. Rosser, J., J.G. Morley, A. Vicini. Data capture tools

Google Enterprise Geospatial. Andrea Aymerich Head of Geo Enterprise Italy

Why NoSQL? Your database options in the new non- relational world IBM Cloudant 1

Title page. Alcatel-Lucent 5620 SERVICE AWARE MANAGER 13.0 R7

Commotion Network Dashboard Application for Commotion Wireless Request for Development Proposals

Keywords LBS, Continuous Query, Range Query, Google API s, GPS.

Wildix WebRTC Kite & MCU Videoconference. Quick Start Guide

Frictionless Persistence in.net with MongoDB. Mogens Heller Grabe Trifork

An expectation-based editing interface for OpenStreetMap

07/04/2014 NOBIL API. Version 3.0. Skåland Webservice Side 1 / 16

Reef Explorer User Guide

The process of mapping the Earth

emontage: An Architecture for Rapid Integration of Situational Awareness Data at the Edge

Location-Based Services Using HTML5 Geolocation and Google Maps APIs

Design and Implementation of Web-Based GPS-GPRS Vehicle Tracking System

metaengine DataConnect For SharePoint 2007 Configuration Guide

A Cost Effective GPS-GPRS Based Women Tracking System and Women Safety Application using Android Mobile

Operational Decision Manager Worklight Integration

A Performance Evaluation of Open Source Graph Databases. Robert McColl David Ediger Jason Poovey Dan Campbell David A. Bader

Big Data. Facebook Wall Data using Graph API. Presented by: Prashant Patel Jaykrushna Patel

Victorian Mapping and Address Service. System Overview. And. Trial Access Definition & Request Form

THE SEMANTIC WEB AND IT`S APPLICATIONS

Wildix Kite. Quick Guide

Tracking Anomalies in Vehicle Movements using Mobile GIS

Learning Facebook Application Development

Beyond The Web Drupal Meets The Desktop (And Mobile) Justin Miller Code Sorcery Workshop, LLC

Databases 2 (VU) ( )

An Extensible and Integrated Software Architecture for Data Analysis and Visualization in Precision Agriculture

GIS Databases With focused on ArcSDE

Python and MongoDB. Why?

Developing Business Intelligence and Data Visualization Applications with Web Maps

International Journal of Scientific & Engineering Research, Volume 6, Issue 5, May-2015 ISSN

No SQL! no injection? A talk on the state of NoSQL security

Opening historical maps for community mashups - a case study of the NLS Historical Maps API.

Visualization Method of Trajectory Data Based on GML, KML

An Open Source NoSQL solution for Internet Access Logs Analysis

FormAPI, AJAX and Node.js

News Map Visualization

Getting Data from the Web with R

Portals and Hosted Files

TSINGHUA UNIVERSITY. Li Liu, Guangwen Yang, Bin Wang Center for Earth System Science, Tsinghua University

Module Google Remarketing + Dynamic

Vehicle Tracking system with GPS GSM Interface and Self Created Map

Android City Tour Guide System

A Geographic Interactive Supply Chain Management System for Construction Projects

Modern Web Development From Angle Brackets to Web Sockets

CSCI-UA: Database Design & Web Implementation. Professor Evan Sandhaus sandhaus@cs.nyu.edu evan@nytimes.com

Location Based Asset Management Application for Railway: AMS-R

User Manual GPS Travelling System (Produced By: Bonrix Software System)

Transcription:

Welcome! OpenStreetMap for the Web WhiskyWeb - Edinburgh, UK - April 13th, 2012 Derick Rethans - derick@derickrethans.nl - twitter: @derickr http://derickrethans.nl/talks/osm-whiskyweb http://joind.in/6288

OpenStreetMap "Wikipedia for Map Data" Licensed under the Creative Commons Attribution-ShareAlike 2.0 licence (CC-BY-SA): Licensed under the Open Database License (ODbL 1.0): You are free to copy, distribute, transmit and adapt our maps and data, as long as you credit OpenStreetMap and its contributors. If you alter or build upon our maps or data, you may distribute the result only under the same licence. Rendered map: A lot of data is not rendered, but is available.

What is OpenStreetMap? A database with geographic data of the whole planet under a free license APIs to add, retrieve and query map data A social platform for improving the map

What is Google Maps? In words: It gives you It gives you It gives you It gives you It gives you "free" map tiles satellite imagery StreetView a free JavaScript library a free geo-coding API

Terms and Conditions OSM: OpenStreetMap is open data, licensed under the Creative Commons Attribution-ShareAlike 2.0 licence (CC-BY-SA). Google Maps: Can I generate a map image using the Google Static Maps API which I store and serve from my website? You may not store and serve copies of images generated using the Google Static Maps API from your website. What transaction limits apply to the Maps API? From October 1st 2011 commercial web sites and applications using the Maps API may at no cost generate: up to 2,500 map transactions Geocoding Usage Limits: Use of the Google Geocoding API is subject to a query limit of 2,500 geolocation requests per day

The Data Nodes (Lat/Lon point) <node id='459517295' lat='50.0100766' lon='8.3162402' user='wogo' timestamp='2009-08-09t11:45:33z' uid='152395' version='1' changeset='2083951'> Ways (Ordered interconnection of nodes) Areas (Closed ways) <way id='76174399' user='derick Rethans' uid='37137' timestamp='2010-0906t08:30:14z' version='1' changeset='5695697'> <nd ref='898861293'/> <nd ref='898861305'/> <nd ref='898861293'/>... </way> Tags (Describe an element) <tag <tag <tag <tag <tag k='addr:housenumber' v='375'/> k='addr:street' v='kilburn High Road'/> k='amenity' v='pub'/> k='building' v='yes'/> k='name' v='north London Tavern'/>

Tagging features (1)

Tagging features (2)

Tagging features (3)

Tagging features (4)

Editting tags

Mapping parties As OSM's main purpose is creating a database of free map data: data needs to be generated (surveyed), which is best done by hand data needs to be added to the database: Potlatch, JOSM surveying is more fun if you're not alone why not do it in a group?

Editting the map

Mapping party: Kibera

Mapping party: Korogocho

Mapping party: Korogocho

Google Mapping Party Google invited an OSM-er to a Google MapMaker mapping "course" They were shown arm-chair mapping OSMers showed a little about what a real mapping party is They asked tough questions: "How can we use the mapping data in a GPS?", "How can I map some grass?" and "How can I get all the pubs?" OSM is about the data, any kind of geographic data

Using data Quering data (API, XAPI/JXAPI, Nominatim) Render and display what ever you want from it

Looking up latitude and longitude from a location <?php $name = urlencode( ':-:location:-:' ); $baseurl = 'http://nominatim.openstreetmap.org/search?format=json&q='; $data = file_get_contents( "{$baseurl}{$name}&limit=1" ); $json = json_decode( $data ); $lat = $json[0]->lat; $lon = $json[0]->lon;?> var lat=<?php printf( '%0.3f', $lat );?> var lon=<?php printf( '%0.3f', $lon );?> <?php var_dump( $json[0] );?>

Looking up latitude/longitude Different services Nominatim:http://nominatim.openstreetmap.org/s earch?format=json&limit=1&q=london Yahoo:http://where.yahooapis.com/geocode? flags=gjt&appid=[yourappidhere]&q=london

Reverse Geocoding Finding a name for coordinates

Finding a name for the current location Different services Geonames:http://ws.geonames.org/findNearbyPlac enamejson? username=derick&style=full&lat={$lat}&lng={$ lon} Nominatim:http://nominatim.openstreetmap.org/re verse? format=json&lat={$lat}&lon={$lon}&zoom={$z } Yahoo:http://where.yahooapis.com/geocode? gflags=r&flags=gjqt&q={$lat},{$lon}

Using OpenStreetMap data Process: Use XAPI, API or extracts to fetch data Parse XML file with PHP into a DB (MongoDB) Query database Show data Profit (or in our case, we found a restaurant)!

Fetching OSM data wget http://download.geofabrik.de/osm/europe/great_britain/england.osm.bz2 <?xml version='1.0' encoding='utf-8'?> <osm version="0.6" generator="osmosis 0.39"> <bound box="51.26000,-0.56300,51.68000,0.28000" origin="http://www.openstreetmap.org/api/0.6"/> <node id="44" version="3" timestamp="2011-09-08t20:53:43z" uid="15867" user="mattfromderby" changeset="9249514" lat="51.5250157" lon="-0.1485302"/> <node id="47" version="2" timestamp="2011-09-08t20:53:43z" uid="15867" user="mattfromderby" changeset="9249514" lat="51.525182" lon="-0.1479761"/> <node id="52" version="3" timestamp="2011-09-08t21:13:19z" uid="15867" user="mattfromderby" changeset="9249514" lat="51.5289059" lon="-0.1458559"/>... <node id="1571982070" version="1" timestamp="2011-12-31t20:37:18z" uid="545369" user="bigfatfrog67" changeset="10257991" lat="51.5087759" lon="-0.1253258"> <tag k="name" v="charing Cross"/> <tag k="railway" v="subway_entrance"/> <tag k="source:name" v="survey"/> <tag k="source:railway" v="survey"/> </node>... <way id="74" version="5" timestamp="2010-12-12t22:43:15z" uid="508" user="welshie" changeset="6643030"> <nd ref="196101"/> <nd ref="196100"/> <nd ref="196331"/> <tag k="abutters" v="retail"/> <tag k="highway" v="primary"/> <tag k="maxspeed" v="30 mph"/> <tag k="name" v="ballards Lane"/> <tag k="ref" v="a598"/> </way>... <relation id="69" version="13" timestamp="2009-02-09t14:57:24z" uid="45027" user="pa94" changeset="307506"> <member type="way" ref="3793834" role="outer"/> <member type="way" ref="26454599" role="inner"/> <tag k="created_by" v="xybot"/> <tag k="type" v="multipolygon"/> </relation>... </osm>

Importing data MongoDB is schema less, so fits the OSM data model quite well, but you still need to think about how to store the data best: $doc = array( 'name' => 'A440', 'tags = [ 'highway' => 'secondary', 'oneway' => 'yes' ] ); $db->poi->ensureindex( [ 'name' => 1 ] ); $db->poi->ensureindex( [ 'tags.highway' => 1 ] ); $db->poi->ensureindex( [ 'tags.oneway' => 1 ] ); or: $doc = array( 'name' => 'A440', 'tags' = { [ 'k' => 'highway', 'v' => 'secondary', 'k' => 'oneway', 'v' => 'yes' ] } ); $db->poi->ensureindex( [ 'name' => 1 ] ); $db->poi->ensureindex( [ 'tags.k' => 1, 'tags.v' => 1 ] );

Distances are tricky note: km / miles cos(51.5)

Querying our database MongoDB's 2D index db.poi.ensureindex( { poi : '2d' } ); $s = $d->command( array( 'geonear' => 'poi', 'spherical' => true, 'near' => array( $_GET['lon'], $_GET['lat'] ), 'num' => 10000, 'maxdistance' => $wantedd / 6371.01, // km to radians 'query' => $query, ) ); spherical => true, for spherical Earth calculations

Finding Food

Resources Slides: http://derickrethans.nl/talks/osmwhiskyweb Contact me: Derick Rethans: @derickr, derick@derickrethans.nl Feedback: http://joind.in/6288