Changeset 2159


Ignore:
Timestamp:
13/02/07 14:16:34 (12 years ago)
Author:
domlowe
Message:

getUom() method added to GridSeriesFeature?

Location:
TI02-CSML/trunk/csml
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • TI02-CSML/trunk/csml/API/__init__.py

    r2095 r2159  
    5151 
    5252##GridSeriesFeature methods: 
    53 addMethods(csml.parser.GridSeriesFeature,[ops_GridFeature.testmethod,ops_GridSeriesFeature.getDomain,ops_GridSeriesFeature.subsetToGridSeries]) 
     53addMethods(csml.parser.GridSeriesFeature,[ops_GridFeature.testmethod,ops_GridSeriesFeature.getDomain,ops_GridSeriesFeature.subsetToGridSeries, ops_GridSeriesFeature.getUom]) 
    5454 
    5555##TrajectoryFeature methods: 
  • TI02-CSML/trunk/csml/API/ops_GridSeriesFeature.py

    r2155 r2159  
    3434    return self.domain 
    3535 
    36  
     36def getUom(self): 
     37    uom=None 
     38    #returns the uom of the phenomenon. 
     39    try:  
     40        uom=self.value.rangeSet.valueArray.valueComponent.quantityList.__insertedExtract.uom.CONTENT 
     41    except AttributeError: 
     42        uom =None 
     43    return uom 
     44        
    3745     
    3846def subsetToGridSeries(self, csmlpath=None, ncpath=None,**kwargs): 
  • TI02-CSML/trunk/csml/DDC/obs/clim10subset.py

    r2156 r2159  
    3131#print feature.getDomain() 
    3232 
     33print '\n The units of measure are' 
     34print feature.getUom() 
     35sys.exit() 
     36 
    3337#get list of allowed subsettings 
    3438print '\n the following feature subsetting operations are allowed:' 
Note: See TracChangeset for help on using the changeset viewer.