On launching wms.py the following error appears:

Traceback (most recent call last):
  File "c:\ms4w\Apache\htdocs\wms\wms.py", line 21, in <module>
    application = WSGIApp('C:/ms4w/Apache/htdocs/wms/ogcserver.conf')
  File "C:\mapnik_0_7_0\python\2.5\site-packages\mapnik\ogcserver\wsgi.py",
line
 44, in __init__
    self.mapfactory = getattr(mapfactorymodule, 'WMSFactory')()
  File "C:\ms4w\Apache\htdocs\wms\xml_factory.py", line 7, in __init__
    self.loadXML('C:/ms4w/Apache/htdocs/wms/population.xml')
  File "C:\mapnik_0_7_0\python\2.5\site-packages\mapnik\ogcserver\WMS.py",
line
52, in loadXML
    load_map (tmp_map, xmlfile, strict)
RuntimeError: C:/ms4w/Apache/htdocs/mapnik/wms/data/thematic_mapping_world
does
not exist (encountered during parsing of layer 'countries')

I have installed OGC Server as written in the following documentation:
http://trac.mapnik.org/wiki/OgcServer

The following files were configured:

######### wms.py ############
import sys
from mapnik.ogcserver.wsgi import WSGIApp
sys.path.append('c:/ms4w/Apache/htdocs/wms/')

application = WSGIApp('c:/ms4w/Apache/htdocs/wms/ogcserver.conf')


if __name__ == '__main__':
    from wsgiref.simple_server import make_server
    httpd = make_server('localhost', 8000, application)
    print "Listening on port 8000...."
    httpd.serve_forever()

####### ogcserver.conf #########
[server]
module= xml_factory
debug=1

[service]
title=MapnikOGC
abstract=The Mapnik OGC Server Sample Configuration
maxheight=2048
maxwidth=2048
# 3031 is an antarctica polar projection
allowedepsgcodes=3031,4326,3395,900913

#onlineresource=http://localhost:8888/
fees=
keywordlist=mapnik
accessconstraints=

[contact]
contactperson=
contactorganization=
contactposition=
addresstype=
address=
city=
stateorprovince=
postcode=
country=
contactvoicetelephone=
contactelectronicmailaddress=

######### xml_factory.py ########
from mapnik.ogcserver.WMS import BaseWMSFactory
from mapnik import *

class WMSFactory(BaseWMSFactory):
  def __init__(self):
    BaseWMSFactory.__init__(self)
    self.loadXML('c:/ms4w/Apache/htdocs/wms/population.xml')
    self.finalize()

##### apache httpd.conf ####

<Directory "/ms4w/Apache/htdocs/wms/">
  PythonPath "['c:\ms4w\Apache\htdocs\wms\'] + sys.path"
  AddHandler mod_python .py
  PythonHandler wms
</Directory>



------------------------------------------------------
Ozodbek Ulmasov
Manager

Newmax Technologies LLC
Uzbekistan, Tashkent
Parkentskaya str. 89b, 700007
Tel: (+99897) 3447775
     (+99871) 1401515
Fax: (+99871) 1401515
E-mail: [email protected]
_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users

Reply via email to