Ignore:
Timestamp:
26/02/08 12:48:51 (14 years ago)
Author:
mkochan
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • DPPP/kml/csml2kml/python/csml2kml/csml2kml/tests/testWMSCapabilities.py

    r3514 r3516  
    1 from cElementTree import ElementTree 
     1from cElementTree import ElementTree, XML 
    22 
    33import utils 
    44from WMSCapabilities import * 
    55 
    6 etree = ElementTree() 
    7 etree.parse('../../../../testdata/ar4-shortened.xml') 
     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) ) 
    818wmsCapabilities = WMSCapabilities() 
    9 wmsCapabilitiesElement = etree.getroot() 
    10  
    1119wmsCapabilities.parseXML(wmsCapabilitiesElement) 
    1220###print wmsCapabilities 
    1321###print 
    1422 
    15 etree2 = ElementTree() 
    16 etree2.parse('../../../../testdata/ar4.conf.xml') 
    17 wmsRequestConfigElement = etree2.getroot().find('WMSRequest') 
    18  
    1923wmsLayersConvertor = WMSLayersConvertor( 
    20     wmsCapabilities.topWmsLayer, wmsRequestConfigElement, '../../../../output/wms-ar4', 1 
     24    wmsCapabilities.topWmsLayer, wmsRequestConfigElement, '../../../../output/wms-obs', 0 
    2125    ) 
    2226wmsLayersConvertor.convert() 
Note: See TracChangeset for help on using the changeset viewer.