[OSM-dev] mapnik and windows
Jan-Benedict Glaw
jbglaw at lug-owl.de
Sun Jan 4 17:04:04 GMT 2009
On Fri, 2009-01-02 23:49:54 +0100, Damian Proksch <damian.proksch at gmx.de> wrote:
> I'd done a search and replace because the "customize...." script don't
> work under windows.
Even the "customize" script needs to be customized matching your
PostgreSQL/PostGIS database setup.
> UserWarning: PSQL error:
> could not translate host name "%DBHOST%" to address: Unknown host in layer 'leis
> ure'
The XML files contains a good number of SELECT statements, all being
surrounded by database configuration. You need to change /all/ of
them, with working values.
So for a start, you need PostgreSQL running, create a database,
install the PostGIS extensions to that database, then use osm2pgsql to
import some OSM data (eg. germany.osm from GeoFabrik). In case the
database is locally available (which should be the right thing for
some 99% of all installations...), you'll probably want to use a
config like this:
s#<Parameter name="host">%DBHOST%</Parameter>#<Parameter name="host">/var/run/postgresql</Parameter>#
s#<Parameter name="dbname">%DBNAME%</Parameter>#<Parameter name="dbname">gis</Parameter>#
/<Parameter name="port">%DBPORT%<\/Parameter>/d
/<Parameter name="user">%DBUSER%<\/Parameter>/d
/<Parameter name="password">%DBPASS%<\/Parameter>/d
> In my opinion this is not an error, only a warning.
It's a hard error: With no connection to the database, Mapnik at least
will /not/ render anything that's inside the OSM database...
> I try to run mapnik local.
> My problem is that nothing happens and the lines
>
> C:\mapnik-0_5_1>generate_tiles.py
> render_tiles( (9.4913900000000009, 47.618609999999997, 9.7411100000000008, 47.72
> 6390000000002) I:/OSM_Karten/mapnik/xml/osm.xml I:/OSM_Karten/mapnik/Tiles/ 10 1
> 4 test )
> Traceback (most recent call last):
> File "C:\mapnik-0_5_1\generate_tiles.py", line 171, in <module>
> render_tiles(bbox, mapfile, tile_dir, 10, 14 , "test")
> File "C:\mapnik-0_5_1\generate_tiles.py", line 53, in render_tiles
> load_map(m,mapfile)
Call it once like
python -t generate_tiles.py
which will give us a nice trace to see what it is doing.
> say, maybe, that something goes wrong, but I don't know what, because
> I don't know nothing about Python.
I've never used it with Windows. Maybe the trailing slash in the
output path is a problem? But lets just have a look at the trace.
MfG, JBG
--
Jan-Benedict Glaw jbglaw at lug-owl.de +49-172-7608481
Signature of: Alles sollte so einfach wie möglich gemacht sein.
the second : Aber nicht einfacher. (Einstein)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20090104/31f8495a/attachment.pgp>
More information about the dev
mailing list