Dear List,

First, my appologies that I am completely new to Mapnik. Any help is useful to
me.

I've recently tried to set up a map server using MS-Windows 2003 server (std
ed). So I've followed installation procedures on
http://wiki.openstreetmap.org/index.php/Mapnik

Installed:
PostgresSQL 8.3 with PostGIS 1.3.3 extension
Some map information for UK imported to PostGIS using osm2pgsql
Python2.5 on C:\python25
ActivePerl5.10 on C:\Perl
mapnik-0_5_1 Win32 binary (Unzipped) and put in c:\mapnik-0_5_1
Copied the site-packages to c:\python25\Lib\site-packages
Set the path to include c:\Python25, etc.

The " from mapnik import * " runs fine in python
Then test with demo\python\rundemo.py runs perfectly with 3 images of
easter canada (ottawa, montreal) generated. So far so good!

I then

Downloaded mapnik scripts (svn.openstreetmap.org/applications/rendering/mapnik)
and put in d:\mapnik

unzip (http://tile.openstreetmap.org/world_boundaries-spherical.tgz and
       http://hypercube.telascience.org/~kleptog/processed_p.zip) to
:\mapnik\world_boundaries\

After modifying the set-mapnik-env to set-mapnik-env.bat (with export changed to
SET in DOS batch scripts and call %* to run arguments)

The " set-mapnik-env.bat customize-mapnik-map.pl > osm.xml " command in DOS
prompt succeeded (no errors given).

But when do command " set-mapnik-env.bat generate_image.py "
The python gives an error saying this

=====================================================
D:\mapnik>set-mapnik-env.bat generate_image.py
 got exception ...
Traceback (most recent call last):
  File "D:\mapnik\generate_image.py", line 37, in <module>
    load_map(m,mapfile)
RuntimeError: failed opening file: The handle is invalid.
=====================================================

The same RuntimeError occurs when I try " set-mapnik-env.bat generate_tiles.py "

and too with the hello_world python with XML mapfile example from
http://trac.mapnik.org/wiki/ExampleCode

I tried to look at the source code of load_map() function from
http://prdownload.berlios.de/mapnik/mapnik_src-0.5.1.tar.gz

But failed to understand why load_map() from load_map.cpp would fail.

As far as I understand, it seems like an error trying to open mapfile (which set
to d:\mapnik\osm.xml in set-mapnik-env.bat) from the python error message. And I
double-checked that the osm.xml is there.

Any ideas?


Kind regards,

Po
[EMAIL PROTECTED]


_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users

Reply via email to