SlideShare a Scribd company logo
..
InstructioninBuildingTile
ServerandProvidingMap
EditorforCrowdsourcing
.
Build Your Own Map by Yourself!
.
by
.
Marc Huang
.
marchuang41@gmail.com
. September 16, 2015
..
References
.
1. https://switch2osm.org/
This website teaches you how to build tile servers
2. https://github.com/openstreetmap/openstreetmap-website
A project to build OpenStreetMap website and API which used Ruby on
Rails
3. http://wiki.openstreetmap.org/
OpenStreetMap Wikipedia
...
Introduction
.
1/46
Introduction
..
This slide is for...
.
Introduction
.
2/46
1. Who has map data and wants to provide tile servers
2. Who wants to edit map by using editors such as iD,
Potlatch
3. Who is interested in building a local OpenStreetMap
..
OSM Component Overview
.
Introduction
.
3/46
..
What will we do
.
Introduction
.
4/46
..
Contents
.
Introduction
.
5/46
1. Build a tile server
2. Build a website containing map editors, API, and UI
3. Connect two services together
..
Environment
.
Introduction
.
6/46
. VirtualBox VM
. Ubuntu 12.04 (32-bit)
. Memory: 2GB
. Storage: 120GB,
. Networks: NAT and Host-only Adapter
..
My settings
.
Introduction
.
7/46
. User: map
. Password: 000000
. ssh installed (sudo apt-get install openssh-server)
. Basically, you should know how to get the “ip” of your
VM (ifconfig, and it looks like “192.168.x.x”) and how to
use “ssh” (ssh map@192.168.x.x)
. If you get confused, you probably have to google
“virtualbox ubuntu install, virtualbox ssh”
. If not, good! Let’s move on!
...
Build a Tile Server
.
8/46
BuildaTileServer
..
Preparing & Software Install
.
Build a Tile Server
.
9/46
. sudo apt-get update
. sudo apt-get upgrade
. sudo apt-get install subversion git-core tar unzip wget bzip2
build-essential autoconf libtool libxml2-dev libgeos-dev libpq-dev
libbz2-dev proj munin-node munin libprotobuf-c0-dev
protobuf-c-compiler libfreetype6-dev libpng12-dev libtiff4-dev
libicu-dev libboost-all-dev libgdal-dev libcairo-dev
libcairomm-1.0-dev apache2 apache2-dev libagg-dev liblua5.2-dev
ttf-unifont vim
. mkdir src
. cd src
. wget
https://www.dropbox.com/s/a1awl6ua037oy1y/osm2pgsql-0.81.0.zip
. wget
https://www.dropbox.com/s/vqghx8fbbwq966u/osmosis-bin-0.35.zip
..
Install Postgresql/PostGIS
.
Build a Tile Server
.
10/46
. sudo apt-get install postgresql-9.1-postgis
postgresql-contrib-9.1 postgresql-server-dev-9.1
Note: you must indicate a version of postgresql or you will get
errors (as following block showed) after rebooted your VM
Error
psql: could not connect to server: No such file or directory
Is the server running locally and accepting connections on Unix
domain socket ”/var/pgsql_socket/.s.PGSQL.5432”?
..
Set up Postgresql/PostGIS
.
Build a Tile Server
.
11/46
. sudo -u postgres -i
. createuser <username>
(e.g., my user name is “map” then $ createuser map)
. createdb -E UTF8 -O <username> <database>
(e.g., $ createdb -E UTF-8 -O map map)
. psql -f
/usr/share/postgresql/9.1/contrib/postgis-1.5/postgis.sql
-d <database>
(you will see “CREATE FUNCTION... DROP FUNCTION”)
. psql -d <database> -c "ALTER TABLE
geometry_columns OWNER TO <username>; ALTER
TABLE spatial_ref_sys OWNER TO <username>;"
(you will see “ALTER TABLE”)
..
Install & Set up osm2pgsql
.
Build a Tile Server
.
12/46
. cd ~/src
. unzip osm2pgsql-0.81.0.zip
. cd osm2pgsql-0.81.0
. ./autogen.sh
. ./configure
. make
. sudo make install
. psql -f /usr/local/share/osm2pgsql/900913.sql -d
<database>
Note: You can check it by using “osm2pgsql -v”
..
Install Mapnik
.
Build a Tile Server
.
13/46
. cd ~/src
. git clone git://github.com/mapnik/mapnik
. cd mapnik
. git branch 2.0 origin/2.0.x
. git checkout 2.0
. python scons/scons.py configure INPUT_PLUGINS=all
OPTIMIZATION=3
SYSTEM_FONTS=/usr/share/fonts/truetype/
. python scons/scons.py
. sudo python scons/scons.py install
. sudo ldconfig
Note: You can check it by using “python
»» import mapnik
»» exit()”
..
Install mod_tile
.
Build a Tile Server
.
14/46
. cd ~/src
. git clone git://github.com/openstreetmap/mod_tile.git
. cd mod_tile
. ./autogen.sh
. ./configure
. make
. sudo make install
. sudo make install-mod_tile
. sudo ldconfig
..
Install and set up mapnik style-sheet
.
Build a Tile Server
.
15/46
. cd ~/src
. svn co
http://svn.openstreetmap.org/applications/rendering/mapnik
mapnik-style
. cd mapnik-style
. sudo ./get-coastlines.sh /usr/local/share
. cd inc
. cp fontset-settings.xml.inc.template
fontset-settings.xml.inc
. cp datasource-settings.xml.inc.template
datasource-settings.xml.inc
. cp settings.xml.inc.template settings.xml.inc
..
Configuration: setting.xml.inc
.
Build a Tile Server
.
16/46
. sudo vim setting.xml.inc
These lines should change as following
<!ENTITY symbols "symbols">
<!ENTITY osm2pgsql_projection "&srs900913;">
<!ENTITY dwithin_node_way "&dwithin_900913;">
<!ENTITY world_boundaries "/usr/local/share/world_boundaries">
<!ENTITY prefix "planet_osm">
..
Configuration: datasource settings
.
Build a Tile Server
.
17/46
. sudo vim datasource-settings.xml.inc
These lines should change as following:
<Parameter name="type">postgis</Parameter>
<!--<Parameter name="password">%(password)s</Parameter>-->
<!--<Parameter name="host">%(host)s</Parameter>-->
<!--<Parameter name="port">%(port)s</Parameter>-->
<!--<Parameter name="user">%(user)s</Parameter>-->
<Parameter name="dbname">map</Parameter>
<Parameter name="estimate_extent">false</Parameter>
<Parameter
name="extent">-20037508,-19929239,20037508,19929239</Parameter>
Note: My dbname is “map” and you have to change it to your dbname
..
Configuration: fontset settings
.
Build a Tile Server
.
18/46
. sudo vim fontset-settings.xml.inc
These lines should change as following:
<FontSet name="book-fonts">
<!--<Font face-name="DejaVu Sans Book" />-->
<Font face-name="unifont Medium" />
</FontSet>
<FontSet name="bold-fonts">
<!--<Font face-name="DejaVu Sans Bold" />-->
<Font face-name="unifont Medium" />
</FontSet>
<FontSet name="oblique-fonts">
<!--<Font face-name="DejaVu Sans Oblique" />-->
<Font face-name="unifont Medium" />
</FontSet>
..
renderd configuration
.
Build a Tile Server
.
19/46
. sudo vim /usr/local/etc/renderd.conf
This file should looks like as following
[renderd]
socketname=/var/run/renderd/renderd.sock
num_threads=4
tile_dir=/var/lib/mod_tile
stats_file=/var/run/renderd/renderd.stats
[mapnik]
plugins_dir=/usr/local/lib/mapnik/input
font_dir=/usr/share/fonts/truetype/unifont
font_dir_recurse=1
[default]
URI=/osm_tiles/
TILEDIR=/var/lib/mod_tile
XML=/home/map/src/mapnik-style/osm.xml
HOST=localhost
TILESIZE=256
Note: You have to delete all other unused lines in this file.
...
Build a Tile Server
.
20/46
. sudo mkdir /var/run/renderd
. sudo chown map /var/run/renderd
. sudo mkdir /var/lib/mod_tile
. sudo chown map /var/lib/mod_tile
. sudo vim /etc/apache2/conf.d/mod_tile
add this line into file “mod_tile”
LoadModule tile_module /usr/lib/apache2/modules/mod_tile.so
..
Apache configuration
.
Build a Tile Server
.
21/46
. sudo vim /etc/apache2/sites-available/default
add these lines after line “webmaster@localhost”
LoadTileConfigFile /usr/local/etc/renderd.conf
ModTileRenderdSocketName /var/run/renderd/renderd.sock
ModTileRequestTimeout 0
ModTileMissingRequestTimeout 30
..
Tuning Postgresql and System
.
Build a Tile Server
.
22/46
. sudo vim /etc/postgresql/9.1/main/postgresql.conf
change these lines
shared_buffers = 128MB
checkpoint_segments = 20
maintenance_work_mem = 256MB
autovacuum = off
. sudo vim /etc/sysctl.conf
add this line at the end of file “sysctl.conf”
kernel.shmmax=268435456
. sudo reboot
Take a break, make a cup of tea :)
..
Download map data
.
Build a Tile Server
.
23/46
. mkdir ~/osm
. cd osm
. wget
http://download.geofabrik.de/asia/taiwan-latest.osm.pbf
Download a small portion of world map for testing. I live in Taiwan so I
download the map of Taiwan)
..
Import map data into Postgresql
.
Build a Tile Server
.
24/46
. osm2pgsql --slim -d map -C 1600 --number-processes 2
taiwan-latest.osm.pbf
If your osm2pgsql is not version 0.81, you might face errors.
pthread_join() returned exception: Throw location unknown (consider using
BOOST_THROW_EXCEPTION)
Dynamic exception type:
boost::exception_detail::clone_impl<boost::exception_detail::current_exception
_std_exception_wrapper<std::runtime_error>>
std::exception::what: CREATE TABLE planet_osm_point_tmp AS SELECT *
FROM planet_osm_point ORDER BY CASE WHEN ST_IsEmpty(way) THEN
NULL ELSE ST_GeoHash(ST_Transform(ST_Envelope(way),4326),10) END
failed: ERROR: GetProj4StringSPI: Cannot find SRID (4326) in spatial_ref_sy
..
Start your tile server
.
Build a Tile Server
.
25/46
. sudo mkdir /var/run/renderd
. sudo chown map /var/run/renderd
. renderd -f -c /usr/local/etc/renderd.conf
If your used ssh you might face a problem
”locale::facet::_S_create_c_locale name not valid”, just execute the
following command before you start tile server
export LC_ALL="en_US.UTF-8"
Now, open a new terminal and execute
. sudo /etc/init.d/apache2 restart
..
Check your tile server
.
Build a Tile Server
.
26/46
Open your browser and go to:
http://localhost/osm_tiles/0/0/0.png
If you see a picture of world map then the tile server is working.
You can stop renderd process by press Ctrl+c (the original
terminal)
Otherwise, if any error occured, you have to double check all the
configurations and install steps. For example, all the config files in
folder “src/mapnik-style/inc”, renderd.conf, and others.
..
Create a startup daemon for renderd
.
Build a Tile Server
.
27/46
If everything works well then we are going to create a starup
daemon for renderd.
. sudo cp ~/src/mod_tile/debian/renderd.init
/etc/init.d/renderd
. sudo chmod u+x /etc/init.d/renderd
. sudo vim /etc/init.d/renderd
change these lines and replace “map” to your username
DAEMON=/usr/local/bin/$NAME
DAEMON_ARGS="-c /usr/local/etc/renderd.conf"
RUNASUSER=map
. sudo /etc/init.d/renderd start
. sudo ln -s /etc/init.d/renderd /etc/rc2.d/S20renderd
..
Using your tile server
.
Build a Tile Server
.
28/46
. sudo mkdir /var/www/osm
. cd /var/www/osm
. sudo wget
http://cdn.leafletjs.com/downloads/leaflet-0.7.5.zip
This url may change, you can go to http://leafletjs.com/download.html to
download the latest version
. sudo unzip leaflet-0.7.5.zip
. sudo vim index.html
...
Build a Tile Server
.
29/46
Copy and paste this script to index.html
<html>
<head>
<title>My first tile server</title>
<link rel="stylesheet" type="text/css" href="leaflet.css"/>
<script type="text/javascript" src="leaflet.js"></script>
<style>
#map{width:100%;height:100vh}
</style>
</head>
<body>
<div id="map"></div>
<script>
var map = L.map('map').setView([25.555,121.899],7);
L.tileLayer('http://192.168.x.x/osm_tiles/{z}/{x}/{y}.png',
{maxZoom:18}).addTo(map);
</script>
</body>
</html>
..
Check your map
.
Build a Tile Server
.
30/46
Go to:
http://192.168.x.x/osm
or if you visit from local
http://localhost/osm
If you were not used map of Taiwan, you should change the initial
location (setView([Lag,Lng],7)).
Next, we are going to build a map website and provide an editor
for users to edit map data by API
...
Build an OpenStreetMap Website
.
31/46
BuildanOpenStreetMap
Website
..
Preparing & Software Install
.
Build an OpenStreetMap Website
.
32/46
. cd
. sudo apt-get install ruby1.9.1 libruby1.9.1 ruby1.9.1-dev
ri1.9.1 libmagickwand-dev libxslt1-dev nodejs
apache2-threaded-dev build-essential libpq-dev
libsasl2-dev default-jre
. sudo gem1.9.1 install bundler
..
Install openstreetmap-website
.
Build an OpenStreetMap Website
.
33/46
. git clone
https://github.com/openstreetmap/openstreetmap-website.git
. cd openstreetmap-website
. bundle install
. cp config/example.application.yml config/application.yml
. cp config/example.database.yml config/database.yml
. sudo vim config/image_optim.yml
add this line at the end of this file
svgo: false
..
Create & Set up Database
.
Build an OpenStreetMap Website
.
34/46
. bundle exec rake db:create
. psql -d openstreetmap -c "CREATE EXTENSION
btree_gist"
you will see ”CREATE EXTENSION”
. cd db/functions
. make libpgosm.so
you will see some compiling commands start by ”cc”
. cd ../..
..
Database Configuration
.
Build an OpenStreetMap Website
.
35/46
. psql -d openstreetmap -c "CREATE FUNCTION maptile_for_point(int8,
int8, int4) RETURNS int4 AS '`pwd`/db/functions/libpgosm',
'maptile_for_point' LANGUAGE C STRICT"
. psql -d openstreetmap -c "CREATE FUNCTION tile_for_point(int4,
int4) RETURNS int8 AS '`pwd`/db/functions/libpgosm',
'tile_for_point' LANGUAGE C STRICT"
. psql -d openstreetmap -c "CREATE FUNCTION xid_to_int4(xid)
RETURNS int4 AS '`pwd`/db/functions/libpgosm', 'xid_to_int4'
LANGUAGE C STRICT"
. bundle exec rake db:migrate
. bundle exec rake test
to ensure that everything is set up properly
..
Start Your Webiste
.
Build an OpenStreetMap Website
.
36/46
. bundle exec rails server -b 192.168.x.x
if you will browse from local then just execute “bundle exec rails
server”
Go to http://192.168.x.x:3000, if this website just looks like
OpenStreetMap’s website, bravo!
Sign up an account and note down your “Display Name”
Open a new terminal after you are in the “Check your email!” page
..
Managing Users
.
Build an OpenStreetMap Website
.
37/46
. cd openstreetmap-website
. bundle exec rails console
. » user = User.find_by_display_name(”Your Display Name”)
=> #[...]
. » user.status = ”active”
=> ”active”
. » user.save!
=> true
. » quit
Go back to your browser and refresh the page, check if you are logged in.
Next, on the top-right corner, select “My settings” and click “oauth
settings” then “Register your application”
Fill “iD” into “Name”, fill “http://192.168.x.x:3000” into “Main
Application URL”, and checked “modify the map” in below
Click “Register” and copy the “Consumer key”
..
Editor Configuration
.
Build an OpenStreetMap Website
.
38/46
. sudo vim config/application.yml
find the “id_key” line, uncomment it and fill the key’
id_key: "VGWM4FlewbJSjLvWbxml5xr45zus8nH0DWKN6yBw"
Restart the rail server and go to your website to click “Edit”
button (default editor is iD)
You will see the iD editor is working.
..
Install & Set up Osmosis
.
Build an OpenStreetMap Website
.
39/46
. cd ~/src
. wget
http://bretth.dev.openstreetmap.org/osmosis-build/osmosis-
latest.zip
. mkdir osmosis-latest
. unzip osmosis-latest.zip -d osmosis-latest
. chmod u+x osmosis-latest/bin/osmosis
. sudo -u postgres psql
. # password
. # Enter password:...
set a password for “posstgres”
. # q
..
Import data by API
.
Build an OpenStreetMap Website
.
40/46
. ./osmosis-latest/bin/osmosis --read-pbf
../osm/taiwan-latest.osm.pbf --write-apidb
host="localhost" user="postgres" password="Your
Password" database="openstreetmap"
validateSchemaVersion="no"
Note: If your map data version is not 0.6 then you have to use osmosis-0.35 to
convert it first.
..
The ”duplicate key” problem
.
Build an OpenStreetMap Website
.
41/46
. psql -d openstreetmap
execute the following commands
SELECT pg_catalog.SETVAL('acls_id_seq', (SELECT MAX(id) FROM acls))
SELECT pg_catalog.SETVAL('changesets_id_seq', (SELECT MAX(id) FROM changesets ))
SELECT pg_catalog.SETVAL('client_applications_id_seq', (SELECT MAX(id) FROM client_applications))
SELECT pg_catalog.SETVAL('current_nodes_id_seq', (SELECT MAX(id) FROM current_nodes))
SELECT pg_catalog.SETVAL('current_relations_id_seq', (SELECT MAX(id) FROM current_relations))
SELECT pg_catalog.SETVAL('current_ways_id_seq', (SELECT MAX(id) FROM current_ways))
SELECT pg_catalog.SETVAL('diary_comments_id_seq', (SELECT MAX(id) FROM diary_comments))
SELECT pg_catalog.SETVAL('diary_entries_id_seq', (SELECT MAX(id) FROM diary_entries))
SELECT pg_catalog.SETVAL('friends_id_seq', (SELECT MAX(id) FROM friends))
SELECT pg_catalog.SETVAL('gpx_file_tags_id_seq', (SELECT MAX(id) FROM gpx_file_tags))
SELECT pg_catalog.SETVAL('gpx_files_id_seq', (SELECT MAX(id) FROM gpx_files))
SELECT pg_catalog.SETVAL('messages_id_seq', (SELECT MAX(id) FROM messages))
SELECT pg_catalog.SETVAL('note_comments_id_seq', (SELECT MAX(id) FROM note_comments))
SELECT pg_catalog.SETVAL('notes_id_seq', (SELECT MAX(id) FROM notes))
SELECT pg_catalog.SETVAL('oauth_nonces_id_seq', (SELECT MAX(id) FROM oauth_nonces))
SELECT pg_catalog.SETVAL('oauth_tokens_id_seq', (SELECT MAX(id) FROM oauth_tokens))
SELECT pg_catalog.SETVAL('redactions_id_seq', (SELECT MAX(id) FROM redactions))
SELECT pg_catalog.SETVAL('user_blocks_id_seq', (SELECT MAX(id) FROM user_blocks))
SELECT pg_catalog.SETVAL('user_roles_id_seq', (SELECT MAX(id) FROM user_roles))
SELECT pg_catalog.SETVAL('user_tokens_id_seq', (SELECT MAX(id) FROM user_tokens))
SELECT pg_catalog.SETVAL('users_id_seq', (SELECT MAX(id) FROM users))
q
Now you can use iD to edit your own map.
...
Connect Together
.
42/46
ConnectTogether
..
Change Standard Map to Your Map
.
Connect Together
.
43/46
. sudo vim
openstreetmap-website/vendor/assets/leaflet/leaflet.osm.js
find all matches of the following texts
url: document.location.protocol === 'https:' ?
'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png' :
'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
replace all to
url: 'http://192.168.x.x/osm_tiles/{z}/{x}/{y}.png',
..
Change Initial Location of Map
.
Connect Together
.
44/46
. sudo vim openstreetmap-website/app/assets/javascripts/osm.js.erb
set your initial Location
#mapParams.lon = -0.1;
mapParams.lon = 120.1204;
#mapParams.lat = 51.5;
mapParams.lat = 23.0260;
#mapParams.zoom = parseInt(params.zoom || 5);
mapParams.zoom = parseInt(params.zoom || 10);
..
Update Tile Server
.
Connect Together
.
45/46
. cd
. sudo vim update-tile.sh
add these commands into it
./src/osmosis-latest/bin/osmosis --read-apidb host="localhost"
database="openstreetmap" user="postgres" password="Your
Password" validateSchemaVersion="no" --write-xml
file=".osm/update.osm"
osm2pgsql --slim -d map -C 1600 ./osm/update.osm
sudo rm -R /var/lib/mod_tile/default/
sudo /etc/init.d/renderd restart
Note: You can execute these commnads separated instead of using shell script.
. sudo chmod u+x update-tile.sh
. ./update-tile.sh
..
Finally
.
Connect Together
.
46/46
If you see the changes of your map on your tile server then
everything is working, congratulations! You can download the draft
of all install commands here:
https://www.dropbox.com/s/oglhsw57slcsybt/install
Or, email me: Marc Huang<marchuang41@gmail.com> if you
have any questions.
Thank you, happy coding.

