[Community] OWSLib WebMapService: xml and exceptions
angushfx at yahoo.ca
Thu Feb 25 07:44:35 EET 2010
I have been trying out OWSLib (and Shapely) over the past couple weeks and would like to say good work to everyone involved in creating/maintaining it.
I am using OWSLib to simplify making WMS requests in a wxpython app. I was just curious if there is a way I am overlooking to have WebMapService return the raw capabilities XML and raw exception XML?
From what I can see the "getcapabilities" method will return XML as a file object but makes a new http request for the data even when it already exists. As far as getting the raw exception XML; once an exception is raised the capabilites XML (or image if using "getmap") will always be None, so the exception XML can't be accessed this way (which really makes sense anyway).
I want to have this info so I can let the user view it if they want to so I modified wms.py (rev. 1539) a bit (attached). My question is if anyone can think of a reason not to do this? And if something like this can be added to OWSLib as a patch?
There is probably a better way to do this but I just added a method to return the raw xml if WebMapService has it, and a method to return the last "application/vnd.ogc.se_xml" exception.
Thanks for any insight.
The new Internet Explorer® 8 - Faster, safer, easier. Optimized for Yahoo! Get it Now for Free! at http://downloads.yahoo.com/ca/internetexplorer/
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 18664 bytes
Desc: not available
More information about the Community