Changeset 629


Ignore:
Timestamp:
17/02/06 09:22:36 (13 years ago)
Author:
domlowe
Message:

csmlfeatures updated to comply with new csmlbuilder

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

Legend:

Unmodified
Added
Removed
  • TI02-CSML/trunk/Coapec/csmllibs/csmlbuilder.py

    r627 r629  
    2222        #wrapper method to call methods in correct order. 
    2323        print "Builder" 
    24         """   self.createCSML() 
    25         self.createFeatureFileMap() 
    26         self.makeFileExtracts() 
    27         self.makeFeatureCollection() 
    28         self.createFeatures() 
    29         self.closeFC() 
    30         self.closeDS() 
    31         self.saveFile() 
    32         self.printToScreen()""" 
    3324        self.createDataset() 
    3425        self.addGMLMetadata() 
  • TI02-CSML/trunk/Coapec/csmllibs/csmlfeaturetypes.py

    r627 r629  
    2828        if self.featuretype == 'GridSeriesFeature': 
    2929            self.createCSMLGridSeriesFeatures() 
    30         else:            #other feature typess... TODo 
    31             pass 
     30        elif self.featuretype == 'PointSeriesFeature':        
     31            self.createCSMLPointSeriesFeatures() 
    3232         
    3333         
  • TI02-CSML/trunk/Coapec/csmlscan.py

    r627 r629  
    146146        mapping = 'onetoone' #default for GridFeature  
    147147 
    148          
    149148elif csmlfeaturetype == "PointSeriesFeature": 
    150         print"creating dataset -PointSeriesFeature" 
    151         csml, ds_element = csmllibs.csmlmeta.createDataset() 
    152         print "adding GML metadata" 
    153         csml, ds_element = csmllibs.csmlmeta.addGMLMetadata(csml, directory, ds_element) 
    154         print "creating filemap" 
    155         fmm = csmllibs.csmlfiles.FileMapMaker(directory,csmlfeaturetype) 
    156         ffmap = fmm.onetoone() #assumption! 
    157          
    158         #Point series feature should only have one changeable axis. Which should (always?) be time. 
    159         #Therefore, create time ref system instead of file extracts. 
    160         print "creating time reference system" 
    161         csml, ds_element, RefSys_element=csmllibs.csmltime.createRefsys(csml,ds_element) 
    162         csml,ds_element,RefSys_element=csmllibs.csmltime.createTimeCoordSystem(csml,ds_element,RefSys_element,ffmap) 
    163         csml, ds_element=csmllibs.csmltime.closeRefSys(csml,ds_element,RefSys_element) 
    164          
    165         #print "creating file extracts" 
    166         #csml, ds_element, extractType, extractPrefix, extractDictionary = csmllibs.csmlfileextracts.createFileExtracts(csml, ds_element, ffmap) 
    167         print 'creating feature collection' 
    168         csml,gml_FeatureCollection=csmllibs.csmlmeta.createFeatureCollection(csml) 
    169         print "creating features" 
    170         csml, dataset, gml_FeatureCollection = csmllibs.csmlfeaturetypes.createCSMLPointSeriesFeatures(csml, ds_element,gml_FeatureCollection, ffmap, timedimension) 
    171         print "closing feature collection" 
    172         ds_element=csmllibs.csmlmeta.closeFeatureCollection(ds_element,gml_FeatureCollection) 
    173         print 'closing dataset' 
    174         csml = csmllibs.csmlmeta.closeDataset(csml,ds_element) 
    175          
     149    if mapping is None: 
     150        mapping = 'onetomany' 
     151 
     152# elif csmlfeaturetype == "PointSeriesFeature": 
     153#       print"creating dataset -PointSeriesFeature" 
     154#       csml, ds_element = csmllibs.csmlmeta.createDataset() 
     155#       print "adding GML metadata" 
     156#       csml, ds_element = csmllibs.csmlmeta.addGMLMetadata(csml, directory, ds_element) 
     157#       print "creating filemap" 
     158#       fmm = csmllibs.csmlfiles.FileMapMaker(directory,csmlfeaturetype) 
     159#       ffmap = fmm.onetoone() #assumption! 
     160#        
     161#       #Point series feature should only have one changeable axis. Which should (always?) be time. 
     162#       #Therefore, create time ref system instead of file extracts. 
     163#       print "creating time reference system" 
     164#       csml, ds_element, RefSys_element=csmllibs.csmltime.createRefsys(csml,ds_element) 
     165#       csml,ds_element,RefSys_element=csmllibs.csmltime.createTimeCoordSystem(csml,ds_element,RefSys_element,ffmap) 
     166#       csml, ds_element=csmllibs.csmltime.closeRefSys(csml,ds_element,RefSys_element) 
     167#        
     168#       #print "creating file extracts" 
     169#       #csml, ds_element, extractType, extractPrefix, extractDictionary = csmllibs.csmlfileextracts.createFileExtracts(csml, ds_element, ffmap) 
     170#       print 'creating feature collection' 
     171#       csml,gml_FeatureCollection=csmllibs.csmlmeta.createFeatureCollection(csml) 
     172#       print "creating features" 
     173#       csml, dataset, gml_FeatureCollection = csmllibs.csmlfeaturetypes.createCSMLPointSeriesFeatures(csml, ds_element,gml_FeatureCollection, ffmap, timedimension) 
     174#       print "closing feature collection" 
     175#       ds_element=csmllibs.csmlmeta.closeFeatureCollection(ds_element,gml_FeatureCollection) 
     176#       print 'closing dataset' 
     177#       csml = csmllibs.csmlmeta.closeDataset(csml,ds_element) 
     178 
    176179elif csmlfeaturetype == "ProfileSeriesFeature": 
    177     #NOT YET IMPLEMENTED# 
    178     if mapping is None: 
     180    if mapping is None:     #NOT YET IMPLEMENTED# 
    179181        mapping = 'onetomany' #default for ProfileSeriesFeature (?) 
    180182         
     
    184186 
    185187csmldataset=csmllibs.csmlbuilder.csmlBuilder(directory,csmlfeaturetype,mapping,timedimension, outputfile) 
     188print "building csml..." 
    186189csmldataset.build() 
    187190 
Note: See TracChangeset for help on using the changeset viewer.