Ignore:
Timestamp:
25/05/06 16:42:00 (13 years ago)
Author:
domlowe
Message:

getFeature, getFeatureList methods

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI02-CSML/trunk/parser/API/apicalls.py

    r1009 r1019  
    33from parser_api import * 
    44 
    5 abfeat=AbstractFeature() 
    6 print abfeat.testmethod() 
     5f='../coapec.xml' 
    76 
    8 point=PointFeature() 
    9 print point.testmethod() 
     7#Initialise and parse the dataset 
     8csml = Dataset() 
     9csml.parse(f) 
    1010 
    11 profile=ProfileFeature() 
    12 print profile.testmethod() 
     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 TracChangeset for help on using the changeset viewer.