Changeset 2385 for TI02-CSML


Ignore:
Timestamp:
05/04/07 14:31:07 (12 years ago)
Author:
domlowe
Message:

various fixes to subsetting output

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

Legend:

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

    r2212 r2385  
    1 import csml.parser 
    2 import csml.parser_extra 
     1import csml 
    32 
    43class Container(object): 
     
    6261        self.ds.storageDescriptor=self.sd 
    6362        self.ds.featureCollection=csml.parser.CSMLFeatureCollection(featureMembers=self.fm) 
     63        self.ds.featureCollection.id=csml.csmllibs.csmlextra.getRandomID() 
    6464        csmlout=self.ds.toXML() 
    6565        #parse and pretty print the result to file 
  • TI02-CSML/trunk/csml/API/genSubset.py

    r2361 r2385  
    145145        go.gridAxesSpanned=csml.parser.csString(key) 
    146146        go.coordAxisValues = csml.parser.SpatialOrTemporalPositionList() 
     147        go.coordAxisValues.id=csml.csmllibs.csmlextra.getRandomID() 
    147148        if key==crs.axes[crs.timeAxis]: 
    148149            go.coordAxisValues.timePositionList=csml.parser.csString(domainSubset[key]) 
     
    151152        else: 
    152153            go.coordAxisValues.coordinateList=csml.parser.csString(domainSubset[key]) #self.domain.key placeholder 
     154        seqRule= csml.parser.SequenceRule() 
     155        seqRule.CONTENT='Linear' 
     156        seqRule.axisOrder='+1'  #TO DO. Work this out. 
     157        go.sequenceRule=seqRule 
    153158        ords.append(go) #go needs a few more properties setting 
    154159    cTT.gridOrdinates=ords 
  • TI02-CSML/trunk/csml/API/ops_GridSeriesFeature.py

    r2362 r2385  
    9090    domainSubset, totalArraySize=csml.API.genSubset.subsetDomain(timeName,strTimes,self.domain, **kwargs) 
    9191    cTT=csml.API.genSubset.getCoordTransformTable(domainSubset, crs, frame) 
     92    newdomain.id=csml.csmllibs.csmlextra.getRandomID() 
    9293    newdomain.coordTransformTable=cTT 
    9394    newdomain.srsName=self.value.gridSeriesDomain.srsName   
    9495    newdomain.axisLabels=self.value.gridSeriesDomain.axisLabels 
    9596    newdomain.srsDimension=self.value.gridSeriesDomain.srsDimension 
     97    newdomain.dimension=self.value.gridSeriesDomain.dimension 
     98    env=csml.parser.GridEnvelope() 
     99    env.low=csml.parser.csString('0 0 0') #TODO 
     100    env.high=csml.parser.csString('0 0 0') 
     101    newdomain.limits=env 
     102    newdomain.aLabels=self.value.gridSeriesDomain.aLabels 
    96103    rangeSet=csml.parser.RangeSet() 
    97     rangeSet.arrayDescriptor=csml.parser.NetCDFExtract(id=self.id,fileName=csml.parser.csString(pathToSubsetNetCDF),variableName=csml.parser.csString(self.id),arraySize=csml.parser.csString(totalArraySize)) 
     104    rangeSet.arrayDescriptor=csml.parser.NetCDFExtract(id=csml.csmllibs.csmlextra.getRandomID(),fileName=csml.parser.csString(pathToSubsetNetCDF),variableName=csml.parser.csString(self.id),arraySize=csml.parser.csString(totalArraySize)) 
    98105     
    99106    #gridseries coverage 
    100107    cvg=csml.parser.GridSeriesCoverage() 
     108    cvg.id=csml.csmllibs.csmlextra.getRandomID() 
    101109    cvg.rangeSet=rangeSet 
    102110    cvg.gridSeriesDomain=newdomain     
  • TI02-CSML/trunk/csml/parser.py

    r2382 r2385  
    454454        elems=['quantityList', 'dataBlock', 'arrayDescriptor', 'valueArray'] 
    455455        addelems(self,elems) 
    456         children={elems[0]:[GML('QuantityList'), 'MeasureOrNullList'],        elems[1]:[GML('DataBlock'),'DataBlock'],'arrayDescriptor':[FILEFORMATS, 'ArrayDescriptor'],  elems[2]:[CSML('AggregatedArray'), 'AggregatedArray'], 
     456        children={elems[0]:[GML('QuantityList'), 'MeasureOrNullList'],        elems[1]:[GML('DataBlock'),'DataBlock'],elems[2]:[FILEFORMATS, 'ArrayDescriptor'],  elems[3]:[CSML('AggregatedArray'), 'AggregatedArray'], 
    457457        elems[3]:[GML('ValueArray'),'ValueArray']} 
    458458        addchildren(self,children) 
Note: See TracChangeset for help on using the changeset viewer.