Download presentation
Presentation is loading. Please wait.
Published byBryce Miles Modified over 9 years ago
1
OpenStreetMap – how to get mobile Michal Páleník Freemap Slovakia Department of Cartography, Geoinformatics and Remote Sensing, Faculty of natural sciences, Comenius University in Bratislava www.freemap.skwww.freemap.sk www.oma.skwww.oma.sk
2
open data? what is OpenStreetMap Tiles, mbtiles, … Online service Vectors Current OSM mobile SW … please contribute
3
Licenses ?
4
FREE the DATA !!! Free DATA Open Data Free our data Open content Open access Free data Let data free
5
OpenStreetMap free wiki map of the world OpenStreetMap creates and provides free geographic data such as street maps to anyone who wants them. The project was started because most maps you think of as free actually have legal or technical restrictions on their use, holding back people from using them in creative, productive, or unexpected ways.
6
… not to forget www.openstreetmap.org www.osm.org http://wiki.osm.org www.open*map.*
7
ODbL Open Database Licence LGPL of databases You are free: To Share: To copy, distribute and use the database. To Create: To produce works from the database. To Adapt: To modify, transform and build upon the database.
8
ODbL As long as you: Attribute: You must attribute any public use of the database, or works produced from the database, in the manner specified in the ODbL. For any use or redistribution of the database, or works produced from it, you must make clear to others the license of the database and keep intact any notices on the original database. Share-Alike: If you publicly use any adapted version of this database, or works produced from an adapted database, you must also offer that adapted database under the ODbL. Keep open: If you redistribute the database, or an adapted version of it, then you may use technological measures that restrict the work (such as DRM) as long as you also redistribute a version without such measures.
9
South Africa – football
10
freemap.sk www.freemap.sk http://wiki.freemap.sk/openstreetmap
11
OMA.sk www.OMA.sk
12
OSM history 2004 – startup 2005 – 1 000 users 2006 – mapnik rendering, Slovakia started 2007 – 10 000 users, TIGER, AND, API v0.5 2008 – 20 million ways, I joined 2010 – 100 000 users 2011 – 481 153 users 2012 – 548 883 contributors, ODbL switch 2013 – 1 107 024 contributors
13
Current volume As of Oct 2011 Mar 2012 April 2013 Number of users: 481 153 548 883 1 107 024 # of nodes: 1 236 723 935 1 381 608 971 1 851 585 759 (Y2K problem in March) # of ways: 111 712 298 127 318 601 178 303 999 # of relations: 1 139 996 1 326 480 1 889 133 planet.osm.bz2: 18 GB 20 GB 27 GB (bzip2ed)
14
Database structure
15
Tile 256 x 256 pixel, jpeg / png
16
Tile structure http://a.tile.openstreetmap.org/ /${z}/${x}/${y}.png z – zoom 0 – 18 X goes from 0 (left edge is 180 °W) to 2^zoom − 1 (right edge is 180 °E) Y goes from 0 (top edge is 85.0511 °N) to 2^zoom − 1 (bottom edge is 85.0511 °S) http://wiki.osm.org/wiki/Slippy_map_tilenames
17
Openlayers Online site www.OpenLayers.org … init() …
18
OpenLayers JS var map, layer; function init(){ map = new OpenLayers.Map( 'map'); layer = new OpenLayers.Layer.OSM( "Simple OSM Map"); map.addLayer(layer); map.setCenter( new OpenLayers.LonLat(-71.147, 42.472).transform( new OpenLayers.Projection("EPSG:4326"), map.getProjectionObject() ), 12 ); }
19
Leaflet http://cdn.leafletjs.com/leaflet- 0.4.5/leaflet.js html, body, #map { height: 100%; }
20
Leaflet var map = L.map('map').setView([51.505, - 0.09], 13); L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', { attribution: '© OpenStreetMap contributors' }).addTo(map); L.marker([51.5, - 0.09]).addTo(map).bindPopup('A pretty CSS3 popup. Easily customizable.').openPopup();
21
basic map normal html website some js calls to: openlayers CSS needed to set up arrows, plus/minus, … needed with and height of the map div probably override body, html height to 100% calling new map _after_ div exists
22
Online map for mobiles no hover/onmouseover event ;( mobile browser stealing double click click vs. click-and-move many tiles / pictures loading high browser cpu/ram load newer versions are aware of this
23
mbtiles tiles – many many small images in filesystem z/x/y.png bevare of strange little things called inode (df -i) mbtiles – sqlite database of tiles quite slow for serving but fast for transfer many frameworks to mimic tiles '/tms/mbtiles.php?db=cyklo&z={z}&x={x}&y={y}'
24
mbtiles for mobile several applications for mbtiles -> tiles run on mobile iOS SDK by mapbox … tiles are huge: Bratislava 200-400 MB
25
TMI ??
26
Create your own tiles download OSM data from planet.osm.org or download.geofabrik.de or … using Osmosis: get a smaller portion feed into a program, get tiles Mapnik, Maperitive, Osmarender, Tilemill, … put tiles on a webserver, on another device create fancy good looking website
27
Mapnik Standard for high load server possibilities: minutely update from main OSM db mod_tile for ondemand rendering (apache module) very fast, postgis based minus pain to setup
28
Osmarender older package (pre mapnik) rendered on home desktops, tiles only stored on server huge disk requirements not developed any more (freemap.sk is somarender based, forked many years ago)
29
Maperitive free as beer MS Windows only application easy to setup and run (if you have MS Windows) produces tiles/mbtiles
30
Tilemill Ubuntu (and MS Windows & Mac) FOSS no Debian package (please, please, fix) desktop (and server) application Reads postgis, shp, Output tiles, mbtiles, Mapnik configuration, pdf easy to setup and run
31
Vectors for mobiles no standard comparable to tiles several possibilities huge performance problems with wrong programs
32
Maemo OSM2Go – editor Gosmore Marble http://wiki.osm.org/wiki/Software/Maemo
33
GpsMid J2ME application one midlet with data display, routing
34
Sygic Sygic has OSM based product please write them to make it public propretriary, but Slovak
35
Routing, navigation
36
Navit android + openmoko GPL v2 (also apple + …) full application offline rendering offline routing
37
Gosmore BSD for android, linux, … offline viewer and routing bzcat...osm.bz2 |./gosmore rebuild
38
Not only cars are transportworthy
39
OsmAnd GPL v3 Android full app offline display, offline navigation OsmAndMapCreator for your data
40
Other osmdroid – offline viewer (not Osmdroid) Rmaps … http://wiki.openstreetmap.org/wiki/Android
41
Mapsforge LGPL v3. library for android drop in replacement for google maps api change from com.google.android.maps to org.mapsforge.android.maps. No "<uses-library..." reference no API key → extra setMapFile(File) method (no offline routing yet) Osmosis plugin to create binary data
42
Freemap plugin Freemap.sk Locus plugin 110 MB hiking of Slovakia ready on android playground (uses mapsforge)
43
iPhone http://wiki.openstreetmap.org/wiki/Apple_iOS ? anybody ?
44
Last but not least: EDIT !!! OpenStreetMap: free wiki map of the world
45
How to edit http://wiki.osm.org/wiki/Beginners'_guide Collect data Upload data Create/Edit OSM data Label Data and add details Render and use maps
46
Programs Potlatch (WTFPL licenced) Josm, Merkaator OSM2go Mapzen POI collector, Osmaptuner, OsmAnd, Online tools … API (and libraries to use it)
47
Thank you Michal Páleník www.oma.sk www.freemap.sk
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.