source: cows/trunk/cows/test/owslibdoctests/wcs_mainoperations.txt @ 4982

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/cows/trunk/cows/test/owslibdoctests/wcs_mainoperations.txt@4982
Revision 4982, 1.9 KB checked in by domlowe, 13 years ago (diff)

tests now point at famous test subset, formatting capabilities template

Line 
1COWS Web Coverage Service doctest
2============================
3
4WCS Version 1.0.0
5=================
6
7
8    >>> from owslib.wcs import WebCoverageService
9    >>> wcs=WebCoverageService('http://localhost:5000/famous/wcs', version='1.0.0')
10    >>> wcs.url
11    'http://localhost:5000/famous/wcs'
12    >>> wcs.version
13    '1.0.0'
14    >>> wcs.identification.service
15    'OGC:WCS'
16    >>> wcs.identification.version
17    '1.0.0'
18    >>> wcs.identification.title
19    'OGC:WCS'
20    >>> wcs.identification.abstract
21    >>> wcs.identification.keywords
22    []
23    >>> wcs.identification.fees
24    >>> wcs.identification.accessConstraints
25    >>> wcs.provider.name
26    'British Atmospheric Data Centre'
27    >>> wcs.provider.url
28    'British Atmospheric Data Centre'
29    >>> wcs.provider.contact.email
30    'D.Lowe@rl.ac.uk'
31    >>> wcs.provider.contact.name
32    'Dominic Lowe'
33    >>> wcs.provider.contact.organization
34    'British Atmospheric Data Centre'
35    >>> wcs.provider.contact.address
36    'STFC Rutherford Appleton Laboratory'
37    >>> wcs.provider.contact.city
38    'Didcot'
39    >>> wcs.provider.contact.region
40    'Oxfordshire'
41    >>> wcs.provider.contact.postcode
42    'OX11 0QX'
43    >>> wcs.provider.contact.country
44    'UK'
45    >>> for item in wcs.items(): print item[0]
46    sea_ice_thickness
47    air_temperature
48    sea_water_salinity
49    cloud_area_fraction
50    >>> cvg=wcs['air_temperature']
51    >>> cvg.title
52    'air_temperature'
53    >>> cvg.keywords
54    []
55    >>> wcs.identification.accessConstraints
56    >>> wcs.identification.fees
57    >>> cvg.boundingBoxWGS84
58    (-180.0, -90.0, 180.0, 90.0)
59    >>> cvg.timelimits
60    ['2793-06-01T00:00:00.0Z', '2932-06-01T00:00:00.0Z']
61    >>> cvg.supportedFormats
62    []
63    >>> cvg.supportedCRS
64    []
65    >>> output=wcs.getCoverage(identifier='air_temperature',time=['2992-11-16T00:00:00.0'],bbox=(-80,30,50,60), crs='WGS84', format='cf-netcdf')
66    >>> f=open('test.nc', 'wb')
67    >>> f.write(output.read())
68    >>> f.close()
69
70
71
72
Note: See TracBrowser for help on using the repository browser.