33
Using off-the-shelf free offline utilities and templates to extract and render custom OSM maps

Maperitive

Embed Size (px)

DESCRIPTION

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

Citation preview

Page 1: Maperitive

Using off-the-shelf free offlineutilities and templates to extract and rendercustom OSM maps

Page 2: Maperitive

In promoting OSMto 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.

Page 3: Maperitive

A good portion of our efforts in promoting OSM goes into teaching and encouraging people

to collect and contribute data to the community

Page 4: Maperitive

We show wonderful examples...to dream of the numerous possibilities

in the use of OSM free-access data.

Page 5: Maperitive

We provide tools & techniquesto contribute

In our workshops, we teach mappers various techniques

to collect geo-data,to use the editing tools, andto upload these data to OSM

Page 6: Maperitive

Seeding and NurturingOSM Data

Every initial upload of valid data in an areabecomes 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 gardenfor and in behalf of the community

Page 7: Maperitive

Juan dela Cruz

http://andrewchen.tumblr.com/image/1205461293

Page 8: Maperitive

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.

Page 9: Maperitive

After downloading, Juan dela Cruz realized he still needs additional hard-to-learn skills

just to make a simple but decent mapor a custom data extract

for his own purpose and consumption.

Page 10: Maperitive

Disillusionment

Page 11: Maperitive

Juan dela Cruz feels he is not empowered enough

Yes we taught him how to plant seedsand 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

Page 12: Maperitive

Enablers

Make the mapping-life of Juan easierby 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.

Page 13: Maperitive

Keeping solutions simpleusing 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 enoughto get many of our small jobs done.

Or maybe if we are creative enough, that same tools can actually do much more.

Page 14: Maperitive
Page 15: Maperitive
Page 16: Maperitive
Page 17: Maperitive

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) http://maperitive.net

● Wget.exe (392 kb) http://www.gnu.org/software/wget/

● Osmconvert.exe (279 kb) http://wiki.openstreetmap.org/wiki/Osmconvert

● Osmfilter.exe (122 kb) http://wiki.openstreetmap.org/wiki/Osmfilter

● Gpsbabel.exe (1 mb) http://www.gpsbabel.org/download.html

● JOSM (OSM editor with poly plug-in)● Notepad++ (text editor)

Page 18: Maperitive

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/

Page 19: Maperitive

Maperitive

Page 20: Maperitive
Page 21: Maperitive
Page 22: Maperitive

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”

Page 23: Maperitive

Create Bounding Polygonusing 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)

Page 24: Maperitive

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.

Page 25: Maperitive

Create Maperitive loading script (mscript)

●Go to folder \Maperitive\Scripts●Follow any consistent file format for mscriptseg. 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+mscripteg. \Maperitive\L-O-A-D-M-A-P-S\

Page 26: Maperitive

Run the batch file. That's it! Now you have an offline map

which you can update anytime.

Page 27: Maperitive
Page 28: Maperitive

“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?” ;-)

Will you be annoyed if Juan ask you...?

Page 29: Maperitive

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_EXTRACT\MY_SCRIPTS

●Look for any batch file with the filename formatEXTRACT_(ISOcode)_(town)_(POIname).bat

●Every EXTRACT batch file is paired with a corresponding filter.txt eg. filter_(POIname).txt

Page 30: Maperitive
Page 31: Maperitive

Extracting and exporting POI's to CSV, KML & OSM formats

●Use any existing pair of “batch file and filter” inside \MY_POI_EXTRACT\MY_SCRIPTS as your template.●Edit both files accordingly (using Notepad++)●Save. Run. Done.

Page 32: Maperitive

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.

Page 33: Maperitive

Pay it forward

Giving and providingENABLING TOOLS

to other lesser-skilled volunteerscan also be a way

of saying thank youfor taking care of our garden

:-)