[Talk-gb-midanglia] mapnik style sheet

Philip Howarth Philip at Howarth.name
Sat May 9 16:36:27 BST 2009


Mark,

Well that is pretty much what started this quest. I have prototyped a little
application (Windows, C#) - you give it all the obvious things like page
size, bounding box, scale and a few other things like amount of page
overlap, page numbering ... It then reads the tiles from your choice of
location (OSM-mapnik, osmarender, somewhere else), stitches them together
and produces a PDF document which you can obviously then print if you want.
It is only set up to do A4 and A3 pages at the moment but no bid deal to
change that. I guess for a fee, local print shop services would print to
larger sizes than can be found on the average home/office printer. Having a
friend with a roll printer sounds much better though :)

It is singularly unreliable at the moment - having been hacked together by
me - with  only the faintest notion of object oriented programming and a
need to look up the syntax for every little thing. I got sidetracked by
rendering as the standard mapnik and osmarenders are great but seem geared
towards on-line viewing. I want something with a greater density of
information to use when touring/cycling/walking. (I guess everyone wants
something slightly different!)

Back to beating up osm2pgsql...

           Philip



2009/5/9 Mark Williamson <maw48 at cantab.net>

> On Saturday 09 May 2009 12:32:34 Tristan Scott wrote:
> > I second the idea of a easy rendering guide - I've been considering
> > printing maps for a while (I have a friend with a 24" wide x 10m roll
> > printer)
>
> Sounds like a great idea; actually I've often wished there was an OSM print
> service - send in your co-ordinates and rendering preferences and get back
> a
> poster-size (or folded, for use in the field) render of the OSM data for an
> area.  I'd think people would even pay / donate money for this!
>
> Cheers,
> Mark
>
> > However, I have experimented (admittedly not very much) with the idea
> > of generating the appropriate big SVG file, or even a raster image,
> > but met with no sucess. There seems to be so many things to know that
> > are not written down anywhere, and you have found!
> >
> > Tristan Scott BSc(Hons)
> > 07837 205829
> >
> > 2009/5/9 Philip Howarth <Philip at howarth.name>:
> > > Steve,
> > >
> > > I believe I've found the main problem. I didn't use a default.style
> sheet
> > > with osm2pgsql.  (I didn't know I was supposed to.)
> > >
> > > This has left the database without a number of columns for things like
> > > 'construction' (used to mark unfinished roads, I believe). Any mapnik
> > > Style which refers to one of these missing columns, then fails
> silently.
> > > This is further confused because mapnik may only look for these columns
> > > at certain zoom levels - so the Style works at some zooms and not
> others.
> > >
> > > So, I will go back and repopulate my database...
> > >
> > > One minor snag - the ubuntu packaged osm2pgsql is V0.52 and I believe
> the
> > > latest is actually V0.55.  Do you (or anyone) know if this will cause
> any
> > > issue? (I don't think I can face learning how to compile the whole
> thing
> > > from source. Not just yet, anyway.)
> > >
> > > The default.style I have found is Rev 14703 at
> > >
> http://trac.openstreetmap.org/browser/applications/utils/export/osm2pgsql
> > >/default.style Which you checked in 2 weeks ago - so I'm hoping will be
> > > OK!
> > >
> > > There is clearly an opportunity for a Ladybird book on rendering - the
> > > barriers to getting started seem very high to non software gurus like
> me!
> > >
> > > Regards,
> > >
> > >     Philip
> > >
> > > 2009/5/8 Steve Chilton <S.L.Chilton at mdx.ac.uk>
> > >
> > >> Philip
> > >>
> > >>
> > >>
> > >> Have you had any luck with sorting things out?
> > >>
> > >> I maintain the mapnik stylesheet that is used by the main site, which
> is
> > >> the one that you seem to have picked from SVN.
> > >>
> > >> It would help to see examples of things that are not right if
> possible.
> > >>
> > >>
> > >>
> > >> Cheers
> > >>
> > >> STEVE
> > >>
> > >>
> > >>
> > >>
> > >>
> > >> ________________________________
> > >>
> > >> From: talk-gb-midanglia-bounces at openstreetmap.org
> > >> [mailto:talk-gb-midanglia-bounces at openstreetmap.org] On Behalf Of
> Philip
> > >> Howarth
> > >> Sent: 06 May 2009 20:41
> > >> To: osm-midanglia
> > >> Subject: [Talk-gb-midanglia] mapnik style sheet
> > >>
> > >>
> > >>
> > >> I finally got round to revamping my old PC (and was pleasantly
> surprised
> > >> at how easy Ubuntu is to get going from scratch).
> > >>
> > >> After considerable head-scratching, it is now rendering a UK snapshot
> > >> from OSM data using mapnik and serving the tiles via apache (just
> > >> locally).
> > >>
> > >> However, the rendering that I see is not the same as on the OSM slippy
> > >> map  - with problems of very strange changes of things like road
> colour
> > >> when I zoom in beyond certain levels. It looks (bear in mind I know
> > >> virtually nothing about how manik rendering really works!) as if the
> > >> road casing is being drawn but not the fill. eg trunk roads appear the
> > >> usual pale green at low zooms and suddenly go very dark green as I
> zoom
> > >> in. Similar effects on primary roads (which go dark red).
> > >>
> > >> I wonder if the osm-template.xml template that I got from
> > >> http://svn.openstreetmap.org/applications/rendering/mapnik/
> > >> is correct / up to date? Or am I likely to have some other issue?
> > >>
> > >> I have played around, hacking the resulting OSM.xml, and I can
> certainly
> > >> change the map appearance radically (!) but my, as yet, somewhat
> random
> > >> hacking is a very slow learning route.
> > >>
> > >> If anyone has any knowledge or can point me at rather more digestible
> > >> sources of information than any of the many that I've read so far, I'd
> > >> be very grateful.
> > >>
> > >>     Philip
> > >>
> > >> --
> > >> Philip Howarth
> > >> Cambridge UK
> > >> email: Philip at Howarth.name
> > >
> > > --
> > > Philip Howarth
> > > Cambridge UK
> > > email: Philip at Howarth.name
> > >
> > > _______________________________________________
> > > Talk-gb-midanglia mailing list
> > > Talk-gb-midanglia at openstreetmap.org
> > > http://lists.openstreetmap.org/listinfo/talk-gb-midanglia
> >
> > _______________________________________________
> > Talk-gb-midanglia mailing list
> > Talk-gb-midanglia at openstreetmap.org
> > http://lists.openstreetmap.org/listinfo/talk-gb-midanglia
>
>
> _______________________________________________
> Talk-gb-midanglia mailing list
> Talk-gb-midanglia at openstreetmap.org
> http://lists.openstreetmap.org/listinfo/talk-gb-midanglia
>



-- 
Philip Howarth
Cambridge UK
email: Philip at Howarth.name
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/talk-gb-midanglia/attachments/20090509/261dc5ed/attachment.html>


More information about the Talk-gb-midanglia mailing list