More Related Content

PPTX
Vascularización, inervación, linfáticos, dermatomas de el miembro superior
PPTX
DISNEA Semiologia
PDF
Irrigación del abdomen
PPT
INTRODUCCION A LA ANATOMIA
PDF
Anatomia de corazon
PDF
What is Python
PDF
OpenGeoData Italia - Roma - Simone Cortesi | Maurizio Napolitano | openstreet...
PPT
Presentationsfk2010
Vascularización, inervación, linfáticos, dermatomas de el miembro superior
DISNEA Semiologia
Irrigación del abdomen
INTRODUCCION A LA ANATOMIA
Anatomia de corazon
What is Python
OpenGeoData Italia - Roma - Simone Cortesi | Maurizio Napolitano | openstreet...
Presentationsfk2010

Viewers also liked (20)

ODP
OpenStreetMap OpenTech 2011
PPTX
Build an OSM mapping platform with Drupal
PDF
Lessons Learned Setting Up the OSM Stack Workshop SotM US 2013
PPT
The Deer Family
PPTX
Urinary System
DOC
Sales Call Reporting Tool
PPTX
Mary fonseca El deslinde de propiedad contiguas
PPTX
PPTX
Instalación de redes locales
DOC
Silsilah keluarga gaffar
PPTX
How to buy elevators in india
PDF
AFWA_Monarch_Report_Oct_23_2015
PDF
Pdf de taller apicultura marzo
PPTX
tIpos de oraciones
PPTX
More Sales Group Sales Training Presentation
PPTX
Bill gates dhaval patel
PDF
May 2016 The Woodlands Market Report
PDF
البرمجة اللغوية العصبية
PPTX
The COMBO co. new business pitch
PPSX
Apresentação1
OpenStreetMap OpenTech 2011
Build an OSM mapping platform with Drupal
Lessons Learned Setting Up the OSM Stack Workshop SotM US 2013
The Deer Family
Urinary System
Sales Call Reporting Tool
Mary fonseca El deslinde de propiedad contiguas
Instalación de redes locales
Silsilah keluarga gaffar
How to buy elevators in india
AFWA_Monarch_Report_Oct_23_2015
Pdf de taller apicultura marzo
tIpos de oraciones
More Sales Group Sales Training Presentation
Bill gates dhaval patel
May 2016 The Woodlands Market Report
البرمجة اللغوية العصبية
The COMBO co. new business pitch
Apresentação1
Ad

