- Timestamp:
- 29/01/07 10:01:34 (14 years ago)
- Location:
- TI02-CSML/trunk/csml
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
TI02-CSML/trunk/csml/API/ops_FileExtract.py
r1956 r2071 14 14 #print self.fileName 15 15 16 #get the right file 16 #get the right file ##TO DO< check this is ok with FILE LIST 17 17 if fileposition is not None: 18 file=self.fileName.CONTENT.split()[fileposition] 18 file =self.fileList.fileNames.CONTENT.split()[fileposition] 19 #file=self.fileName.CONTENT.split()[fileposition] 19 20 else: 20 21 file=self.fileName.CONTENT -
TI02-CSML/trunk/csml/API/ops_GridSeriesFeature.py
r2062 r2071 124 124 selection[kw]=kwargs[kw] 125 125 for time in self.times: 126 listPosition=self.domain[timeAxis][0].split().index(time) 126 print time 127 listPosition=self.domain[timeName].index(time) 127 128 strTimes= strTimes + ' ' + time 128 for comp in csmlutils.listify(self.value.rangeSet. aggregatedArray.components):129 for comp in csmlutils.listify(self.value.rangeSet.valueArray.valueComponent.quantityList.__insertedExtract.components): 129 130 filePos=(listPosition)/timeToFileRatio 130 131 if filePos in filesFetched: 131 132 continue #already got data from this file, try next time 132 print comp 133 print dir(comp) 133 134 134 data=comp.getData(fileposition=filePos, **selection) 135 self.files.append(comp.fileName.CONTENT.split()[filePos]) 135 print comp.fileList.fileNames.CONTENT 136 self.files.append(comp.fileList.fileNames.CONTENT[filePos]) #TODO, get the right file name 136 137 if fulldata ==[]: 137 138 fulldata = data.tolist() -
TI02-CSML/trunk/csml/csmllibs/csmlbuilder.py
r2034 r2071 88 88 self.extractDictionary=feBuilder.fileExtractDictionary 89 89 90 91 90 92 def createFeatureCollection(self): 91 93 #creates empty feature collection (list) … … 103 105 self.ds=thefeatures.ds_element 104 106 self.featureCollection = thefeatures.featureCollection 107 self.featureCollection =csml.csmllibs.csmlextra.addEnvelope(self.featureCollection) 105 108 self.ds.featureCollection=self.featureCollection 106 109 -
TI02-CSML/trunk/csml/csmllibs/csmlextra.py
r2037 r2071 2 2 import random 3 3 import string 4 import csml.parser 4 5 5 6 def getRandomID(): … … 13 14 return randomID 14 15 16 17 def addEnvelope(fc): 18 #adds EnvelopeWithTimePeriod to feature collection, based on the spatial extent of the features within. 19 #TO DO - this calculation, placeholder for now 20 env=csml.parser.EnvelopeWithTimePeriod() 21 env.lowerCorner=csml.parser.csString('lc') 22 env.upperCorner=csml.parser.csString('uc') 23 env.timePosition1=csml.parser.csString('tp1') 24 env.timePosition2=csml.parser.csString('tp2') 25 fc.boundedBy=env 26 return fc 15 27 16 28 def getSeqRule(nDims): -
TI02-CSML/trunk/csml/parser.py
r2060 r2071 320 320 addchildren(self,children) 321 321 csElement.__init__(self,**kwargs) 322 323 class DirectPosition(AbstractGML, SRSReferenceGroup,SRSInformationGroup,csElement): 324 def __init__(self, **kwargs): 325 AbstractGML.__init__(self,**kwargs) 326 csElement.__init__(self,**kwargs) 327 322 328 323 class GridEnvelope(AbstractGML,SRSReferenceGroup, csElement): 329 324 def __init__(self, **kwargs): … … 338 333 SRSReferenceGroup.__init__(self,**kwargs) 339 334 AbstractGML.__init__(self,**kwargs) 340 children={'lowerCorner':[GML('lowerCorner'), 'DirectPosition'],'upperCorner':[GML('upperCorner'), 'DirectPosition']} 341 addchildren(self,children) 342 csElement.__init__(self,**kwargs) 343 335 children={'lowerCorner':[GML('lowerCorner'), 'csString'],'upperCorner':[GML('upperCorner'), 'csString']} 336 addchildren(self,children) 337 csElement.__init__(self,**kwargs) 338 339 class EnvelopeWithTimePeriod(Envelope): 340 def __init__(self, **kwargs): 341 Envelope.__init__(self,**kwargs) 342 children={'timePosition1':[GML('timePosition'), 'csString'],'timePosition2':[GML('timePosition'), 'csString']} 343 addchildren(self,children) 344 csElement.__init__(self,**kwargs) 344 345 345 346 class AbstractFeature(AbstractGML,csElement):
Note: See TracChangeset
for help on using the changeset viewer.