source: TI02-CSML/trunk/parser/apicalls.py @ 1040

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI02-CSML/trunk/parser/apicalls.py@1040
Revision 1040, 740 bytes checked in by domlowe, 14 years ago (diff)

added getDomain() to API

RevLine 
[1027]1'''apicalls.py  - test the api'''
2
3#from parser api import *
4import API
5
6f='coapec.xml'
7
8#Initialise and parse the dataset
9csml = API.Parser.Dataset()
10csml.parse(f)
11
12#get list of features in the dataset
13flist= csml.getFeatureList()
14print '\n Here are all the features in %s:' %f
15print flist
16
17#select a feature by name (gml:id)
18print '\n Selecting feature with gml:id = %s' %flist[5]
19feature=csml.getFeature(flist[5])
20
21#get the domain of the feature
22print '\n The feature has domain reference:' 
[1032]23print feature.getDomainReference()
24
25#get the domain complement of the feature
26print '\n The feature has domain complement :' 
[1040]27print feature.getDomainComplement()
28
29#get combined domain
30print '\n The feature has domain:' 
31print feature.getDomain()
Note: See TracBrowser for help on using the repository browser.