source: cows/trunk/cows/test/owslibdoctests/wms_mainoperations.txt @ 4857

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/cows/trunk/cows/test/owslibdoctests/wms_mainoperations.txt@4857
Revision 4857, 2.0 KB checked in by domlowe, 12 years ago (diff)

WMS doctest for main operations - some metadata still missing

Line 
1COWS Web Map Service doctest
2============================
3
4WMS Version 1.1.1
5=================
6
7
8    >>> from owslib.wms import WebMapService
9    >>> wms=WebMapService('http://localhost:5000/famous_control_month/csml_WMS', version='1.1.1')
10    >>> wms.url
11    'http://localhost:5000/famous_control_month/csml_WMS'
12    >>> wms.version
13    '1.1.1'
14    >>> wms.identification.service
15    'OGC:WMS'
16    >>> wms.identification.version
17    '1.1.1'
18    >>> wms.identification.title
19    'CSML test server'
20    >>> wms.identification.abstract
21    >>> wms.identification.keywords
22    []
23    >>> wms.identification.fees
24    >>> wms.identification.accessConstraints
25    >>> wms.provider.name
26    'British Atmospheric Data Centre'
27    >>> wms.provider.url
28    'http://localhost:5000/famous_control_month/csml_WMS?'
29    >>> wms.provider.contact.email
30    'D.Lowe@rl.ac.uk'
31    >>> wms.provider.contact.name
32    'Dominic Lowe'
33    >>> wms.provider.contact.organization
34    'British Atmospheric Data Centre'
35    >>> wms.provider.contact.address
36    '\n\t    STFC Rutherford Appleton Laboratory\n\t  '
37    >>> wms.provider.contact.city
38    'Didcot'
39    >>> wms.provider.contact.region
40    'Oxfordshire'
41    >>> wms.provider.contact.postcode
42    'OX11 0QX'
43    >>> wms.provider.contact.country
44    'UK'
45    >>> for item in wms.items(): print item[0]; break
46    toa_incoming_shortwave_flux
47    >>> layer=wms['surface_temperature']
48    >>> layer.title
49    'surface_temperature'
50    >>> layer.keywords
51    []
52    >>> wms.identification.accessConstraints
53    >>> wms.identification.fees
54    >>> layer.boundingBoxWGS84
55    (-180.0, -90.0, 180.0, 90.0)
56    >>> layer.timelimits
57    ['2792-12-16T00:00:00.0Z', '2992-11-16T00:00:00.0Z']
58    >>> layer.supportedFormats
59    []
60    >>> layer.supportedCRS
61    []
62    >>> output=wms.getmap(layers=['surface_temperature'],time='2992-11-16T00:00:00.0',bbox=(-80,30,50,60), srs='EPSG:4326', format='image/png',size=(300, 250)) 
63    >>> f=open('testimage.png', 'wb')
64    >>> f.write(output.read())
65    >>> f.close()
66
67
68
69
Note: See TracBrowser for help on using the repository browser.