Changeset 3717
- Timestamp:
- 01/04/08 18:05:36 (13 years ago)
- 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 3 3 from csml2kml.ET import ElementTree 4 4 5 def main(): 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] 6 9 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 11 config = ElementTree().parse(configFileName) 11 12 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 14 StationConvertor(config).convert() -
DPPP/kml/csml2kml/python/csml2kml/csml2kml/scripts/wms2kml.py
r3716 r3717 5 5 from csml2kml.WMSLayerConvertor import WMSLayerConvertor 6 6 7 def main(): 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] 8 11 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) 13 configElementTree = ElementTree() 14 configElementTree.parse(configFileName) 13 15 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 17 outputRootDirectory = configElementTree.getroot().find('OutputRootDirectory').text 18 serverRootDirectory = configElementTree.getroot().find('ServerRootDirectory').text 17 19 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 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) 21 26 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 28 wmsLayerConvertor = WMSLayerConvertor( 29 wmsCapabilities.topWmsLayer, wmsRequestConfigElement, outputRootDirectory, serverRootDirectory 30 ) 31 wmsLayerConvertor.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 Services6 '''7 8 1 from setuptools import setup, find_packages 9 2 10 3 setup(name='csml2kml', 11 4 version='1.0b2', 12 dependency_links=['http://ndg.nerc.ac.uk/dist'], 13 install_requires=['csml'], 5 install_requires=['csml>=2.0b'], 14 6 include_package_data=True, 15 7 packages=find_packages(), 16 8 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.' 24 10 ) -
DPPP/kml/csml2kml/python/csml2kmlpylon/csml2kmlpylon.egg-info/SOURCES.txt
r3716 r3717 6 6 test.ini 7 7 csml2kmlpylon/__init__.py 8 csml2kmlpylon/__init__.pyc 8 9 csml2kmlpylon/websetup.py 9 10 csml2kmlpylon.egg-info/PKG-INFO … … 16 17 csml2kmlpylon.egg-info/top_level.txt 17 18 csml2kmlpylon/config/__init__.py 19 csml2kmlpylon/config/__init__.pyc 18 20 csml2kmlpylon/config/environment.py 21 csml2kmlpylon/config/environment.pyc 22 csml2kmlpylon/config/midas.csml2kmlpylon.conf.xml 19 23 csml2kmlpylon/config/middleware.py 24 csml2kmlpylon/config/middleware.pyc 20 25 csml2kmlpylon/config/routing.py 26 csml2kmlpylon/config/routing.pyc 21 27 csml2kmlpylon/controllers/__init__.py 28 csml2kmlpylon/controllers/__init__.pyc 22 29 csml2kmlpylon/controllers/csmlGrapher.py 30 csml2kmlpylon/controllers/csmlGrapher.pyc 23 31 csml2kmlpylon/controllers/error.py 24 32 csml2kmlpylon/controllers/template.py 25 33 csml2kmlpylon/lib/__init__.py 34 csml2kmlpylon/lib/__init__.pyc 26 35 csml2kmlpylon/lib/app_globals.py 36 csml2kmlpylon/lib/app_globals.pyc 27 37 csml2kmlpylon/lib/base.py 28 38 csml2kmlpylon/lib/helpers.py 39 csml2kmlpylon/lib/helpers.pyc 29 40 csml2kmlpylon/model/__init__.py 30 41 csml2kmlpylon/public/index.html 31 csml2kmlpylon/public/midas_stations.kmz32 42 csml2kmlpylon/tests/__init__.py 33 43 csml2kmlpylon/tests/test_models.py 34 44 csml2kmlpylon/tests/functional/__init__.py 45 docs/index.txt
Note: See TracChangeset
for help on using the changeset viewer.