Using off-the-shelf, free offline utilities and templates to extract and render OSM maps. Presented by Rally de Leon for the State of the Map 2013 Philippines
2. In promoting OSM
to the general public
We always equate OpenStreetMap
with the empowering word: freedom
The data you share to the community, you can
always take-a-share back, in whole or in part,
anytime, with practically no restriction.
3. A good portion of our efforts in promoting OSM
goes into teaching and encouraging people
to collect and contribute data to the community
4. We show wonderful examples...
to dream of the numerous possibilities
in the use of OSM free-access data.
5. We provide tools & techniques
to contribute
In our workshops, we teach
mappers various techniques
to collect geo-data,
to use the editing tools, and
to upload these data to OSM
6. Seeding and Nurturing
OSM Data
Every initial upload of valid data in an area
becomes some sort of a seed that will grow
and attract more people to plant more seeds
until they become a garden of geo-information
Eventually, some local individuals may show
interest and take care of that garden
for and in behalf of the community
8. Juan attends a workshop.
He has the tools to sow the seeds
and manage the garden.
He feels happy. He is excited.
Now, he is ready to harvest.
9. After downloading, Juan dela Cruz realized
he still needs additional hard-to-learn skills
just to make a simple but decent map
or a custom data extract
for his own purpose and consumption.
11. Juan dela Cruz feels he is not
empowered enough
Yes we taught him how to plant seeds
and maintain the garden...
But we have yet to provide
appropriate tools and techniques
for him to properly harvest and process,
and enjoy the fruits of his labor
12. Enablers
Make the mapping-life of Juan easier
by initially providing ready-to-use
tools and templates
to make something useful
out of his harvests.
Simple tools that he can learn to
tweak and fix by himself,
and/or re-purpose later.
13. Keeping solutions simple
using free & off-the-shelf tools
They keep our expectations low,
'coz we don't know if they are going to work ;-)
Maybe these tools are just enough
to get many of our small jobs done.
Or maybe if we are creative enough,
that same tools can actually do much more.
14.
15.
16.
17. My tools
A bunch of free, off-the-shelf, offline utilities to download, edit,
create and render a personalized OSM map
●
Maperitive-2.3.29.zip (6.1 mb)
●
Wget.exe (392 kb) http://www.gnu.org/software/wget/
●
Osmconvert.exe (279 kb) http://wiki.openstreetmap.org/wiki/Osmconvert
●
Osmfilter.exe (122 kb)
●
Gpsbabel.exe (1 mb)
●
JOSM (OSM editor with poly plug-in)
●
Notepad++ (text editor)
http://maperitive.net
http://wiki.openstreetmap.org/wiki/Osmfilter
http://www.gpsbabel.org/download.html
18. Maperitive
It is a free desktop application.
It can work offline. It can render in real time
You can define what gets on the map and how it is painted.
You can also export these maps into bitmaps and SVG
files and print them.
It's practically portable (download, unzip and run)
(required: Windows XP SP3 or later + .NET Framework v4.0 or Mono installation for Mac & Linux)
http://maperitive.net/
22. Sample Work Flow
DOWNLOAD SOURCE from GEOFABRIK
wget downloads “philippines-latest.osm.pbf” from
geofabrik (save to osm source folder)
●
osmconvert converts it to “philippines-latest.osm”
●
23. Create Bounding Polygon
using JOSM (with poly plug-in)
In JOSM, check for existing “admin. boundary”.
Grab it and Save-As poly format (save to
boundary folder)
●
If no “admin. boundary” exists, draw any
bounding polygon shape to approximately cover
the town. Save-As poly format (save to boundary
folder)
●
24. Extract target area using the
bounding polygon
create a batch file that executes the ff:
osmconvert -v (input_file.pbf) -B=(bound.poly)
-o=(output_file.osm)
●
where the input_file=philippines-latest.osm.pbf
Save output_file.osm to MY_MAPS folder inside
Maperitive
●
Take note from hereon: “creating a batch file” means just copying
and modifying any existing batch file/template that does the same.
25. Create Maperitive loading script
(mscript)
Go to folder MaperitiveScripts
●Follow any consistent file format for mscripts
eg. load_(provincial ISO code)_town.mscript
load_(Project Name)_(area_name).mscript
●
mscript loads your custom ruleset, then loads
your “town_map.osm” from MY_MAPS folder
●
Create a repository of batch file that auto-loads
maperitive+mscript
eg. MaperitiveL-O-A-D-M-A-P-S
●
26. Run the batch file. That's it!
Now you have an offline map
which you can update anytime.
27.
28. Will you be annoyed if Juan ask you...?
“I want an OSM POI extract of all the Tricycle
Terminals in my town in CSV format which I can
easily import and manipulate in a spreadsheet.
And I also want the same POI extract to be in
KML format so I can view it in Google Earth.
Aaahh...can I ask another favor? Is it OK if I can
also have it in OSM (node-only) format, so I can
render them separately in Maperitive?” ;-)
29. Extracting and exporting POI's to
CSV, KML & OSM formats
Ensure you have your town boundary poly file.
●
There's a custom folder inside Maperitive
MY_POI_EXTRACTMY_SCRIPTS
●
Look for any batch file with the filename format
EXTRACT_(ISOcode)_(town)_(POIname).bat
●
Every EXTRACT batch file is paired with a
corresponding filter.txt
eg. filter_(POIname).txt
●
30.
31. Extracting and exporting POI's to
CSV, KML & OSM formats
Use any existing pair of “batch file and filter”
inside MY_POI_EXTRACTMY_SCRIPTS as
your template.
●Edit both files accordingly (using Notepad++)
●Save. Run. Done.
●
32. For every “Juan dela Cruz” we empower,
they may become active and explore more,
go farther, think of possibilities,
join the army of mappers,
and ready to help others.
33. Pay it forward
Giving and providing
ENABLING TOOLS
to other lesser-skilled volunteers
can also be a way
of saying thank you
for taking care of our garden
:-)