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

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

Corrected bug in saving KML files, working on saving KMZ files.

Line 
1import getopt
2from cElementTree import ElementTree, XML
3
4import utils
5from WMSCapabilities import *
6
7configElementTree = ElementTree()
8configElementTree.parse('../../../../testdata/obs.conf.xml')
9wmsRequestConfigElement = configElementTree.getroot().find('WMSRequest')
10
11wmsCapabilitiesUrl = wmsRequestConfigElement.find('URL').text + '?request=GetCapabilities'
12wmsCapabilitiesElement = XML( utils.wget(wmsCapabilitiesUrl) )
13wmsCapabilities = WMSCapabilities()
14wmsCapabilities.parseXML(wmsCapabilitiesElement)
15
16wmsLayersConvertor = WMSLayersConvertor(
17    wmsCapabilities.topWmsLayer, wmsRequestConfigElement, '../../../../output/wms-obs2', 'http://bond.badc.rl.ac.uk:8089'
18    )
19wmsLayersConvertor.convert()
Note: See TracBrowser for help on using the repository browser.