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

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

getFeature, getFeatureList methods

Line 
1'''apicalls.py  - test the api'''
2
3from parser_api import *
4
5f='../coapec.xml'
6
7#Initialise and parse the dataset
8csml = Dataset()
9csml.parse(f)
10
11#get list of features in the dataset
12flist= csml.getFeatureList()
13print '\n Here are all the features in %s:' %f
14print flist
15
16#select a feature by name (gml:id)
17print '\n Selecting feature with gml:id = %s' %flist[5]
18feature=csml.getFeature(flist[5])
Note: See TracBrowser for help on using the repository browser.