On Thu, Apr 28, 2011 at 10:07 PM, Dominic Lowe <[email protected]> wrote:
> Hi Ivan,
>
> Many thanks for the patch.  Do we need to introduce a new attribute 'layers'
> to solve this problem?
> (given that we already have 'contents').

'contents' is a dictionary that maps names to layers (ContentMetadata
to be exact).  'layers' contains sequence of "root" layers.  These
attributes have different structure, but both are useful for various
applications.

Perhaps, one can create object that is both dictionary and sequence
with some python magic.

If you keep 'layers' attribute, you might like to rename it to 'tree'
or 'layertree' or something like this.

> I know layers is the WMS term but we settled on contents as a cross-service
> way of harmonising things in OWSLib so it would be good to maintain that
> consistency (it's described in owslib/interfaces.py)

Hm, interfaces.py states that contents is a sequence, but
WebMapService's 'contents' is a dict.

And I don't see definition of IServiceContent mentioned in contents'
description in interfaces.py

So I would like to know your recommendations as you know architecture
of OWSLib much better :)

> On 27/04/11 09:39, [email protected] wrote:
>>
>> http://trac.gispython.org/lab/ticket/215
>>
>> It collects 'roots' of layers into owslib.wms.WebMapService's layers
>> attribute (there may be any number of such layers, so it is a list),
>> and each ContentMetadata has attribute children that stores list of
>> children.
>>
>> Of course, there may be a better name than 'layers' for the
>> WebMapService attribute.
>>
>> Code is also available at my GitHub repository, branch tree:
>> https://github.com/monoid/owslib/tree/tree
>>
>> --
>> Ivan Boldyrev

-- 
Ivan Boldyrev
_______________________________________________
Community mailing list
[email protected]
http://lists.gispython.org/mailman/listinfo/community

Reply via email to