Hello Mapnik Users!
I'm a newbie in need of some help. I have a PostGIS DB with the data from
OpenStreetMap.org loaded into it, Mapnik and Tilecache installed and can get
tiles back if I use a URL in the z/x/y.png form. However, I would like to be
able to use WMS requests to retrieve the images, which is where Mapnik's WMS
support comes in.
However, I have hit a couple of problems. The first is that I tried running
the ogcserver script from the command line to test its output and I got the
following output:
jonpy error: ArgumentError at Thu Jun 26 11:42:45 2008
ArgumentError: Python argument types in
Layer.__init__(Layer)
did not match C++ signature:
__init__(_object*, std::string)
__init__(_object*, std::string, std::string)
/var/www/cgi-bin/WMSFactory.py in __init__(self=<WMSFactory.WMSFactory
instance at 0x2b7c9df23e18>)
15 self.register_style('style1', sty)
16
17 lyr = Layer(name='osm', type='shape', \
18
file='/usr/local/mapnik_rendering/world_boundaries/world_boundaries_m')
19
20 lyr.styles.append('style1')
21 self.register_layer(lyr)
file undefined
/usr/lib64/python2.4/site-packages/mapnik/ogcserver/cgiserver.py in
__init__(self=<__main__.OGCServerHandler object at 0x2b7c9df1a350>)
44 except ImportError:
45 raise ServerConfigurationError('The factory module could
not be loaded.')
46 if hasattr(mapfactorymodule, 'WMSFactory'):
47 self.mapfactory = getattr(mapfactorymodule,
'WMSFactory')()
48 else:
49 raise ServerConfigurationError('The factory module does
not have a WMSFactory class.')
50 if conf.has_option('server', 'debug'):
self = <__main__.OGCServerHandler object at 0x2b7c9df1a350>, self.mapfactory
undefined, getattr undefined, mapfactorymodule = <module 'WMSFactory' from
'/var/www/cgi-bin/WMSFactory.py'>
/usr/lib/python2.4/site-packages/jon/cgi.py in
process(self=<jon.cgi.CGIRequest object at 0x2b7c9df1a2d0>)
614 """Read the CGI input and create and run a handler to handle the
request."""
615 self._init()
616 try:
617 handler = self._handler_type()
618 except:
619 self.traceback()
620 else:
handler undefined, self = <jon.cgi.CGIRequest object at 0x2b7c9df1a2d0>,
self._handler_type = <class '__main__.OGCServerHandler'>
Content-Type: text/html; charset=iso-8859-1
<html><head><title>Error</title></head>
<body><h1>Error</h1>
<p>Sorry, an error occurred. Please try again later.</p>
My other concern is that when I try to access ogcserver through a browser
(ie. entering a URL like
http://localhost/cgi-bin/ogcserver?VERSION=1.1.1&REQUEST=GetCapabilities&SERVICE=WMS)
I just get the contents of the ogcserver file and not the html output given
from the command line. Is this file meant to be used in this way or have I
just got something not set up correctly in my Apache config? I'm using
CentOS 5 and Apache 2.2.3, if that makes a difference.
My apologies if I'm posting problems that have already been answered. I have
had a look around in the mailing list archives and couldn't find a solution
to my problem.
Thanks in advance,
Jarrod
_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users