[OSM-dev] OSM – PostGIS – Mapnik problem!
Graham Jones
grahamjones139 at gmail.com
Mon Feb 20 20:57:02 GMT 2012
Hi,
If you just want to get a basic slippy map working from OSM data, I think
the easiest way to do is to follow the instructions shown here from a
machine running Ubuntu:
http://wiki.openstreetmap.org/wiki/Ubuntu_tile_server
That will deal with the techy bits of setting up the database etc. and set
up the map style used on the main OSM web site, which you could replace
with something of your own - the manik stylesheet is at
/etc/mapnik-osm-data.
That will be a bit like using a black box though - you will get a better
feel for what it is doing by following:
http://wiki.openstreetmap.org/wiki/Mapnik
The way you have done it using a shapefile and QGIS may work, but it is not
the more usual way of rendering OSM data with mapnik - the methods above
take an OSM data file and load it into the postgresql database using
osm2pgsql. Remember to just try it with a small extract first though, not
the whole world...
The data in the database is then rendered into tiles using another program
which utilises the mapnik library - the Mapnik link above uses a scritpt
called generate_tiles.py, which is about the simplest.
I drew a little picture of the process as I was trying to work out how it
worked a while ago - it is included in these slides, which may help you get
up to speed with the different parts of the process:
http://www.slideshare.net/jones139/rendering-openstreetmap-data-using-mapnik
.
If you are going to write your own style sheet for mapnik, I would
recommend looking at carto, which is used by a program called
TileMill<http://mapbox.com/tilemill/> -
it is a different format of stylesheet, which is then converted into the
xml format that mapnik uses. I have not used tilemill itself with OSM data
much though, but I think it works now.
Hope that helps.
Regards
Graham.
--
Graham Jones
Hartlepool, UK.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20120220/5b25fd44/attachment.html>
More information about the dev
mailing list