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

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

fixed API imports across all modules

Line 
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:' 
23print feature.getDomainReference()
Note: See TracBrowser for help on using the repository browser.