Changeset 1398


Ignore:
Timestamp:
15/08/06 14:09:58 (13 years ago)
Author:
domlowe
Message:

switch to declare time data to be stored inline or in file extract

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

Legend:

Unmodified
Added
Removed
  • TI02-CSML/trunk/Scanner/commands.txt

    r1080 r1398  
    1717 
    1818python csmlscan.py -d /badc/ecmwf-op/data/gridded_2.5 -o ecmwfop.xml -t 't' GridSeriesFeature 
     19 
     20 
     21#new versions: 
     22 
     23python csmlscan.py -d /badc/mst/data/surface-wind/ -o testfullmst.xml -m 'oneonly' -f PointSeriesFeatureoneonly' -f PointSeriesFeature -xst/data/surface-wind/ -o testfullmst.xml 
     24 
     25python csmlscan.py -c 'sampleconfig.cfg' 
  • TI02-CSML/trunk/Scanner/csmllibs/csmlbuilder.py

    r1381 r1398  
    104104    def createFeatures(self): 
    105105        print "create Features" 
    106         thefeatures = csmllibs.csmlfeaturetypes.featureBuilder( self.ds,self.gml_FeatureCollection,self.extractType, self.extractPrefix, self.ffmap, self.extractDictionary,self.timedimension) 
     106        thefeatures = csmllibs.csmlfeaturetypes.featureBuilder( self.ds,self.gml_FeatureCollection,self.extractType, self.extractPrefix, self.ffmap, self.extractDictionary,self.timedimension, self.timestorage) 
    107107        #self.csml = thefeatures.csml 
    108108        self.ds=thefeatures.ds_element 
  • TI02-CSML/trunk/Scanner/csmllibs/csmlfeaturetypes.py

    r1380 r1398  
    1111 
    1212class featureBuilder: 
    13     def __init__(self, dataset_element, gml_FeatureCollection_element,extractType, extractPrefix, ffmap,fileExtractDictionary, timedim): 
     13    def __init__(self, dataset_element, gml_FeatureCollection_element,extractType, extractPrefix, ffmap,fileExtractDictionary, timedim, timestorage): 
    1414        self.ds_element=dataset_element 
    1515        self.gml_FeatureCollection_element = gml_FeatureCollection_element 
     
    1919        self.fileExtractDictionary = fileExtractDictionary 
    2020        self.timedim = timedim 
     21        self.timestorage=timestorage 
    2122         
    2223        #empty list to hold featureMembers 
     
    2627        #get the featuretype of the first representative file in the ffmap object 
    2728        self.featuretype=  self.ffmap.getRepresentativeFiles()[0].getFeatureType() 
    28         if self.featuretype == 'GridSeriesFeature': 
     29        if self.featuretype == 'GridSeries': 
     30            print 'creating grids' 
    2931            self.createCSMLGridSeriesFeatures() 
    30         elif self.featuretype == 'PointSeriesFeature':        
     32        elif self.featuretype == 'PointSeries':        
    3133            self.createCSMLPointSeriesFeatures() 
    3234         
     
    9799                # domainReference element  
    98100                #*********************************************************************** 
     101                # 
    99102                tpl=csmllibs.Parser.TimePositionList() 
    100                 tpl.timePositions=timeString 
    101                 tpl.frame='%s:%s'%(caltype,units) 
     103                if self.timestorage =='inline': 
     104                    tpl.timePositions=timeString 
     105                    tpl.frame='%s:%s'%(caltype,units) 
     106                else: 
     107                    # do something to create a single extract for the times (from the representative file). 
     108                    tpl.timePositions = csmllibs.csmlfileextracts.createSingleExtract(self.extractType, repfilename, self.timedim, len(timeString.split()))  
     109                    tpl.frame='%s:%s'%(caltype,units) 
     110                     
    102111                gsDomain.domainReference=tpl 
    103112                grid=csmllibs.Parser.Grid() 
    104                  
    105113                 
    106114                #*********************************************************************** 
Note: See TracChangeset for help on using the changeset viewer.