[OSM-talk] PostScript renderer

matthew-osm at newtoncomputing.co.uk matthew-osm at newtoncomputing.co.uk
Sun Mar 18 02:28:47 GMT 2007


Hi all,

As hinted a few days ago...

On Wed, Mar 07, 2007 at 12:12:57AM +0000, matthew-osm at newtoncomputing.co.uk wrote:
> On Tue, Mar 06, 2007 at 09:26:11PM -0000, David Earl wrote:
> > Artem and I discussed the possibility of putting in a native
> > PostScript back end to mapnik while in Oxford on Saturday. While
> > there are other routes,
> 
> Huh, typical. I start writing a PostScript renderer yesterday, and
> today this is announced... ;-)

Output from the first version is available for viewing at:

  http://dl.newtoncomputing.co.uk/lboro.pdf (120k) [ps2pdf converted]
  http://dl.newtoncomputing.co.uk/lboro.ps  (1M)

It's nowhere near finished yet, but I think it looks quite nice. Maybe
there is a use for it, maybe not. I just like hacking PostScript, so
this seemed a sensible merge of two enjoyable things :-).

Notes:

  There is a distinct lack of text. That's because it doesn't do any
  yet...

  Bridges are missing. Due to the (hopefully) cunning way I'm handling
  segments[1], when this gets added it should cope with, say, a road
  that goes in a circle and bridges over itself, which I don't think
  current renderers can do without layer hacks.

  The PS is not Adobe DSC compliant yet. I know how to, but the first
  priority was to get something that worked...

  The renderer is written in Ruby. (This makes things slightly
  interesting as Ruby seems determined to ensure that the hash key
  enumeration order is decidedly non-deterministic between
  invocations...)

I'll put the renderer in SVN at some point when I'm happier with it. I
want to make it easier to put styles on things, rather than say that
the style for "highway=motorway" is 
  "1 lw 0 0 0 c pathcopy line"
  "0.7 lw 35 35 255 c pathcopy line"   ;-)

-- 
Matthew


[1] Actually, rather "not handling ways" - I push all data down to the
segments and then build up paths from these if they are adjacent and
the tags match.





More information about the talk mailing list