[Community] OWSLib - Access WMS attribution info

David Winslow dwinslow at opengeo.org
Fri Dec 4 18:17:49 EET 2009


On 12/04/2009 11:12 AM, David Winslow wrote:
> On 12/03/2009 12:20 PM, David Winslow wrote:
>    
>> Hi all,
>>
>> For a project I'm working on, I'd like to access the Attribution field
>> on some layers in a WMS capabilities document.  I'd love to use OWSLib
>> (looks like it would be a lot easier to use than parsing the XML
>> directly), but when I try to retrieve the Attribution I just get an
>> empty string (or None if there is no attribution for the layer.)  I
>> was expecting an object with the title, logo URL, and link for the
>> Attribution.
>>
>> Digging into the code a bit I see that Attribution is parsed in
>> exactly the same way as Name and Title, so it will always be a
>> string.  Would it be reasonable to change this to an object or
>> dictionary with the fields I mentioned above?
>>
>> I would be happy to put together a patch if there's interest.
>>
>> -- 
>> David Winslow
>> OpenGeo - http://opengeo.org/
>>      
> Perhaps I am doing something wrong, but the test suite in trunk doesn't
> seem to pass as-is.  Is this the correct way to be running it?
>
> cd tests/
> python runalldoctests.py
> # ... lots of text scrolls by
> ***Test Failed*** 6 failures.
>
> I see an HTTP 401 error and such, so maybe the test suite is just out of
> date?  Is http://svn.gispython.org/svn/gispy/OWSLib/trunk the correct
> repository?
>
> This is on Fedora 12, running python 2.6.  I'm using a virtualenv
> sandbox for the tests.
>
> --
> David Winslow
> OpenGeo - http://opengeo.org/
> _______________________________________________
> Community mailing list
> Community at lists.gispython.org
> http://lists.gispython.org/mailman/listinfo/community
>    
Attached is a log of the test suite output.

--
David Winslow
OpenGeo - http://opengeo.org/
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: testrun.log
URL: <http://lists.gispython.org/pipermail/community/attachments/20091204/9f4f2163/attachment.asc>


More information about the Community mailing list