source: DPPP/kml/csml2kml/python/csml2kml/csml2kml/tests/testWMSCapabilities.py @ 3516

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/DPPP/kml/csml2kml/python/csml2kml/csml2kml/tests/testWMSCapabilities.py@3516
Revision 3516, 887 bytes checked in by mkochan, 14 years ago (diff)

Changed WMSCapabilities.py so that it generates "obs" dataset. Still need to change ViewWholeTimecourse?.

Line 
1from cElementTree import ElementTree, XML
2
3import utils
4from WMSCapabilities import *
5
6configElementTree = ElementTree()
7configElementTree.parse('../../../../testdata/obs.conf.xml')
8wmsRequestConfigElement = configElementTree.getroot().find('WMSRequest')
9
10###etree = ElementTree()
11###etree.parse('../../../../testdata/ar4-shortened.xml')
12###wmsCapabilities = WMSCapabilities()
13###wmsCapabilitiesElement = etree.getroot()
14###print wmsCapabilities
15
16wmsCapabilitiesUrl = wmsRequestConfigElement.find('URL').text + '?request=GetCapabilities'
17wmsCapabilitiesElement = XML( utils.wget(wmsCapabilitiesUrl) )
18wmsCapabilities = WMSCapabilities()
19wmsCapabilities.parseXML(wmsCapabilitiesElement)
20###print wmsCapabilities
21###print
22
23wmsLayersConvertor = WMSLayersConvertor(
24    wmsCapabilities.topWmsLayer, wmsRequestConfigElement, '../../../../output/wms-obs', 0
25    )
26wmsLayersConvertor.convert()
Note: See TracBrowser for help on using the repository browser.