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

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

adding OWSLib doctest for WCS

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_control_month/wcs', version='1.0.0')
10    >>> wcs.url
11    'http://localhost:5000/famous_control_month/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    toa_incoming_shortwave_flux
47    runoff_flux
48    surface_downwelling_shortwave_flux_in_air
49    surface_downward_northward_stress
50    surface_upward_sensible_heat_flux
51    specific_humidity
52    surface_air_pressure
53    air_temperature
54    eastward_wind
55    relative_humidity_2
56    tendency_of_sea_ice_thickness_due_to_thermodynamics
57    sea_ice_thickness
58    sea_ice_area_fraction
59    surface_upward_water_vapor_flux
60    ocean_meridional_overturning_streamfunction_4
61    eastward_wind_2
62    air_pressure_at_sea_level
63    cloud_area_fraction
64    ocean_meridional_overturning_streamfunction_2
65    ocean_meridional_overturning_streamfunction_3
66    sea_water_salinity
67    eastward_sea_water_velocity
68    surface_downward_eastward_stress
69    surface_downwelling_longwave_flux_in_air
70    northward_wind
71    air_temperature_2
72    sea_water_potential_temperature
73    tendency_of_sea_ice_thickness_due_to_dynamics
74    northward_sea_water_velocity
75    surface_downward_heat_flux_in_sea_water
76    toa_outgoing_shortwave_flux
77    surface_snow_amount
78    upward_sea_water_velocity
79    toa_outgoing_longwave_flux
80    geopotential_height
81    surface_upwelling_longwave_flux_in_air
82    surface_upwelling_shortwave_flux_in_air
83    water_flux_into_ocean
84    surface_temperature
85    ocean_meridional_overturning_streamfunction
86    surface_upward_latent_heat_flux
87    relative_humidity
88    northward_wind_2
89    precipitation_flux
90    >>> cvg=wcs['surface_temperature']
91    >>> cvg.title
92    'surface_temperature'
93    >>> cvg.keywords
94    []
95    >>> wcs.identification.accessConstraints
96    >>> wcs.identification.fees
97    >>> cvg.boundingBoxWGS84
98    (-180.0, -90.0, 180.0, 90.0)
99    >>> cvg.timelimits
100    ['2792-12-16T00:00:00.0Z', '2992-11-16T00:00:00.0Z']
101    >>> cvg.supportedFormats
102    []
103    >>> cvg.supportedCRS
104    []
105    >>> output=wcs.getCoverage(identifier='surface_temperature',time=['2992-11-16T00:00:00.0'],bbox=(-80,30,50,60), crs='WGS84', format='cf-netcdf')
106    >>> f=open('test.nc', 'wb')
107    >>> f.write(output.read())
108    >>> f.close()
109
110
111
112
Note: See TracBrowser for help on using the repository browser.