Changeset 1929
- Timestamp:
- 02/01/07 10:28:45 (14 years ago)
- Location:
- TI02-CSML/trunk/csml
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
TI02-CSML/trunk/csml/API/__init__.py
r1902 r1929 33 33 34 34 ##AbstractFeature methods: 35 #addMethods(csml.parser.AbstractFeature, [ops_AbstractFeature.testmethod, ops_AbstractFeature.getAllowedSubsettings])35 addMethods(csml.parser.AbstractFeature, [ops_AbstractFeature.testmethod, ops_AbstractFeature.getAllowedSubsettings]) 36 36 37 37 ##PointFeature methods: … … 51 51 52 52 ##GridSeriesFeature methods: 53 #addMethods(csml.parser.GridSeriesFeature,[ops_GridFeature.testmethod, ops_GridSeriesFeature.getAllowedSubsettings,ops_GridSeriesFeature.getDomainReference,ops_GridSeriesFeature.getDomainComplement,ops_GridSeriesFeature.getDomain,ops_GridSeriesFeature.subsetToGridSeries])53 addMethods(csml.parser.GridSeriesFeature,[ops_GridFeature.testmethod,ops_GridSeriesFeature.getDomain,ops_GridSeriesFeature.subsetToGridSeries]) 54 54 55 55 ##TrajectoryFeature methods: -
TI02-CSML/trunk/csml/API/ops_GridSeriesFeature.py
r1902 r1929 15 15 return ['subsetToGridSeries'] #other operations 16 16 17 17 18 def getDomain(self): 18 #need some sort of domain 19 pass 19 #returns domain as a dictionary of ordinates {name: [values], ...} 20 domain={} 21 for gridOrd in self.value.gridSeriesDomain.coordTransformTable.gridOrdinates: 22 name=gridOrd.coordAxisLabel.CONTENT 23 if isinstance(gridOrd.coordAxisValues, csml.parser.FileExtract): 24 #not tested with file extracts yet: (01/01/07) 25 domain[name]=gridOrd.coordAxisValues.getData() 26 else: 27 vals=gridOrd.coordAxisValues.coordinateList.CONTENT 28 valList=[] 29 for val in vals.split(','): #remove commas 30 valList.append(val) 31 domain[name]=valList 32 return domain 20 33 21 34 def subsetToGridSeries(self, csmlpath=None, ncpath=None,**kwargs): -
TI02-CSML/trunk/csml/testfiles/apicalls.py
r1922 r1929 1 1 '''apicalls.py - test the api''' 2 2 3 import csml 3 import csml,sys 4 4 5 f='./ testfiles/gridseries/testout.xml'5 f='./gridseries/testout.xml' 6 6 7 7 #Initialise the CSML container … … 25 25 print feature.id 26 26 print feature.description 27 28 #new style domain: 29 print feature.getDomain() 30 sys.exit() 27 31 28 32 #get the domain of the feature
Note: See TracChangeset
for help on using the changeset viewer.