[osmosis-dev] Osmosis use case

Frederik Ramm frederik at remote.org
Fri Mar 26 13:44:13 GMT 2010


Hi,

Walschlager, Gerard wrote:
> The bottom line for my investigation of mapping tools is that I need
> to have a local database of the world to perform lookups and
> rendering of maps on a "standard" Windows based desktop computer in a
> reasonably quick fashion (i.e. pan/zoom operations complete in 1 to 5
> seconds).
> 
> Performance wise, for my scenario, I'm not sure which would be
> better: rendering as tiled images or rendering as SVG.

> My application will be using WPF which can render XAML based graphic
> paths, which can be derived from SVG.  There is a utility called
> Osmarender that I've heard of and I understand it can render to SVG.

There is a rather large gap between your ambitions and your current 
knowledge ;-)

Mapnik can be made to render any section of the planet to an image in 5 
seconds but you will need to tweak the style sheet somehow. Rendering to 
XML is possible but the XML that Mapnik produces is highly complex and 
it is not unlikely that you'll stretch the capabilites of your library 
with it (go to www.openstreetmap.org and use the export tab to generate 
SVG, and try that out).

Osmarender is too slow for your purpose.

There's no reason why you must use tiled images. You can also make 
Mapnik render exactly the section you need.

> I think
> Osmarender would work with a MySQL database.

No, Osmarender does not use databases at all.

> Would you guess if
> rendering as SVG and then converting to XAML be faster than working
> with images rendered on-the-fly?

My guess is: slower by a factor of 5.

> If I go with rendering as tiled images, then I have to consider
> rendering on-the-fly or pre-rendering in advance.

It is probably a bit painful to get Mapnik + Postgres running properly 
on a Windows machine, *especially* if that machine is somewhere at your 
user's site and not fully controlled by you. Tiles are, in contrast, 
dead-easy. They only have one drawback: There are a lot of them.

> If I pre-rendered
> in advance, then I suppose I would run Mapnik over the entire
> osm2pgsql generated database and that would in turn generate yet
> another database of tiled images?

No, it generates individual files, not a database. If you want to cover 
the whole planet at zoom level 18 you will need to produce about 100 
billion tiles and they will together use about 100 Terabytes of storage. 
  This means you will have to think more about what you really need.

> Any thoughts on size of a database
> of 256x256 PNG images for entire "planet.osm" contents?  Or, is
> rendering on-the-fly going to allow me to perform my rendering of
> user requests in a few seconds?

Probably, if nobody else uses the machine.

Can you not simply download tiles from a web service? That would solve a 
hell of a lot of problems for you.

Bye
Frederik




More information about the osmosis-dev mailing list