Ignore:
Timestamp:
08/05/06 11:44:45 (14 years ago)
Author:
domlowe
Message:

Added some checking for mandatory csml elements

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI02-CSML/trunk/newparser/ioDemo.py

    r888 r896  
    2929    featureType = csml.getFeatureType(featureList[i]) 
    3030    print featureType 
    31      
    32      
     31 
     32 
    3333#get type of single feature  
    3434#eg featureType=csml.getFeatureType('feat04') 
    3535 
    3636domainref=csml.getDomainReference('solar_3') 
    37 #print 'domainref: ' + str(domainref) 
     37print 'domainref: ' + str(domainref) 
    3838domaincomp=csml.getDomainComplement('solar_3') 
    39 #print 'domaincomp: ' + str(domaincomp) 
     39print 'domaincomp: ' + str(domaincomp) 
    4040domain=csml.getDomain('solar_3') 
    41 #print 'domain: ' + str(domain) 
     41print 'domain: ' + str(domain) 
    4242#featureValues=csml.getDataForFeature('solar_3', None) 
    4343 
    4444 
    4545timelist = domainref['t'] 
    46 #make some selection from the available times: 
     46#make some selection from the available times/spatialdomain: 
    4747timeSelection = timelist.split()[:2] 
    48 #featureValues=csml.getDataForFeature('solar_3',timeSelection, latitude=(0.,10.0), longitude=(90, 100.0)) 
    4948spatialSubsetDictionary= {} 
    5049spatialSubsetDictionary['latitude']=(0.,10.0) 
     
    5352featureValues=csml.getDataForFeature('solar_3', timeSelection, **spatialSubsetDictionary) 
    5453 
    55 #same as: 
    56 #featureValues=csml.getDataForFeature('solar_3',timeSelection, latitude=(0.,10.0), longitude=(90, 100.0)) 
    5754print featureValues 
    58 sys.exit() 
    59  
    60 print type(featureValues) 
     55#print type(featureValues) 
    6156#print dir(featureValues) 
    62 #print featureValues 
    63  
    64 #print 'Feature rangeSet:' +str(featureValues) 
    65  
    6657 
    6758#get gml description (long name) of feature 
     
    7970#dataArray = csml.getData(fileExtractID) 
    8071#dataArray = csml.getData('feat04times') 
    81 for extract in fileExtractList: 
    82     print extract 
    83     dataArray=csml.getDataForExtract(extract) 
     72#for extract in fileExtractList: 
     73  #  print extract 
     74    #dataArray=csml.getDataForExtract(extract) 
    8475    #print extract 
    8576    #print dataArray 
Note: See TracChangeset for help on using the changeset viewer.