[OSM-talk] osm2shp or osm2pgsql

Andy Allan gravitystorm at gmail.com
Tue Dec 11 14:11:09 GMT 2007


On Dec 11, 2007 1:09 PM, The Bun <rosario.carbone at ipl.com> wrote:

> I have no problem I can use a database though I'd prefer to avoid and handle
> just images as files.

OK, here's a few guides:

A) Getting a map on your own website
* Use OpenLayers on any html page. Have a look at the source of any
OSM website to see different ways to get it working. You can use any
of the existing tileservers, as far as I'm aware nobody will mind.

B) Creating your own tiles using mapnik and generate_tiles.py
* Download the planet file from planet.openstreetmap.org
* Import into a PostGIS database using osm2pgsql
* setup mapnik and test using osm.xml and the generate_image.py
* When everything works, use generate_tiles.py to create 1000s of
tiles in a special hierarchy of folders
* Copy/move tiles into your webserver's document root.
* Change the OpenLayers from A) to use your own tileserver instead of
the main one

C) Creating your own tiles using mapnik and tilecache
* Download the planet file from planet.openstreetmap.org
* Import into a PostGIS database using osm2pgsql
* setup mapnik and test using osm.xml and the generate_image.py
* setup tilecache to render tiles on-demand
* Change the OpenLayers from B) to use your own tilecache server
instead of the pre-rendered tiles

Each option gets harder as it goes along. If you're struggling, I'd
suggest making sure you know how to get A) working first, then B),
then C). Most websites with OSM use A), more or less. The cycle map
uses B), more or less. The mapnik layer on the main website uses C),
more or less.

Each step is fairly involved, but I don't have time to write a how-to
for every one of them. I hope this helps you though.

Thanks,
Andy




More information about the talk mailing list