[osmosis-dev] Osmosis use case

Frederik Ramm frederik at remote.org
Fri Mar 26 11:48:12 GMT 2010


Hi,

Walschlager, Gerard wrote:
> My question concerns how to do this.  One option would be to use Osmosis 
> to generate a local database containing the XML from “planet.osm” such 
> that it could be queried in a variety of ways quickly.  However, for my 
> simplistic use case of simply extracting a bounding box worth of XML, 
> would Osmosis perform this operation quick enough such that a user of my 
> application could specify the bounding box, Osmosis would extract that 
> bounding box directly from the “planet.osm” file

No. That requires parsing the whole file and I have yet to encounter a 
machine that can do this under 1 hour.

I can think of two ways how you could handle your problem.

1. Import full planet into a PostGIS database using Osmosis' "Simple 
Schema". Then use the -dbb task to extract data from that. I have not 
used that but the data extraction should run quickly. The process the 
extracted data with a renderer of your choice to yield an image.

2. Import full planet into a PostGIS database using osm2pgsql. Then use 
Mapnik directly to render an image for the area of interest.

If all you need is a PNG map image or so, the second option is 
recommended. The first path is less traveled.

Bye
Frederik




More information about the osmosis-dev mailing list