Ignore:
Timestamp:
27/02/08 15:59:44 (12 years ago)
Author:
mkochan
Message:

Changed WMSLayer convertor to save to KMZ files.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • DPPP/kml/csml2kml/python/csml2kml/csml2kml/WMSCapabilities.py

    r3534 r3537  
    386386 
    387387            # Save the KML document 
    388             filename = parentDir + '/' + wmsLayer.title + '.kml' 
    389             kmlDocument.save(filename) 
    390             print 'Saved file "%s"' % filename 
     388            dockmlFilename = parentDir + '/doc.kml' 
     389            kmzFilename = parentDir + '/' + wmsLayer.title + '.kmz' 
     390            kmlDocument.save(dockmlFilename) 
     391            quietZipCommand = 'zip -q ' + ' "' + kmzFilename + '" "' + dockmlFilename + '"' 
     392            os.system(quietZipCommand) 
     393            os.remove(dockmlFilename) 
     394            print 'Saved file "%s"' % kmzFilename 
    391395 
    392396        def _convertToDirectory(wmsLayer, parentLayersStack, parentDir, currentLevel): 
Note: See TracChangeset for help on using the changeset viewer.