Similar to Build your own_map_by_yourself (20)

PDF
Worskhop Leicester 2010
PDF
Osol Pgsql
KEY
Railsconf2011 deployment tips_for_slideshare
PDF
Memcached Study
PDF
[W3C HTML5 2016] Angular + ES6
PDF
2016 W3C Conference #4 : ANGULAR + ES6
PPTX
Angular 1 + es6
PPTX
ql.io: Consuming HTTP at Scale
PDF
Gmaps Railscamp2008
PPT
Raj mysql
KEY
Writing robust Node.js applications
PDF
AFUP Lorraine - Symfony Webpack Encore
PDF
Os Wilhelm
PDF
浜松Rails3道場 其の壱 プロジェクト作成〜Rouging編
PDF
Worskhop OSGIS2010
ODP
SockJS Intro
PDF
Apache MXNet Distributed Training Explained In Depth by Viacheslav Kovalevsky...
DOCX
Tutorial to setup OpenStreetMap tileserver with customized boundaries of India
PDF
Play vs Rails
PPT
TopicMapReduceComet log analysis by using splunk
Worskhop Leicester 2010
Osol Pgsql
Railsconf2011 deployment tips_for_slideshare
Memcached Study
[W3C HTML5 2016] Angular + ES6
2016 W3C Conference #4 : ANGULAR + ES6
Angular 1 + es6
ql.io: Consuming HTTP at Scale
Gmaps Railscamp2008
Raj mysql
Writing robust Node.js applications
AFUP Lorraine - Symfony Webpack Encore
Os Wilhelm
浜松Rails3道場 其の壱 プロジェクト作成〜Rouging編
Worskhop OSGIS2010
SockJS Intro
Apache MXNet Distributed Training Explained In Depth by Viacheslav Kovalevsky...
Tutorial to setup OpenStreetMap tileserver with customized boundaries of India
Play vs Rails
TopicMapReduceComet log analysis by using splunk
Ad

