{"comment":{"created_at":"2011-10-09T20:15:19Z","body":"[springmeyer] Thanks theosys for the latest patch. I reworked considerably to avoid the double registration of layers and styles (as noted by tmcw).\r\n\r\nClosing now, as I've added load_map() support in r901.\r\n\r\nPlease test and open further tickets with improvements.\r\n\r\nUsage looks like:\r\n\r\n{{{\r\nfrom mapnik.ogcserver.WMS import BaseWMSFactory\r\n\r\nclass WMSFactory(BaseWMSFactory):\r\n  def __init__(self):\r\n    BaseWMSFactory.__init__(self)\r\n    self.loadXML('/Users/spring/mapnik/osm.xml')\r\n    self.finalize()\r\n}}}\r\n\r\nBTW, for testing I find that running a local wsgi server is optimal and avoids the headaches of the cgi setup and apache.\r\n\r\nThis script mounts the server at http://localhost:8000/?\r\n\r\n{{{\r\n#!/usr/bin/env python\r\n\r\nimport sys\r\nfrom mapnik.ogcserver.wsgi import WSGIApp\r\nfrom wsgiref.simple_server import make_server\r\n\r\n# add to the PYTHONPATH the folder that contains map_factory.py (an ogcserver.conf)\r\nsys.path.append('/Users/spring/projects/utils/example_code/wms/')\r\napplication = WSGIApp('/Users/spring/projects/utils/example_code/wms/ogcserver.conf')\r\n\r\nif __name__ == '__main__':\r\n    httpd = make_server('localhost', 8000, application)\r\n    print \"Listening on port 8080....\"\r\n    httpd.serve_forever()\r\n}}}","updated_at":"2011-10-09T20:15:19Z","url":"https://api.github.com/repos/artemp/trac2github/issues/comments/2338884","id":2338884,"user":{"avatar_url":"https://secure.gravatar.com/avatar/941f68386168a8a6b60f2529a7830af7?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/artemp","id":59056,"login":"artemp"}},"action":"created","issue":{"number":130,"created_at":"2011-10-09T20:15:10Z","pull_request":{"diff_url":null,"patch_url":null,"html_url":null},"body":"I noticed it lacked the ability to import an XML from Class BaseWMSFactory (in ogcserver/WMS.py).\r\n\r\nWe must add a method load_map in this class to use XML configuration files (see http://trac.mapnik.org/wiki/ManagingLargeXmlFiles). This function will load the XML file to create an object Map then go to recreate the three lists layers, styles and aggregatestyles.","comments":15,"title":"OGCSERVER / XML","updated_at":"2011-10-09T20:15:20Z","url":"https://api.github.com/repos/artemp/trac2github/issues/130","id":1858295,"assignee":null,"milestone":{"number":6,"created_at":"2011-10-09T19:01:22Z","due_on":"1970-01-01T09:20:38Z","title":"0.6.0","creator":{"avatar_url":"https://secure.gravatar.com/avatar/941f68386168a8a6b60f2529a7830af7?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/artemp","id":59056,"login":"artemp"},"url":"https://api.github.com/repos/artemp/trac2github/milestones/6","open_issues":0,"closed_issues":40,"description":"=== Summary ===\r\n\r\nThis release offers a great advancement in usability and features such as several new plugins, advanced symbolization, and ICU unicode support.\r\n\r\nOver 140 tickets were closed against this milestone, and builds across both linux, mac and windows should be working better than ever.\r\n\r\nWe also now have a fresh set of [http://svn.mapnik.org/trunk/docs/api_docs/python/index.html Python API Docs (Epydocs)].\r\n\r\nEnjoy,\r\n\r\nDane\r\n\r\n\r\n=== Highlights ===\r\n\r\n * New ICU unicode support via Artem's genius\r\n\r\n * [http://trac.mapnik.org/wiki/MapnikRenderers#Cairographics Cairo] rendering backend - thanks Tom!\r\n\r\n * XML [http://svn.mapnik.org/trunk/docs/api_docs/python/mapnik-module.html#load_map_from_string from a string] - wicked nice Jonb\r\n \r\n * Support for [http://trac.mapnik.org/wiki/RasterSymbolizer raster composing modes] targeted at hillshading - Nice Marcin!\r\n\r\n * Tons of [PluginArchitecture new plugins] - OSM (nick), Oracle, OGR, SQlite (kunitoki)\r\n\r\n * Big improvements to [UsingScons SCons] - experience it for yourself and build it :) (Thanks jbronn for the boost help)\r\n\r\n * In memory [http://trac.mapnik.org/ticket/192 PointDatasource ] for dynamically drawing geometries - lwu rocks!\r\n\r\n * Love for the OgcServer - thanks xcacou, tmcw, and theo - it works with OSM xml, WMS 1.3.0, and a whole lot more.\r\n\r\n * We've got FontSet support (fallback fonts) from Beau- nice stuff\r\n \r\n * [http://trac.mapnik.org/ticket/117 ProjTransform] exposed by Artem in python. Now you can transform bbox's between projected systems.\r\n\r\n * Mapnik is faster (#156) with projections and PostGIS (#139,#140,#141) thanks to the genius of Rcoup\r\n\r\n * Map buffers to avoid cut labels - thanks Artem!\r\n\r\n * Transparent Point Symbolizers - good stuff Brian!\r\n\r\nFor a full list of major changes see the 0.6.0 Changelog wiki:Release0.6.0\r\n\r\n","state":"closed"},"closed_at":null,"user":{"avatar_url":"https://secure.gravatar.com/avatar/941f68386168a8a6b60f2529a7830af7?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/artemp","id":59056,"login":"artemp"},"html_url":"https://github.com/artemp/trac2github/issues/130","labels":[{"name":"OGC_Server__WMS_","url":"https://api.github.com/repos/artemp/trac2github/labels/OGC_Server__WMS_","color":"FFFFFF"}],"state":"open"},"legacy":{"issue_id":1858295,"comment_id":2338884}}