Changeset 2396


Ignore:
Timestamp:
11/04/07 14:17:11 (12 years ago)
Author:
domlowe
Message:

gml:name now used for variable name, gml:id becomes opaque identifer

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

Legend:

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

    r2395 r2396  
    106106    rs=csml.parser.RangeSet() 
    107107    sdid=csml.csmllibs.csmlextra.getRandomID() 
    108     descriptor=csml.parser.NetCDFExtract(id=sdid,fileName=csml.parser.csString(pathToSubsetNetCDF),variableName=csml.parser.csString(self.id),arraySize=csml.parser.csString(totalArraySize)) 
     108    descriptor=csml.parser.NetCDFExtract(id=sdid,fileName=csml.parser.csString(pathToSubsetNetCDF),variableName=self.name,arraySize=csml.parser.csString(totalArraySize)) 
    109109    rs=csml.parser.RangeSet() 
    110110    va=csml.parser.ValueArray() 
     
    134134    #create a stand alone gridseries feature containing this coverage 
    135135    csmlWrap=csml.csmllibs.csmlfeaturewrap.CSMLWrapper() 
    136     subsettedFeature=csmlWrap.createGridSeriesFeature(value=cvg,parameter=param,featureID=self.id,description=self.description) 
     136    subsettedFeature=csmlWrap.createGridSeriesFeature(value=cvg,parameter=param,featureID=csml.csmllibs.csmlextra.getRandomID(),name=self.name,description=self.description) 
    137137  
    138138    ### write netcdf using NCWriter class (wraps cdms) ### 
     
    211211     
    212212    #create a stand alone gridseries feature containing this coverage 
    213     subsettedFeature=csmlWrap.createProfileSeriesFeature(value=cvg,parameter=param, location=loc, featureID=self.id,description=self.description) 
     213    subsettedFeature=csmlWrap.createProfileSeriesFeature(value=cvg,parameter=param, location=loc, featureID=csml.csmllibs.csmlextra.getRandomID(),name=self.id,description=self.description) 
    214214  
    215215     
  • TI02-CSML/trunk/csml/csmllibs/csmlfeaturetypes.py

    r2395 r2396  
    207207     
    208208    def __featureMetadata(self,feature, varName): 
    209         feature.id=str(varName) 
     209        feature.id=csml.csmllibs.csmlextra.getRandomID() 
     210        feature.name=csml.parser.csString(varName) 
    210211        desc = self._getDescriptiveName(self.DI) 
    211212        feature.description=csml.parser.csString(desc) 
  • TI02-CSML/trunk/csml/csmllibs/csmlfeaturewrap.py

    r2305 r2396  
    99            
    1010             
    11     def _createAbstractFeature(self, feature, value, parameter=None,featureID=None,description=None): 
     11    def _createAbstractFeature(self, feature, value, parameter=None,featureID=None, name=None, description=None): 
     12        #note name here should be of type csString 
    1213        if featureID: 
    1314            feature.id= featureID 
     
    1819        else: 
    1920            feature.description='No Description' 
     21        if name: 
     22            feature.name=name 
     23 
    2024        feature.value=value 
    2125        feature.parameter=parameter 
    2226        return feature 
    2327         
    24     def createProfileSeriesFeature(self,value=None, parameter=None, location=None, featureID=None,description=None): 
     28    def createProfileSeriesFeature(self,value=None, parameter=None, location=None, featureID=None, name=None, description=None): 
    2529        feature=csml.parser.ProfileSeriesFeature() 
    26         feature=self._createAbstractFeature(feature, value, parameter,featureID,description) 
     30        feature=self._createAbstractFeature(feature, value, parameter,featureID, name, description) 
    2731        feature.location =location 
    2832        return feature 
    2933 
    30     def createProfileFeature(self,value=None, parameter=None, location=None, time=None, featureID=None,description=None): 
     34    def createProfileFeature(self,value=None, parameter=None, location=None, time=None, featureID=None, name=None, description=None): 
    3135        feature=csml.parser.ProfileFeature() 
    32         feature=self._createAbstractFeature(feature, value, parameter,featureID,description) 
     36        feature=self._createAbstractFeature(feature, value, parameter,featureID, name, description) 
    3337        feature.location =location 
    3438        return feature 
    3539 
    36     def createPointSeriesFeature(self,value=None, parameter=None, location=None, featureID=None,description=None): 
     40    def createPointSeriesFeature(self,value=None, parameter=None, location=None, featureID=None,  name=None,description=None): 
    3741        feature=csml.parser.PointSeriesFeature() 
    38         feature=self._createAbstractFeature(feature, value, parameter,featureID,description) 
     42        feature=self._createAbstractFeature(feature, value, parameter,featureID, name, description) 
    3943        feature.location =location 
    4044        return feature 
    4145 
    42     def createGridSeriesFeature(self,value, parameter=None,featureID=None,description=None): 
     46    def createGridSeriesFeature(self,value, parameter=None,featureID=None, name=None, description=None): 
    4347        feature=csml.parser.GridSeriesFeature() 
    44         feature= self._createAbstractFeature(feature, value, parameter,featureID,description) 
     48        feature= self._createAbstractFeature(feature, value, parameter,featureID, name, description) 
    4549        return feature 
    4650     
  • TI02-CSML/trunk/csml/parser.py

    r2385 r2396  
    285285class AbstractGML(csElement): 
    286286    def __init__(self, **kwargs): 
    287         a=[GML('id'), GML('name')] 
     287        a=[GML('id')] 
    288288        addatts(self,a) 
    289         elems=['metaDataProperty', 'description'] 
    290         addelems(self,elems) 
    291         children={elems[0]:[GML('metaDataProperty'),'csString'],elems[1]:[GML('description'),'csString']} 
     289        elems=['metaDataProperty', 'description','name'] 
     290        addelems(self,elems) 
     291        children={elems[0]:[GML('metaDataProperty'),'csString'],elems[1]:[GML('description'),'csString'],elems[2]:[GML('name'),'csString']} 
    292292        addchildren(self,children) 
    293293        csElement.__init__(self,**kwargs) 
Note: See TracChangeset for help on using the changeset viewer.