Recently uploaded (20)

PDF
GDG Cloud Iasi [PUBLIC] Florian Blaga - Unveiling the Evolution of Cybersecur...
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Approach and Philosophy of On baking technology
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Advanced Soft Computing BINUS July 2025.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PPTX
MYSQL Presentation for SQL database connectivity
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
[발표본] 너의 과제는 클라우드에 있어_KTDS_김동현_20250524.pdf
PDF
GamePlan Trading System Review: Professional Trader's Honest Take
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
Cloud computing and distributed systems.
PDF
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
PDF
Electronic commerce courselecture one. Pdf
GDG Cloud Iasi [PUBLIC] Florian Blaga - Unveiling the Evolution of Cybersecur...
The AUB Centre for AI in Media Proposal.docx
Approach and Philosophy of On baking technology
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Advanced methodologies resolving dimensionality complications for autism neur...
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Advanced Soft Computing BINUS July 2025.pdf
20250228 LYD VKU AI Blended-Learning.pptx
Unlocking AI with Model Context Protocol (MCP)
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
MYSQL Presentation for SQL database connectivity
NewMind AI Monthly Chronicles - July 2025
[발표본] 너의 과제는 클라우드에 있어_KTDS_김동현_20250524.pdf
GamePlan Trading System Review: Professional Trader's Honest Take
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Dropbox Q2 2025 Financial Results & Investor Presentation
Cloud computing and distributed systems.
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
Electronic commerce courselecture one. Pdf

