• 大小: 9.1MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-10-06
  • 语言: 其他
  • 标签: libkml  google  

资源简介

libkml-1.2源码包,可以在linux下编译,包括第三方库expat,uriparser等

资源截图

代码片段和文件信息

#!/usr/bin/env python

# Copyright 2008 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms with or without 
# modification are permitted provided that the following conditions are met:
#
#  1. Redistributions of source code must retain the above copyright notice 
#     this list of conditions and the following disclaimer.
#  2. Redistributions in binary form must reproduce the above copyright notice
#     this list of conditions and the following disclaimer in the documentation
#     and/or other materials provided with the distribution.
#  3. Neither the name of Google Inc. nor the names of its contributors may be
#     used to endorse or promote products derived from this software without
#     specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ‘‘AS IS‘‘ AND ANY EXPRESS OR IMPLIED
# WARRANTIES INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF 
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT INDIRECT INCIDENTAL 
# SPECIAL EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING BUT NOT LIMITED TO
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE DATA OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY
# WHETHER IN CONTRACT STRICT LIABILITY OR TORT (INCLUDING NEGLIGENCE OR 
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE EVEN IF 
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

# A simple graphical application that parses a local or remote KML or KMZ file
# and displays the parsed Features in a tree format.
# Usage: call ./domviewer.py from a terminal command line then use the
# File > Open File command to load a file. You may also supply a file
# (local filesystem or over http) to open on the command line as
# ./domviewer.py input.kml

import os
import sys
import tempfile
import urllib2
import zipfile
from idlelib.TreeWidget import TreeItem TreeNode
from Tkinter import *
from tkFileDialog import askopenfilename
from tkSimpleDialog import askstring
from tkMessageBox import showwarning
import kmldom

class DomTreeItem(TreeItem):
  def __init__(self element):
    self.__element = element
    if element.has_name():
      self.__name = element.get_name()
    elif element.IsA(kmldom.Type_Document):
      self.__name = ‘Unnamed Document‘
    elif element.IsA(kmldom.Type_Folder):
      self.__name = ‘Unnamed Folder‘
    elif element.IsA(kmldom.Type_Placemark):
      self.__name = ‘Unnamed Placemark‘
    elif element.IsA(kmldom.Type_ScreenOverlay):
      self.__name = ‘Unnamed ScreenOverlay‘
    elif element.IsA(kmldom.Type_PhotoOverlay):
      self.__name = ‘Unnamed PhotoOverlay‘
    elif element.IsA(kmldom.Type_GroundOverlay):
      self.__name = ‘Unnamed GroundOverlay‘
    elif element.IsA(kmldom.Type_Networklink):
      self.__name = ‘Unnamed Networklink‘
    else:
      self.__name = ‘Unknown Feature‘

  def GetText(self):
    return se

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2010-02-19 15:34  libkml-release-1.0\
     文件          23  2010-02-19 15:34  libkml-release-1.0\AUTHORS
     文件        1437  2010-02-19 15:34  libkml-release-1.0\COPYING
     文件         196  2010-02-19 15:34  libkml-release-1.0\ChangeLog
     文件         699  2010-02-19 15:34  libkml-release-1.0\DEPENDENCIES
     文件        9236  2010-02-19 15:34  libkml-release-1.0\INSTALL
     文件         154  2010-02-19 15:34  libkml-release-1.0\Makefile.am
     文件           0  2010-02-19 15:34  libkml-release-1.0\NEWS
     文件         561  2010-02-19 15:34  libkml-release-1.0\README
     文件         430  2010-02-19 15:34  libkml-release-1.0\autogen.sh
     文件        7685  2010-02-19 15:34  libkml-release-1.0\configure.ac
     目录           0  2010-02-19 15:34  libkml-release-1.0\doc\
     文件         101  2010-02-19 15:34  libkml-release-1.0\doc\README
     目录           0  2010-02-19 15:34  libkml-release-1.0\examples\
     文件         147  2010-02-19 15:34  libkml-release-1.0\examples\Makefile.am
     目录           0  2010-02-19 15:34  libkml-release-1.0\examples\domviewer\
     文件          29  2010-02-19 15:34  libkml-release-1.0\examples\domviewer\Makefile.am
     文件        6899  2010-02-19 15:34  libkml-release-1.0\examples\domviewer\domviewer.py
     目录           0  2010-02-19 15:34  libkml-release-1.0\examples\engine\
     文件        3236  2010-02-19 15:34  libkml-release-1.0\examples\engine\Makefile.am
     文件        3838  2010-02-19 15:34  libkml-release-1.0\examples\engine\balloonwalker.cc
     文件        3122  2010-02-19 15:34  libkml-release-1.0\examples\engine\change.cc
     文件        3496  2010-02-19 15:34  libkml-release-1.0\examples\engine\clone.cc
     文件        4245  2010-02-19 15:34  libkml-release-1.0\examples\engine\csv2kml.cc
     文件        3545  2010-02-19 15:34  libkml-release-1.0\examples\engine\import.cc
     文件        2773  2010-02-19 15:34  libkml-release-1.0\examples\engine\inlinestyles.cc
     文件        2829  2010-02-19 15:34  libkml-release-1.0\examples\engine\kml2kmz.cc
     文件        3035  2010-02-19 15:34  libkml-release-1.0\examples\engine\kmlfile.cc
     文件        3255  2010-02-19 15:34  libkml-release-1.0\examples\engine\kmzchecklinks.cc
     文件        3632  2010-02-19 15:34  libkml-release-1.0\examples\engine\oldschema.cc
     文件        2614  2010-02-19 15:34  libkml-release-1.0\examples\engine\parsebig.cc
............此处省略1169个文件信息

评论

共有 条评论