Ticket #849 (closed task: duplicate)
[M] CSML3 API requests (1)
Reported by: | lawrence | Owned by: | domlowe |
---|---|---|---|
Priority: | blocker | Milestone: | Reporting |
Component: | CSML | Version: | |
Keywords: | CSML3 | Cc: | awoolf |
Description (last modified by lawrence) (diff)
The CSML API isn't very pythonic, and the distinction between attributes and methods (affordances) is not obvious. Introspection ought to help us, but doesn't a lot.
For example, if we introspect the attributes and methods of a feature member within a feature collection: (see ticket:848 for how we can get to this), we have a feature collection which is nearly iterable, so we can do this:
for i in dd.featureMembers: i.id
and get a list that looks something like
'K2xpDJkh' 'QFE4YVaJ' 'SEgLDf6Z' ...
but I can't look at ddK2xpDJkh? which is what one expects to be able to do ...
Further, if I do try and look at the objects with dir() I can't immediately tell what are attributes (like a FeatureCollection? is an attribute of a datset, yet there is an attribute called getFeatureCollection ...), and what are methods (like subsetting).
Obviously this is something to talk about after NDG2.