Build your own_map_by_yourself

  • 1. .. InstructioninBuildingTile ServerandProvidingMap EditorforCrowdsourcing . Build Your Own Map by Yourself! . by . Marc Huang . marchuang41@gmail.com . September 16, 2015
  • 2. .. References . 1. https://switch2osm.org/ This website teaches you how to build tile servers 2. https://github.com/openstreetmap/openstreetmap-website A project to build OpenStreetMap website and API which used Ruby on Rails 3. http://wiki.openstreetmap.org/ OpenStreetMap Wikipedia
  • 4. .. This slide is for... . Introduction . 2/46 1. Who has map data and wants to provide tile servers 2. Who wants to edit map by using editors such as iD, Potlatch 3. Who is interested in building a local OpenStreetMap
  • 6. .. What will we do . Introduction . 4/46
  • 7. .. Contents . Introduction . 5/46 1. Build a tile server 2. Build a website containing map editors, API, and UI 3. Connect two services together
  • 8. .. Environment . Introduction . 6/46 . VirtualBox VM . Ubuntu 12.04 (32-bit) . Memory: 2GB . Storage: 120GB, . Networks: NAT and Host-only Adapter
  • 9. .. My settings . Introduction . 7/46 . User: map . Password: 000000 . ssh installed (sudo apt-get install openssh-server) . Basically, you should know how to get the “ip” of your VM (ifconfig, and it looks like “192.168.x.x”) and how to use “ssh” (ssh map@192.168.x.x) . If you get confused, you probably have to google “virtualbox ubuntu install, virtualbox ssh” . If not, good! Let’s move on!
  • 10. ... Build a Tile Server . 8/46 BuildaTileServer
  • 11. .. Preparing & Software Install . Build a Tile Server . 9/46 . sudo apt-get update . sudo apt-get upgrade . sudo apt-get install subversion git-core tar unzip wget bzip2 build-essential autoconf libtool libxml2-dev libgeos-dev libpq-dev libbz2-dev proj munin-node munin libprotobuf-c0-dev protobuf-c-compiler libfreetype6-dev libpng12-dev libtiff4-dev libicu-dev libboost-all-dev libgdal-dev libcairo-dev libcairomm-1.0-dev apache2 apache2-dev libagg-dev liblua5.2-dev ttf-unifont vim . mkdir src . cd src . wget https://www.dropbox.com/s/a1awl6ua037oy1y/osm2pgsql-0.81.0.zip . wget https://www.dropbox.com/s/vqghx8fbbwq966u/osmosis-bin-0.35.zip
  • 12. .. Install Postgresql/PostGIS . Build a Tile Server . 10/46 . sudo apt-get install postgresql-9.1-postgis postgresql-contrib-9.1 postgresql-server-dev-9.1 Note: you must indicate a version of postgresql or you will get errors (as following block showed) after rebooted your VM Error psql: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket ”/var/pgsql_socket/.s.PGSQL.5432”?
  • 13. .. Set up Postgresql/PostGIS . Build a Tile Server . 11/46 . sudo -u postgres -i . createuser <username> (e.g., my user name is “map” then $ createuser map) . createdb -E UTF8 -O <username> <database> (e.g., $ createdb -E UTF-8 -O map map) . psql -f /usr/share/postgresql/9.1/contrib/postgis-1.5/postgis.sql -d <database> (you will see “CREATE FUNCTION... DROP FUNCTION”) . psql -d <database> -c "ALTER TABLE geometry_columns OWNER TO <username>; ALTER TABLE spatial_ref_sys OWNER TO <username>;" (you will see “ALTER TABLE”)
  • 14. .. Install & Set up osm2pgsql . Build a Tile Server . 12/46 . cd ~/src . unzip osm2pgsql-0.81.0.zip . cd osm2pgsql-0.81.0 . ./autogen.sh . ./configure . make . sudo make install . psql -f /usr/local/share/osm2pgsql/900913.sql -d <database> Note: You can check it by using “osm2pgsql -v”
  • 15. .. Install Mapnik . Build a Tile Server . 13/46 . cd ~/src . git clone git://github.com/mapnik/mapnik . cd mapnik . git branch 2.0 origin/2.0.x . git checkout 2.0 . python scons/scons.py configure INPUT_PLUGINS=all OPTIMIZATION=3 SYSTEM_FONTS=/usr/share/fonts/truetype/ . python scons/scons.py . sudo python scons/scons.py install . sudo ldconfig Note: You can check it by using “python »» import mapnik »» exit()”
  • 16. .. Install mod_tile . Build a Tile Server . 14/46 . cd ~/src . git clone git://github.com/openstreetmap/mod_tile.git . cd mod_tile . ./autogen.sh . ./configure . make . sudo make install . sudo make install-mod_tile . sudo ldconfig
  • 17. .. Install and set up mapnik style-sheet . Build a Tile Server . 15/46 . cd ~/src . svn co http://svn.openstreetmap.org/applications/rendering/mapnik mapnik-style . cd mapnik-style . sudo ./get-coastlines.sh /usr/local/share . cd inc . cp fontset-settings.xml.inc.template fontset-settings.xml.inc . cp datasource-settings.xml.inc.template datasource-settings.xml.inc . cp settings.xml.inc.template settings.xml.inc
  • 18. .. Configuration: setting.xml.inc . Build a Tile Server . 16/46 . sudo vim setting.xml.inc These lines should change as following <!ENTITY symbols "symbols"> <!ENTITY osm2pgsql_projection "&srs900913;"> <!ENTITY dwithin_node_way "&dwithin_900913;"> <!ENTITY world_boundaries "/usr/local/share/world_boundaries"> <!ENTITY prefix "planet_osm">
  • 19. .. Configuration: datasource settings . Build a Tile Server . 17/46 . sudo vim datasource-settings.xml.inc These lines should change as following: <Parameter name="type">postgis</Parameter> <!--<Parameter name="password">%(password)s</Parameter>--> <!--<Parameter name="host">%(host)s</Parameter>--> <!--<Parameter name="port">%(port)s</Parameter>--> <!--<Parameter name="user">%(user)s</Parameter>--> <Parameter name="dbname">map</Parameter> <Parameter name="estimate_extent">false</Parameter> <Parameter name="extent">-20037508,-19929239,20037508,19929239</Parameter> Note: My dbname is “map” and you have to change it to your dbname
  • 20. .. Configuration: fontset settings . Build a Tile Server . 18/46 . sudo vim fontset-settings.xml.inc These lines should change as following: <FontSet name="book-fonts"> <!--<Font face-name="DejaVu Sans Book" />--> <Font face-name="unifont Medium" /> </FontSet> <FontSet name="bold-fonts"> <!--<Font face-name="DejaVu Sans Bold" />--> <Font face-name="unifont Medium" /> </FontSet> <FontSet name="oblique-fonts"> <!--<Font face-name="DejaVu Sans Oblique" />--> <Font face-name="unifont Medium" /> </FontSet>
  • 21. .. renderd configuration . Build a Tile Server . 19/46 . sudo vim /usr/local/etc/renderd.conf This file should looks like as following [renderd] socketname=/var/run/renderd/renderd.sock num_threads=4 tile_dir=/var/lib/mod_tile stats_file=/var/run/renderd/renderd.stats [mapnik] plugins_dir=/usr/local/lib/mapnik/input font_dir=/usr/share/fonts/truetype/unifont font_dir_recurse=1 [default] URI=/osm_tiles/ TILEDIR=/var/lib/mod_tile XML=/home/map/src/mapnik-style/osm.xml HOST=localhost TILESIZE=256 Note: You have to delete all other unused lines in this file.
  • 22. ... Build a Tile Server . 20/46 . sudo mkdir /var/run/renderd . sudo chown map /var/run/renderd . sudo mkdir /var/lib/mod_tile . sudo chown map /var/lib/mod_tile . sudo vim /etc/apache2/conf.d/mod_tile add this line into file “mod_tile” LoadModule tile_module /usr/lib/apache2/modules/mod_tile.so
  • 23. .. Apache configuration . Build a Tile Server . 21/46 . sudo vim /etc/apache2/sites-available/default add these lines after line “webmaster@localhost” LoadTileConfigFile /usr/local/etc/renderd.conf ModTileRenderdSocketName /var/run/renderd/renderd.sock ModTileRequestTimeout 0 ModTileMissingRequestTimeout 30
  • 24. .. Tuning Postgresql and System . Build a Tile Server . 22/46 . sudo vim /etc/postgresql/9.1/main/postgresql.conf change these lines shared_buffers = 128MB checkpoint_segments = 20 maintenance_work_mem = 256MB autovacuum = off . sudo vim /etc/sysctl.conf add this line at the end of file “sysctl.conf” kernel.shmmax=268435456 . sudo reboot Take a break, make a cup of tea :)
  • 25. .. Download map data . Build a Tile Server . 23/46 . mkdir ~/osm . cd osm . wget http://download.geofabrik.de/asia/taiwan-latest.osm.pbf Download a small portion of world map for testing. I live in Taiwan so I download the map of Taiwan)
  • 26. .. Import map data into Postgresql . Build a Tile Server . 24/46 . osm2pgsql --slim -d map -C 1600 --number-processes 2 taiwan-latest.osm.pbf If your osm2pgsql is not version 0.81, you might face errors. pthread_join() returned exception: Throw location unknown (consider using BOOST_THROW_EXCEPTION) Dynamic exception type: boost::exception_detail::clone_impl<boost::exception_detail::current_exception _std_exception_wrapper<std::runtime_error>> std::exception::what: CREATE TABLE planet_osm_point_tmp AS SELECT * FROM planet_osm_point ORDER BY CASE WHEN ST_IsEmpty(way) THEN NULL ELSE ST_GeoHash(ST_Transform(ST_Envelope(way),4326),10) END failed: ERROR: GetProj4StringSPI: Cannot find SRID (4326) in spatial_ref_sy
  • 27. .. Start your tile server . Build a Tile Server . 25/46 . sudo mkdir /var/run/renderd . sudo chown map /var/run/renderd . renderd -f -c /usr/local/etc/renderd.conf If your used ssh you might face a problem ”locale::facet::_S_create_c_locale name not valid”, just execute the following command before you start tile server export LC_ALL="en_US.UTF-8" Now, open a new terminal and execute . sudo /etc/init.d/apache2 restart
  • 28. .. Check your tile server . Build a Tile Server . 26/46 Open your browser and go to: http://localhost/osm_tiles/0/0/0.png If you see a picture of world map then the tile server is working. You can stop renderd process by press Ctrl+c (the original terminal) Otherwise, if any error occured, you have to double check all the configurations and install steps. For example, all the config files in folder “src/mapnik-style/inc”, renderd.conf, and others.
  • 29. .. Create a startup daemon for renderd . Build a Tile Server . 27/46 If everything works well then we are going to create a starup daemon for renderd. . sudo cp ~/src/mod_tile/debian/renderd.init /etc/init.d/renderd . sudo chmod u+x /etc/init.d/renderd . sudo vim /etc/init.d/renderd change these lines and replace “map” to your username DAEMON=/usr/local/bin/$NAME DAEMON_ARGS="-c /usr/local/etc/renderd.conf" RUNASUSER=map . sudo /etc/init.d/renderd start . sudo ln -s /etc/init.d/renderd /etc/rc2.d/S20renderd
  • 30. .. Using your tile server . Build a Tile Server . 28/46 . sudo mkdir /var/www/osm . cd /var/www/osm . sudo wget http://cdn.leafletjs.com/downloads/leaflet-0.7.5.zip This url may change, you can go to http://leafletjs.com/download.html to download the latest version . sudo unzip leaflet-0.7.5.zip . sudo vim index.html
  • 31. ... Build a Tile Server . 29/46 Copy and paste this script to index.html <html> <head> <title>My first tile server</title> <link rel="stylesheet" type="text/css" href="leaflet.css"/> <script type="text/javascript" src="leaflet.js"></script> <style> #map{width:100%;height:100vh} </style> </head> <body> <div id="map"></div> <script> var map = L.map('map').setView([25.555,121.899],7); L.tileLayer('http://192.168.x.x/osm_tiles/{z}/{x}/{y}.png', {maxZoom:18}).addTo(map); </script> </body> </html>
  • 32. .. Check your map . Build a Tile Server . 30/46 Go to: http://192.168.x.x/osm or if you visit from local http://localhost/osm If you were not used map of Taiwan, you should change the initial location (setView([Lag,Lng],7)). Next, we are going to build a map website and provide an editor for users to edit map data by API
  • 33. ... Build an OpenStreetMap Website . 31/46 BuildanOpenStreetMap Website
  • 34. .. Preparing & Software Install . Build an OpenStreetMap Website . 32/46 . cd . sudo apt-get install ruby1.9.1 libruby1.9.1 ruby1.9.1-dev ri1.9.1 libmagickwand-dev libxslt1-dev nodejs apache2-threaded-dev build-essential libpq-dev libsasl2-dev default-jre . sudo gem1.9.1 install bundler
  • 35. .. Install openstreetmap-website . Build an OpenStreetMap Website . 33/46 . git clone https://github.com/openstreetmap/openstreetmap-website.git . cd openstreetmap-website . bundle install . cp config/example.application.yml config/application.yml . cp config/example.database.yml config/database.yml . sudo vim config/image_optim.yml add this line at the end of this file svgo: false
  • 36. .. Create & Set up Database . Build an OpenStreetMap Website . 34/46 . bundle exec rake db:create . psql -d openstreetmap -c "CREATE EXTENSION btree_gist" you will see ”CREATE EXTENSION” . cd db/functions . make libpgosm.so you will see some compiling commands start by ”cc” . cd ../..
  • 37. .. Database Configuration . Build an OpenStreetMap Website . 35/46 . psql -d openstreetmap -c "CREATE FUNCTION maptile_for_point(int8, int8, int4) RETURNS int4 AS '`pwd`/db/functions/libpgosm', 'maptile_for_point' LANGUAGE C STRICT" . psql -d openstreetmap -c "CREATE FUNCTION tile_for_point(int4, int4) RETURNS int8 AS '`pwd`/db/functions/libpgosm', 'tile_for_point' LANGUAGE C STRICT" . psql -d openstreetmap -c "CREATE FUNCTION xid_to_int4(xid) RETURNS int4 AS '`pwd`/db/functions/libpgosm', 'xid_to_int4' LANGUAGE C STRICT" . bundle exec rake db:migrate . bundle exec rake test to ensure that everything is set up properly
  • 38. .. Start Your Webiste . Build an OpenStreetMap Website . 36/46 . bundle exec rails server -b 192.168.x.x if you will browse from local then just execute “bundle exec rails server” Go to http://192.168.x.x:3000, if this website just looks like OpenStreetMap’s website, bravo! Sign up an account and note down your “Display Name” Open a new terminal after you are in the “Check your email!” page
  • 39. .. Managing Users . Build an OpenStreetMap Website . 37/46 . cd openstreetmap-website . bundle exec rails console . » user = User.find_by_display_name(”Your Display Name”) => #[...] . » user.status = ”active” => ”active” . » user.save! => true . » quit Go back to your browser and refresh the page, check if you are logged in. Next, on the top-right corner, select “My settings” and click “oauth settings” then “Register your application” Fill “iD” into “Name”, fill “http://192.168.x.x:3000” into “Main Application URL”, and checked “modify the map” in below Click “Register” and copy the “Consumer key”
  • 40. .. Editor Configuration . Build an OpenStreetMap Website . 38/46 . sudo vim config/application.yml find the “id_key” line, uncomment it and fill the key’ id_key: "VGWM4FlewbJSjLvWbxml5xr45zus8nH0DWKN6yBw" Restart the rail server and go to your website to click “Edit” button (default editor is iD) You will see the iD editor is working.
  • 41. .. Install & Set up Osmosis . Build an OpenStreetMap Website . 39/46 . cd ~/src . wget http://bretth.dev.openstreetmap.org/osmosis-build/osmosis- latest.zip . mkdir osmosis-latest . unzip osmosis-latest.zip -d osmosis-latest . chmod u+x osmosis-latest/bin/osmosis . sudo -u postgres psql . # password . # Enter password:... set a password for “posstgres” . # q
  • 42. .. Import data by API . Build an OpenStreetMap Website . 40/46 . ./osmosis-latest/bin/osmosis --read-pbf ../osm/taiwan-latest.osm.pbf --write-apidb host="localhost" user="postgres" password="Your Password" database="openstreetmap" validateSchemaVersion="no" Note: If your map data version is not 0.6 then you have to use osmosis-0.35 to convert it first.
  • 43. .. The ”duplicate key” problem . Build an OpenStreetMap Website . 41/46 . psql -d openstreetmap execute the following commands SELECT pg_catalog.SETVAL('acls_id_seq', (SELECT MAX(id) FROM acls)) SELECT pg_catalog.SETVAL('changesets_id_seq', (SELECT MAX(id) FROM changesets )) SELECT pg_catalog.SETVAL('client_applications_id_seq', (SELECT MAX(id) FROM client_applications)) SELECT pg_catalog.SETVAL('current_nodes_id_seq', (SELECT MAX(id) FROM current_nodes)) SELECT pg_catalog.SETVAL('current_relations_id_seq', (SELECT MAX(id) FROM current_relations)) SELECT pg_catalog.SETVAL('current_ways_id_seq', (SELECT MAX(id) FROM current_ways)) SELECT pg_catalog.SETVAL('diary_comments_id_seq', (SELECT MAX(id) FROM diary_comments)) SELECT pg_catalog.SETVAL('diary_entries_id_seq', (SELECT MAX(id) FROM diary_entries)) SELECT pg_catalog.SETVAL('friends_id_seq', (SELECT MAX(id) FROM friends)) SELECT pg_catalog.SETVAL('gpx_file_tags_id_seq', (SELECT MAX(id) FROM gpx_file_tags)) SELECT pg_catalog.SETVAL('gpx_files_id_seq', (SELECT MAX(id) FROM gpx_files)) SELECT pg_catalog.SETVAL('messages_id_seq', (SELECT MAX(id) FROM messages)) SELECT pg_catalog.SETVAL('note_comments_id_seq', (SELECT MAX(id) FROM note_comments)) SELECT pg_catalog.SETVAL('notes_id_seq', (SELECT MAX(id) FROM notes)) SELECT pg_catalog.SETVAL('oauth_nonces_id_seq', (SELECT MAX(id) FROM oauth_nonces)) SELECT pg_catalog.SETVAL('oauth_tokens_id_seq', (SELECT MAX(id) FROM oauth_tokens)) SELECT pg_catalog.SETVAL('redactions_id_seq', (SELECT MAX(id) FROM redactions)) SELECT pg_catalog.SETVAL('user_blocks_id_seq', (SELECT MAX(id) FROM user_blocks)) SELECT pg_catalog.SETVAL('user_roles_id_seq', (SELECT MAX(id) FROM user_roles)) SELECT pg_catalog.SETVAL('user_tokens_id_seq', (SELECT MAX(id) FROM user_tokens)) SELECT pg_catalog.SETVAL('users_id_seq', (SELECT MAX(id) FROM users)) q Now you can use iD to edit your own map.
  • 45. .. Change Standard Map to Your Map . Connect Together . 43/46 . sudo vim openstreetmap-website/vendor/assets/leaflet/leaflet.osm.js find all matches of the following texts url: document.location.protocol === 'https:' ? 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png' : 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', replace all to url: 'http://192.168.x.x/osm_tiles/{z}/{x}/{y}.png',
  • 46. .. Change Initial Location of Map . Connect Together . 44/46 . sudo vim openstreetmap-website/app/assets/javascripts/osm.js.erb set your initial Location #mapParams.lon = -0.1; mapParams.lon = 120.1204; #mapParams.lat = 51.5; mapParams.lat = 23.0260; #mapParams.zoom = parseInt(params.zoom || 5); mapParams.zoom = parseInt(params.zoom || 10);
  • 47. .. Update Tile Server . Connect Together . 45/46 . cd . sudo vim update-tile.sh add these commands into it ./src/osmosis-latest/bin/osmosis --read-apidb host="localhost" database="openstreetmap" user="postgres" password="Your Password" validateSchemaVersion="no" --write-xml file=".osm/update.osm" osm2pgsql --slim -d map -C 1600 ./osm/update.osm sudo rm -R /var/lib/mod_tile/default/ sudo /etc/init.d/renderd restart Note: You can execute these commnads separated instead of using shell script. . sudo chmod u+x update-tile.sh . ./update-tile.sh
  • 48. .. Finally . Connect Together . 46/46 If you see the changes of your map on your tile server then everything is working, congratulations! You can download the draft of all install commands here: https://www.dropbox.com/s/oglhsw57slcsybt/install Or, email me: Marc Huang<marchuang41@gmail.com> if you have any questions. Thank you, happy coding.