• 大小: 6.38MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-09-25
  • 语言: Java
  • 标签: worldwind  GIS  开源  

资源简介

NASA开发的三维地球,自己动手来搭建三维地球

资源截图

代码片段和文件信息

/* Copyright (C) 2001 2007 United States Government as represented by
   the Administrator of the National Aeronautics and Space Administration.
   All Rights Reserved.
*/
package gov.nasa.worldwind.servers.installers;

import gov.nasa.worldwind.formats.rpf.*;
import gov.nasa.worldwind.servers.tools.*;
import org.w3c.dom.*;

import javax.swing.*;
import javax.swing.border.*;
import javax.swing.filechooser.FileFilter;
import javax.swing.tree.*;
import javax.xml.parsers.*;
import javax.xml.transform.*;
import javax.xml.transform.dom.*;
import javax.xml.transform.stream.*;
import javax.xml.xpath.*;
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.net.*;
import java.util.*;
import java.util.concurrent.atomic.*;

/**
 * @author brownrigg
 * @version $Id: RPFInstaller.java 8674 2009-01-30 20:33:06Z garakl $
 */
public class RPFInstaller extends javax.swing.Jframe
{

    /**
     * Creates new form RPFInstaller
     */
    public RPFInstaller()
    {
        initComponents();
    }

    //
    // Verifies that a WMS is installed on this system where we expect it to be.
    // The convention for TerraRaptor is that it resides in the same directory as
    // this installer.
    //
    private void verifyWmsLocation()
    {
        try
        {
            URL myUrl = RPFInstaller.class.getClassLoader().getResource(“WEB-INF“);
            this.wmsDir = null;
            if(null != myUrl)
                this.wmsDir = new File(myUrl.toURI());
            else
            {
                // no luck let‘s try default WMS locations
                String[] wms_install_dirs = {
                        // check current directory
                        new File(“.“).getCanonicalPath() + File.separator +  “WEB-INF“
                        // default install on Mac OS X
                        “/Application/xampp/wms/WEB-INF“
                        // default install on Linux
                        “/opt/lampp/wms/WEB-INF“
                        // default install on Windows
                        “C:\\xampp\\wms\\WEB-INF“
                };
                for(String path:wms_install_dirs)
                {
                    File dir = new File(path);
                    if(null != dir && dir.exists() && dir.isDirectory())
                    {
                        this.wmsDir = dir;
                        break;
                    }
                }
            }

            if (this.wmsDir == null)
                throw new Exception(“Could not locate WMS‘s WEB-INF directory“);
            this.wmsConfigFile = new File(wmsDir.getAbsolutePath() + File.separator + “config.xml“);
            if (!this.wmsConfigFile.exists())
                throw new Exception(“Could not find WMS‘s config.xml as expected“);

            if (!wmsConfigFile.canWrite())
                throw new Exception(
                    “WMS installation found; user does not have privileges to modify its configuration“);

            loadWMSConfigDo

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2009-08-05 16:31  WEB-INF\
     目录           0  2009-08-05 16:31  doc\
     目录           0  2009-08-05 16:31  doc\gov\
     目录           0  2009-08-05 16:31  doc\gov\nasa\
     目录           0  2009-08-05 16:31  doc\gov\nasa\worldwind\
     目录           0  2009-08-05 16:31  doc\gov\nasa\worldwind\servers\
     目录           0  2009-08-05 16:31  doc\gov\nasa\worldwind\servers\installers\
     目录           0  2009-08-05 16:31  doc\gov\nasa\worldwind\servers\installers\class-use\
     目录           0  2009-08-05 16:31  doc\gov\nasa\worldwind\servers\tools\
     目录           0  2009-08-05 16:31  doc\gov\nasa\worldwind\servers\tools\class-use\
     目录           0  2009-08-05 16:31  doc\gov\nasa\worldwind\servers\tools\gdal\
     目录           0  2009-08-05 16:31  doc\gov\nasa\worldwind\servers\tools\gdal\class-use\
     目录           0  2009-08-05 16:31  doc\gov\nasa\worldwind\servers\tools\naip\
     目录           0  2009-08-05 16:31  doc\gov\nasa\worldwind\servers\tools\naip\class-use\
     目录           0  2009-08-05 16:31  doc\gov\nasa\worldwind\servers\tools\prep\
     目录           0  2009-08-05 16:31  doc\gov\nasa\worldwind\servers\tools\prep\class-use\
     目录           0  2009-08-05 16:31  doc\gov\nasa\worldwind\servers\tools\utm\
     目录           0  2009-08-05 16:31  doc\gov\nasa\worldwind\servers\tools\utm\class-use\
     目录           0  2009-08-05 16:31  doc\gov\nasa\worldwind\servers\tools\xml\
     目录           0  2009-08-05 16:31  doc\gov\nasa\worldwind\servers\tools\xml\class-use\
     目录           0  2009-08-05 16:31  doc\gov\nasa\worldwind\servers\wms\
     目录           0  2009-08-05 16:31  doc\gov\nasa\worldwind\servers\wms\class-use\
     目录           0  2009-08-05 16:31  doc\gov\nasa\worldwind\servers\wms\formats\
     目录           0  2009-08-05 16:31  doc\gov\nasa\worldwind\servers\wms\formats\class-use\
     目录           0  2009-08-05 16:31  doc\gov\nasa\worldwind\servers\wms\generators\
     目录           0  2009-08-05 16:31  doc\gov\nasa\worldwind\servers\wms\generators\class-use\
     目录           0  2009-08-05 16:31  doc\gov\nasa\worldwind\servers\wms\utilities\
     目录           0  2009-08-05 16:31  doc\gov\nasa\worldwind\servers\wms\utilities\class-use\
     目录           0  2009-08-05 16:31  doc\index-files\
     目录           0  2009-08-05 16:31  doc\resources\
     目录           0  2009-08-05 16:31  lib\
............此处省略422个文件信息

评论

共有 条评论