Osmarender restguide

From OpenStreetMap Wiki
Jump to: navigation, search

The Osmarender restguide perl script uses osmarender to create a restaurant guide (map). It is one of many approaches for putting OSM on Paper. Code is at http://svn.openstreetmap.org/applications/rendering/restguide/ .

This program has been developed using Debian Linux, and may need some changes for non-linux operating systems.

The program uses the old api (0.5), here are my patches for the new version : http://osmopenlayers.blogspot.com/2010/08/getting-resguide-to-run-on-ubuntu.html

Osmarender creates images with tiny sizes embedded in them, so I use pngcrush to resize them. The main problem with this is the scale and copyright are enlarge rediculously by doing this, so I've turned off those options. I created a separate png with the copyright notice, which can be combined with the map image, title, and osm logo using openoffice. This is designed for printing, maps for web pages will use very different paramaters to look good.

The --dpi and --res paramaters control the rescaling. --dpi 1800 --res 300 will produce an 1800 dpi image then rescale to 300 dpi (making it 6 times bigger in each dimention.)

The --lats and --lons paramaters control how big an area to map. They are in degrees, so the values will be pretty small.

The --download paramater tells the script to redownload the data from osm. It downloads an area twice as big as needed, so small position or size changes will not need another download.

As of version 0.2, two new options are added: --poi will create a list of certain types of points of interest, and --sub will substitute names of them. The --poi option will give numbers to the points of interest, sorted by lat an lon. "cut -f1,7" (6 rather than 7 if you have the ealier version without the cuisine column) can be used on this list to get the poi number and name only. You can edit this list if you want a different sort order or don't want some names substitued. You could even put whatever new name you want in column for the poi in column one, like "Our Convention here" for the convention hotel name.

The orp shell script will need to be edited to point to where you have orp installed.

Example:

restguide --lats 0.024 --lons 0.04 --dpi 1800 --res 300 loscon 33.950 -118.380

This example produces a map of the area north of LAX.

Process of creating a restaurant map:

Personal tools
Namespaces
Variants
Actions
site
Toolbox