All,
I am having the damnedest time getting OGCServer up and running on my
Windows server. Here's what I've got so far.
*cgi-bin/wms.py*
#!/usr/bin/env python -u
import sys
from mapnik.ogcserver.wsgi import WSGIApp
# from mapnik.ogcserver.modserver import ModHandler
sys.path.append('C:/Program Files (x86)/Apache/cgi-bin')
# application = ModHandler('C:/Program Files
(x86)/Apache/cgi-bin/ogcserver.conf')
application = WSGIApp('C:/Program Files
(x86)/Apache/cgi-bin/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()
*cgi-bin/map_factory.py*
#!/usr/bin/env python -u
from mapnik.ogcserver.WMS import BaseWMSFactory
class WMSFactory(BaseWMSFactory):
def __init__(self):
BaseWMSFactory.__init__(self)
self.loadXML('C:/Program Files (x86)/Apache/cgi-bin/osm.xml')
self.finalize()
*cgi-bin/ogcserver.conf*
# module: The module containing the MapFactory class. See the readme for
# details.
# This would be the name of the map_factory file (without extension .py)
module=map_factory
There is a lot more in the .conf file but you get the idea...
My goal here is to serve up my own OSM tiles using ogcserver but when I view
the data in OpenLayers (
http://localhost:8000/?LAYERS=osm&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A4326&BBOX=90,0,180,90&WIDTH=256&HEIGHT=256)
I get the following error in my XML response.
XML Parsing Error: no element found Location:
moz-nullprincipal:{7c4d5cef-42fc-4fe8-a12e-82b7e6256b36} Line Number 1,
Column 1:
In QGIS, I am able to pass in the url (http://localhost:8000) which gives me
the entire list of the OSM data (via GetCapabilities) I have stored in
Postgres/PostGIS.When I finalize the WMS setup in QGIS, I get an error with
no values at all so it's hard to debug in that environment.
I am also able to get the Capabilities list from my mini-WMS in ArcGIS, but
not data is being returned. Can anyone suggest what I may be doing wrong
here? I am using the latest and greatest version of everything so I really
don't know what might be messing up.
Thanks in advance,
Adam
_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users