Changeset 3716
- Timestamp:
- 01/04/08 16:36:51 (13 years ago)
- Location:
- DPPP/kml/csml2kml/python
- Files:
-
- 3 added
- 4 edited
- 9 moved
Legend:
- Unmodified
- Added
- Removed
-
DPPP/kml/csml2kml/python/csml2kml/csml2kml/scripts/stations2kml.py
r3657 r3716 3 3 from csml2kml.ET import ElementTree 4 4 5 # Get the config file name 6 if len(sys.argv) != 2: 7 raise ValueError('The name of config file (and nothing more) required') 8 configFileName = sys.argv[1] 5 def main(): 9 6 10 # Load the configuration XML element 11 config = ElementTree().parse(configFileName) 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] 12 11 13 # Do the conversion 14 StationConvertor(config).convert() 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() -
DPPP/kml/csml2kml/python/csml2kml/csml2kml/scripts/wms2kml.py
r3657 r3716 5 5 from csml2kml.WMSLayerConvertor import WMSLayerConvertor 6 6 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] 7 def main(): 11 8 12 # Load the config file (in XML format) 13 configElementTree = ElementTree() 14 configElementTree.parse(configFileName) 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] 15 13 16 # Read the output root directory, and the root network URL where the output will be stored 17 outputRootDirectory = configElementTree.getroot().find('OutputRootDirectory').text 18 serverRootDirectory = configElementTree.getroot().find('ServerRootDirectory').text 14 # Load the config file (in XML format) 15 configElementTree = ElementTree() 16 configElementTree.parse(configFileName) 19 17 20 # Read in the Layers document from the source WMS service 21 wmsRequestConfigElement = configElementTree.getroot().find('WMSRequest') 22 wmsCapabilitiesUrl = wmsRequestConfigElement.find('URL').text + '?request=GetCapabilities' 23 wmsCapabilitiesElement = XML( wget(wmsCapabilitiesUrl) ) 24 wmsCapabilities = WMSCapabilities() 25 wmsCapabilities.parseXML(wmsCapabilitiesElement) 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 26 21 27 # Initialise the convertor and perform the conversion 28 wmsLayerConvertor = WMSLayerConvertor( 29 wmsCapabilities.topWmsLayer, wmsRequestConfigElement, outputRootDirectory, serverRootDirectory 30 ) 31 wmsLayerConvertor.convert() 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() -
DPPP/kml/csml2kml/python/csml2kml/setup.py
r3684 r3716 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 1 8 from setuptools import setup, find_packages 2 9 3 10 setup(name='csml2kml', 4 11 version='1.0b2', 5 install_depends=['csml>=2.0b'], 12 dependency_links=['http://ndg.nerc.ac.uk/dist'], 13 install_requires=['csml'], 6 14 include_package_data=True, 7 15 packages=find_packages(), 8 author='Martin Kochan, for the British Atmospheric Data Centre, UK', 9 description='Package eventually intended for converting CSML documents into KML documents, viawable in Google Earth.' 16 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 } 10 24 ) -
DPPP/kml/csml2kml/python/csml2kmlpylon/csml2kmlpylon.egg-info/SOURCES.txt
r3657 r3716 6 6 test.ini 7 7 csml2kmlpylon/__init__.py 8 csml2kmlpylon/__init__.pyc9 8 csml2kmlpylon/websetup.py 10 9 csml2kmlpylon.egg-info/PKG-INFO … … 17 16 csml2kmlpylon.egg-info/top_level.txt 18 17 csml2kmlpylon/config/__init__.py 19 csml2kmlpylon/config/__init__.pyc20 18 csml2kmlpylon/config/environment.py 21 csml2kmlpylon/config/environment.pyc22 csml2kmlpylon/config/midas.csml2kmlpylon.conf.xml23 19 csml2kmlpylon/config/middleware.py 24 csml2kmlpylon/config/middleware.pyc25 20 csml2kmlpylon/config/routing.py 26 csml2kmlpylon/config/routing.pyc27 21 csml2kmlpylon/controllers/__init__.py 28 csml2kmlpylon/controllers/__init__.pyc29 22 csml2kmlpylon/controllers/csmlGrapher.py 30 csml2kmlpylon/controllers/csmlGrapher.pyc31 23 csml2kmlpylon/controllers/error.py 32 24 csml2kmlpylon/controllers/template.py 33 25 csml2kmlpylon/lib/__init__.py 34 csml2kmlpylon/lib/__init__.pyc35 26 csml2kmlpylon/lib/app_globals.py 36 csml2kmlpylon/lib/app_globals.pyc37 27 csml2kmlpylon/lib/base.py 38 28 csml2kmlpylon/lib/helpers.py 39 csml2kmlpylon/lib/helpers.pyc40 29 csml2kmlpylon/model/__init__.py 41 30 csml2kmlpylon/public/index.html 31 csml2kmlpylon/public/midas_stations.kmz 42 32 csml2kmlpylon/tests/__init__.py 43 33 csml2kmlpylon/tests/test_models.py 44 34 csml2kmlpylon/tests/functional/__init__.py 45 docs/index.txt
Note: See TracChangeset
for help on using the changeset viewer.