
Imports and initialize

    >>> from owslib.wfs import WebFeatureService
    >>> wfs = WebFeatureService('http://ndg3beta.badc.rl.ac.uk/cows/mst_sample/wfs?', version='2.0.0')

Test the capabilities info
	>>> wfs.identification.service
	'OGC:WFS'
    >>> wfs.identification.version
    '2.0.0'
    >>> wfs.identification.title
    'BADC OGC Service'
    >>> wfs.identification.abstract
    >>> wfs.identification.keywords
    ['Point', 'Timeseries', 'Climate', 'CSML']
    >>> wfs.identification.fees
    >>> wfs.identification.accessconstraints
    >>> wfs.provider.name
    'British Atmospheric Data Centre'
    >>> wfs.provider.url
    >>> wfs.provider.contact.email
    'D.Lowe@rl.ac.uk'
    >>> wfs.provider.contact.name
    'Dominic Lowe'
    >>> wfs.provider.contact.organization
    >>> wfs.provider.contact.city
    'Didcot'
    >>> wfs.provider.contact.region
    'Oxfordshire'
    >>> wfs.provider.contact.postcode
    'OX11 0QX'
    >>> wfs.provider.contact.country
    'UK'
        
Test the getfeature method

    >>> wfs.contents.keys()
    ['csml:PointSeriesFeature']

    >>> response = wfs.getfeature(typename=['csml:PointSeriesFeature'], maxfeatures=2)
    >>> response.read().find('<wfs:member')>0
    True
	>>> response=wfs.getfeature(typename=['csml:PointSeriesFeature'],bbox=(-5,50,-4,60))
	>>> response.read().find('<wfs:member') >0
	True

Test Stored Queries
    >>> storedqid='urn-x:wfs:StoredQueryId:badc.nerc.ac.uk:extractPointFromPointSeries'
    >>> sqparams={'featureid':'meaneastward','timeinstance':'2002-01-01T10:45:00.0'}
    >>> response=wfs.getfeature(typename=['csml:PointSeriesFeature'],storedQueryID=storedqid, storedQueryParams=sqparams)	
    >>> response.read().find('<wfs:member') >0
    True
    >>> for sq in wfs.storedqueries: print sq.id
    urn-x:wfs:StoredQueryId:badc.nerc.ac.uk:extractPointSeriesFromGridSeries
    urn-x:wfs:StoredQueryId:badc.nerc.ac.uk:phenomenonQuery
    urn-x:wfs:StoredQueryId:badc.nerc.ac.uk:extractGridSeriesFromGridSeries
    queryOne
    urn-x:wfs:StoredQueryId:badc.nerc.ac.uk:extractPointFromPointSeries
    urn-x:wfs:StoredQueryId:ISO:GetFeatureById
    urn-x:wfs:StoredQueryId:badc.nerc.ac.uk:extractPointSeriesFromPointSeries
    >>> for sq in wfs.storedqueries: print sq.title
    ExtractPointSeriesFromGridSeries
    SelectFeaturesByPhenomenon
    ExtractGridSeriesFromGridSeries
    test query
    ExtractPointFromPointSeries
    GetFeatureById
    ExtractPointSeriesFromPointSeries
    >>> for sq in wfs.storedqueries: print sq.returnfeaturetype
    csml:PointSeriesFeature
    csml:AbstractFeature
    csml:GridSeriesFeature
    xyzml:SomeFeatureType
    csml:PointFeature
    csml:AbstractFeature
    csml:PointSeriesFeature
    >>> for sq in wfs.storedqueries: print sq.abstract
    Extract a csml:PointSeries from a csml:GridSeriesFeature
    Select features based on their phenomenon type, e.g. "temperature"
    Extract a csml:GridSeries from a csml:GridSeriesFeature
    my test query
    Extract a csml:PointFeature for a single time instance from a csml:PointSeriesFeature
    Get any feature by id
    Extract a csml:PointSeriesFeature for a range of times from a csml:PointSeriesFeature
    >>> sq = wfs.storedqueries[2]
    >>> for param in sq.parameters: print "%s,  %s"%(param.name, param.type)
    featureid,  xsd:anyURI
    mintime,  gml:TimePositionUnion
    maxtime,  gml:TimePositionUnion
    bbox,  xsd:string
 
 Test GetPropertyValue
    >>> valref='{http://ndg.nerc.ac.uk/csml}parameter'
    >>> response=wfs.getpropertyvalue(valuereference=valref)
    >>> response
    '<?xml version="1.0"?>\n<wfs:ValueCollection xmlns:wfs="http://www.opengis.net/wfs" xmlns:gml="http://www.opengis.net/gml" xmlns:csml="http://ndg.nerc.ac.uk/csml" numberReturned="4">\n\t<wfs:member><csml:parameter xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://badc.rl.ac.uk/localparams#Maxiumum gust wind speed relative to mean speed"/></wfs:member><wfs:member><csml:parameter xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://badc.rl.ac.uk/localparams#Mean eastward wind"/></wfs:member><wfs:member><csml:parameter xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://badc.rl.ac.uk/localparams#Mean northward wind"/></wfs:member><wfs:member><csml:parameter xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://badc.rl.ac.uk/localparams#Miniumum gust wind speed relative to mean speed"/></wfs:member>\n</wfs:ValueCollection>'

