[OSM-dev] running a local server
graham at theseamans.net
Fri Nov 2 11:31:09 GMT 2007
Wow, thank you! Would it be ok to paste this onto the wiki?
Keith Sharp wrote:
> On Fri, 2007-11-02 at 09:08 +0000, graham wrote:
>> My server is on debian, so I won't use yum directly. But the general
>> idea looks like :
>> - convert planet to postgresql using osm2pgsql
>> - use mapnik to render data from the db on the fly
>> - use tilecache to reduce the load on mapnik
>> So what is the actual server software that interprets the api calls
>> pass to mapnik? Or is that considered trivial/a one-off to write for
>> each new application?
> The hierarchy as I understand it:
> requests for tiles.
> 2) HTTP requests for tiles are received by Apache HTTPD and passed to
> TileCache which executes using mod_python.
> 3) TileCache determines if it already has a rendered tile and if so
> returns that tile in response to the HTTP request in (1).
> 4) If no tile exists TileCache invokes Mapnik to render a tile.
> 5) Mapnik uses the osm.xml file to obtain data from the Postgres/PostGIS
> database. The osm.xml file also contains presentation/style information
> such as road colours and widths, icons for map features etc.
> 6) Mapnik renders a tile based on the combination of the information in
> (5) and passes this tile back to TileCache.
> 7) TileCache writes this tile to disk for reuse in future requests and
> then returns the tile in response to the HTTP request in (1).
> 8) OpenLayers uses the browser to render the tile on the users screen as
> a map.
> 9) The user does something in the map (eg pans or zooms) and the whole
> process starts again.
> the user interface that will be presented in the web browser of the
> end-user. In terms of setting up the backend bits and pieces all you
> need to do is edit the appropriate configuration files.
> You can look at the raw config files for my Fedora slippy map setup in
> my subversion server:
> This directory contains the config for TileCache and for running
> TileCache in Apache. It also contains the osm.xml file for configuring
More information about the dev