Hi i'm trying to configure the wms server, i read the manual in the
wiki, i did the map_factory [1], ocgserver.conf[2] e wms.py[3] but
when i try python wms.py i have this error

l...@lucacasa:~/prova_mapnik_tile/mapnik$ python wms.py
Traceback (most recent call last):
  File "wms.py", line 24, in <module>
    from mapnik.ogcserver.cgiserver import Handler
  File "/usr/lib/python2.5/site-packages/mapnik/ogcserver/cgiserver.py",
line 29, in <module>
    from wms111 import ExceptionHandler as ExceptionHandler111
  File "/usr/lib/python2.5/site-packages/mapnik/ogcserver/wms111.py",
line 22, in <module>
    from common import ParameterDefinition, Response, Version, ListFactory, \
  File "/usr/lib/python2.5/site-packages/mapnik/ogcserver/common.py",
line 23, in <module>
    from mapnik import Map, Color, Envelope, render, rawdata, Image,
Projection as MapnikProjection, render_to_file, Coord
ImportError: cannot import name rawdata

what's wrong?

thanks
Luca

[1] from mapnik.ogcserver.WMS import BaseWMSFactory

class WMSFactory(BaseWMSFactory):
  def __init__(self):
    BaseWMSFactory.__init__(self)
    self.loadXMl('./mapfile.xml')
    self.finalize()




[2] # $Id$

# server: This section contains software related configuration parameters.

[server]

# module:  The module containing the MapFactory class.  See the readme for
#          details.

module= WMSFactory

# service: This section contains service level metadata.

[service]

# title: The title of the server.

title=Trentino OGC Server

# abstract: An abstract describing the server.

abstract=This abstract describes the server and its contents.

# maxwidth, maxheight: The maximum size that a map will be supplied at.
#                      Exceeding it will raise an error in the client.

maxheight=1024
maxwidth=1024

# allowedepsgcodes:  The comma seperated list of epsg codes we want the server
#                    to support and advertise as supported in GetCapabilities.

allowedepsgcodes=900913,4326

# onlineresource:  A service level URL most likely pointing to the web site
#                  supporting the service for example.  This is NOT the online
#                  resource pointing to the CGI.

onlineresource=http://localhost/

# fees: An explanation of the fee structure for the usage of your service,
#       if any. Use the reserved keyword "none" if not applicable.

fees=

# keywords: A comma seperated list of key words.

keywordlist=trantino, mapnik

# accessconstraints: Plain language description of any constraints that might
#                    apply to the usage of your service, such as hours of
#                    operation.

accessconstraints=italy

# maxage:            The content of the HTTP Cache-Control header -
#                    the maximum age of the content in a cache, measured
#                    in seconds. One week is 604800 seconds, the default is
#                    1 day.

maxage=86400

# contact: Contact information.  Provides information to service users on who
#          to contact for help on or details about the service.

[contact]

contactperson=
contactorganization=
contactposition=

addresstype=
address=
city=
stateorprovince=
postcode=
country=

contactvoicetelephone=
contactelectronicmailaddress=



[3] import sys
from mapnik.ogcserver.cgiserver import Handler
sys.path.append('/home/luca/prova_mapnik_tile/mapnik/map_factory.py')
from jon import fcgi

class OGCServerHandler(Handler):
    configpath = '/home/luca/prova_mapnik_tile/mapnik/ogcserver.conf'

fcgi.Server({fcgi.FCGI_RESPONDER: OGCServerHandler}).run()
_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users

Reply via email to