Changeset 3717 for DPPP


Ignore:
Timestamp:
01/04/08 18:05:36 (11 years ago)
Author:
mkochan
Message:

Reverted to the version without the API dir.

Location:
DPPP/kml/csml2kml/python
Files:
2 deleted
14 edited
9 copied

Legend:

Unmodified
Added
Removed
  • DPPP/kml/csml2kml/python/csml2kml/csml2kml/scripts/stations2kml.py

    r3716 r3717  
    33from csml2kml.ET import ElementTree 
    44 
    5 def main(): 
     5# Get the config file name 
     6if len(sys.argv) != 2: 
     7    raise ValueError('The name of config file (and nothing more) required') 
     8configFileName = sys.argv[1] 
    69 
    7     # Get the config file name 
    8     if len(sys.argv) != 2: 
    9         raise ValueError('The name of config file (and nothing more) required') 
    10     configFileName = sys.argv[1] 
     10# Load the configuration XML element 
     11config = ElementTree().parse(configFileName) 
    1112 
    12     # Load the configuration XML element 
    13     config = ElementTree().parse(configFileName) 
    14  
    15     # Do the conversion 
    16     StationConvertor(config).convert() 
    17  
    18 if __name__ == '__main__': 
    19     main() 
     13# Do the conversion 
     14StationConvertor(config).convert() 
  • DPPP/kml/csml2kml/python/csml2kml/csml2kml/scripts/wms2kml.py

    r3716 r3717  
    55from csml2kml.WMSLayerConvertor import WMSLayerConvertor 
    66 
    7 def main(): 
     7# Get the config file name 
     8if len(sys.argv) != 2: 
     9    raise ValueError('The name of config file (and nothing more) required') 
     10configFileName = sys.argv[1] 
    811 
    9     # Get the config file name 
    10     if len(sys.argv) != 2: 
    11         raise ValueError('The name of config file (and nothing more) required') 
    12     configFileName = sys.argv[1] 
     12# Load the config file (in XML format) 
     13configElementTree = ElementTree() 
     14configElementTree.parse(configFileName) 
    1315 
    14     # Load the config file (in XML format) 
    15     configElementTree = ElementTree() 
    16     configElementTree.parse(configFileName) 
     16# Read the output root directory, and the root network URL where the output will be stored 
     17outputRootDirectory = configElementTree.getroot().find('OutputRootDirectory').text 
     18serverRootDirectory = configElementTree.getroot().find('ServerRootDirectory').text 
    1719 
    18     # Read the output root directory, and the root network URL where the output will be stored 
    19     outputRootDirectory = configElementTree.getroot().find('OutputRootDirectory').text 
    20     serverRootDirectory = configElementTree.getroot().find('ServerRootDirectory').text 
     20# Read in the Layers document from the source WMS service 
     21wmsRequestConfigElement = configElementTree.getroot().find('WMSRequest') 
     22wmsCapabilitiesUrl = wmsRequestConfigElement.find('URL').text + '?request=GetCapabilities' 
     23wmsCapabilitiesElement = XML( wget(wmsCapabilitiesUrl) ) 
     24wmsCapabilities = WMSCapabilities() 
     25wmsCapabilities.parseXML(wmsCapabilitiesElement) 
    2126 
    22     # Read in the Layers document from the source WMS service 
    23     wmsRequestConfigElement = configElementTree.getroot().find('WMSRequest') 
    24     wmsCapabilitiesUrl = wmsRequestConfigElement.find('URL').text + '?request=GetCapabilities' 
    25     wmsCapabilitiesElement = XML( wget(wmsCapabilitiesUrl) ) 
    26     wmsCapabilities = WMSCapabilities() 
    27     wmsCapabilities.parseXML(wmsCapabilitiesElement) 
    28  
    29     # Initialise the convertor and perform the conversion 
    30     wmsLayerConvertor = WMSLayerConvertor( 
    31         wmsCapabilities.topWmsLayer, wmsRequestConfigElement, outputRootDirectory, serverRootDirectory 
    32         ) 
    33     wmsLayerConvertor.convert() 
    34  
    35 if __name__ == '__main__': 
    36     main() 
     27# Initialise the convertor and perform the conversion 
     28wmsLayerConvertor = WMSLayerConvertor( 
     29    wmsCapabilities.topWmsLayer, wmsRequestConfigElement, outputRootDirectory, serverRootDirectory 
     30    ) 
     31wmsLayerConvertor.convert() 
  • DPPP/kml/csml2kml/python/csml2kml/setup.py

    r3716 r3717  
    1 ''' 
    2 csml2kml, a Python package for conversion of CSML and associated context data into KML document, viawable in Google Earth. 
    3 Copyright (C) 2008 BADC (British Atmospheric Data Centre) 
    4  
    5 @author: Martin Kochan, Tessella Support Services 
    6 ''' 
    7  
    81from setuptools import setup, find_packages 
    92 
    103setup(name='csml2kml', 
    114      version='1.0b2', 
    12       dependency_links=['http://ndg.nerc.ac.uk/dist'], 
    13       install_requires=['csml'], 
     5      install_requires=['csml>=2.0b'], 
    146      include_package_data=True, 
    157      packages=find_packages(), 
    168      author='Martin Kochan', 
    17       description='Performs conversion of CSML and associated context data into KML document, viawable in Google Earth.', 
    18       entry_points = { 
    19         'console_scripts': [ 
    20             'wms2kml = scripts.wms2kml:main', 
    21             'station2kml = scripts.station2kml:main' 
    22             ] 
    23         } 
     9      description='Package converting CSML documents and context documents into KML documents, viawable in Google Earth.' 
    2410      ) 
  • DPPP/kml/csml2kml/python/csml2kmlpylon/csml2kmlpylon.egg-info/SOURCES.txt

    r3716 r3717  
    66test.ini 
    77csml2kmlpylon/__init__.py 
     8csml2kmlpylon/__init__.pyc 
    89csml2kmlpylon/websetup.py 
    910csml2kmlpylon.egg-info/PKG-INFO 
     
    1617csml2kmlpylon.egg-info/top_level.txt 
    1718csml2kmlpylon/config/__init__.py 
     19csml2kmlpylon/config/__init__.pyc 
    1820csml2kmlpylon/config/environment.py 
     21csml2kmlpylon/config/environment.pyc 
     22csml2kmlpylon/config/midas.csml2kmlpylon.conf.xml 
    1923csml2kmlpylon/config/middleware.py 
     24csml2kmlpylon/config/middleware.pyc 
    2025csml2kmlpylon/config/routing.py 
     26csml2kmlpylon/config/routing.pyc 
    2127csml2kmlpylon/controllers/__init__.py 
     28csml2kmlpylon/controllers/__init__.pyc 
    2229csml2kmlpylon/controllers/csmlGrapher.py 
     30csml2kmlpylon/controllers/csmlGrapher.pyc 
    2331csml2kmlpylon/controllers/error.py 
    2432csml2kmlpylon/controllers/template.py 
    2533csml2kmlpylon/lib/__init__.py 
     34csml2kmlpylon/lib/__init__.pyc 
    2635csml2kmlpylon/lib/app_globals.py 
     36csml2kmlpylon/lib/app_globals.pyc 
    2737csml2kmlpylon/lib/base.py 
    2838csml2kmlpylon/lib/helpers.py 
     39csml2kmlpylon/lib/helpers.pyc 
    2940csml2kmlpylon/model/__init__.py 
    3041csml2kmlpylon/public/index.html 
    31 csml2kmlpylon/public/midas_stations.kmz 
    3242csml2kmlpylon/tests/__init__.py 
    3343csml2kmlpylon/tests/test_models.py 
    3444csml2kmlpylon/tests/functional/__init__.py 
     45docs/index.txt 
Note: See TracChangeset for help on using the changeset viewer.