Skip to content
This repository has been archived by the owner on Oct 14, 2022. It is now read-only.

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
OSMPS - a PostScript renderer for OpenStreetMap files
=====================================================

OSMPS generates Encapsulated PostScript files from OSM XML files.
Rules for generating parts of the output are currently contained
within the program and describe PostScript code to be utilised for
particular tags.

PostScript is sent to standard output. Typical usage would be

  osmps.rb map.osm > map.ps

as a subsequent step a PDF file may be generated with the common
ps2pdf tool (which is a wrapper around GhostScript), or with Adobe
Distiller.

  ps2pdf map.ps

Internal data structure
-----------------------

OSMPS possibly uses an odd method of processing the data. First
nodes and segments are read from the file. Ways are then read but
the tags are purely "pushed down" onto the segments that are in
each way. Finally, paths are created from adjacent segments that
are (a) pointing in the same direction and (b) have exactly the
same tag set.

Features
--------

Current features include basic areas, roads, simple bridges and
road names. Planned next are oneway arrows and more node logos,
and hopefully code to paginate maps easily (think easily print an
"A-Z" book type town map from OSM).

Logos
-----

The pslogos directory contains a font designed with FontForge that
has glyphs to be used as some logos on the map. The .sfd file is
the FontForge source - this is then generated into a .pfa
PostScript Type1 font which is copied into logos.eps and osmps.rb
itself. A small PostScript function is written for each character
to set the colours and draw it correctly.

Matthew Newton
29 July 2007


Changelog:

0.01    - 2007-03-20
          initial release

0.02    - 2007-07-29
          fixed scaling issues
          rendering updates, including logos for some nodes
          style updates and additions
          move importosm to be a method of the Graph object
          several other bugfixes and tweaks

0.02.1  - 2007-08-09
          added highway=pedestrian style
          tweaked highway style gen code and added a few comments :)

0.03    - 2007-10-15
          converted for OSM data version 0.5

0.03.1  - 2008-01-03
          add setpagedevice to set output size correctly
          update some styles
          add capability for dashed lines in styles

0.04    - 2008-01-07
          add ability to define output area (for example to easily
            produce multi-page map booklets)