source: TI02-CSML/trunk/csml/API/ops_PointSeriesFeature.py @ 1596

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI02-CSML/trunk/csml/API/ops_PointSeriesFeature.py@2000
Revision 1596, 1.1 KB checked in by domlowe, 13 years ago (diff)

bringing in line with new csml module structure

Line 
1''' ops_PointSeriesFeature  contains operations for PointSeriesFeatures'''
2import csml
3
4def testmethod(self):
5    print 'testmethod for pointSeries feature'
6    return 'testmethod pointSeries'
7
8def getAllowedSubsettings(self):
9    return ['subsetToPointSeries']
10
11def getDomainReference(self):
12    #Inspects a time position list for the domain reference.
13    #Also handles an ArrayGenerator.
14    print self.domain.domainReference
15    if isinstance(self.domain.domainReference,csml.parser.Trajectory):
16        print dir(self.domain.domainReference)
17        if isinstance(self.domain.domainReference.times.timePositions,csml.parser.ArrayGenerator):
18            time = {}
19            timeframe=self.domain.domainReference.times.frame
20            time['t'] = self.domain.domainReference.times.timePositions.getGeneratedValues(timeframe, summary=1)
21            domainref  = time
22        else:
23            time = {}
24            time['t'] = self.domain.domainReference.times.timePositions
25            domainref  = time
26             
27            pass
28    else: domainref='blah2'
29    return domainref
Note: See TracBrowser for help on using the repository browser.