亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? esriplugin.java

?? openmap java寫的開源數字地圖程序. 用applet實現,可以像google map 那樣放大縮小地圖.
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
// **********************************************************************// // <copyright>// //  BBN Technologies//  10 Moulton Street//  Cambridge, MA 02138//  (617) 873-8000// //  Copyright (C) BBNT Solutions LLC. All rights reserved.// // </copyright>// **********************************************************************// // $Source: /cvs/distapps/openmap/src/openmap/com/bbn/openmap/plugin/esri/EsriPlugIn.java,v $// $RCSfile: EsriPlugIn.java,v $// $Revision: 1.9.2.3 $// $Date: 2005/08/09 21:17:49 $// $Author: dietrick $// // **********************************************************************package com.bbn.openmap.plugin.esri;import java.awt.BorderLayout;import java.awt.Component;import java.awt.GridLayout;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import java.awt.event.MouseEvent;import java.net.MalformedURLException;import java.net.URL;import java.util.ArrayList;import java.util.Properties;import java.util.Vector;import javax.swing.DefaultListSelectionModel;import javax.swing.JButton;import javax.swing.JFrame;import javax.swing.JPanel;import javax.swing.JScrollPane;import javax.swing.JTable;import javax.swing.ListSelectionModel;import javax.swing.event.ListSelectionEvent;import javax.swing.event.ListSelectionListener;import com.bbn.openmap.Layer;import com.bbn.openmap.dataAccess.shape.DbfTableModel;import com.bbn.openmap.dataAccess.shape.DrawingAttributesUtility;import com.bbn.openmap.dataAccess.shape.EsriGraphicList;import com.bbn.openmap.dataAccess.shape.EsriPointList;import com.bbn.openmap.dataAccess.shape.EsriPolygonList;import com.bbn.openmap.dataAccess.shape.EsriPolylineList;import com.bbn.openmap.dataAccess.shape.EsriShapeExport;import com.bbn.openmap.dataAccess.shape.ShapeConstants;import com.bbn.openmap.omGraphics.DrawingAttributes;import com.bbn.openmap.omGraphics.OMGraphic;import com.bbn.openmap.omGraphics.OMGraphicList;import com.bbn.openmap.plugin.AbstractPlugIn;import com.bbn.openmap.proj.Projection;import com.bbn.openmap.util.DataBounds;import com.bbn.openmap.util.DataBoundsProvider;import com.bbn.openmap.util.Debug;import com.bbn.openmap.util.PropUtils;/** * EsriPlugIn loads Esri shape file sets from web servers or local * file systems, and it enables the creation of shape file sets. It * needs to be inserted into a PlugInLayer to use within OpenMap. * <P> * To create a file from a remote location: <code><pre> *  * URL shp = new URL(&quot;http://www.webserver.com/file.shp&quot;); * URL dbf = new URL(&quot;http://www.webserver.com/file.dbf&quot;); * URL shx = new URL(&quot;http://www.webserver.com/file.shx&quot;); * EsriPlugIn epi = new EsriPlugIn(&quot;name&quot;, dbf, shp, shx); * PlugInLayer pil = new PlugInLayer(); * pil.setPlugIn(epi); *  * </pre></code> *  * To open a shape file set from the local file system: <code><pre> *  * File dbf = new File(&quot;c:/data/file.dbf&quot;); * File shp = new File(&quot;c:/data/file.shp&quot;); * File shx = new File(&quot;c:/data/file.shx&quot;); * EsriPlugIn epi = new EsriPlugIn(&quot;name&quot;, dbf.toURL(), shp.toURL(), shx.toURL()); * PlugInLayer pil = new PlugInLayer(); * pil.setPlugIn(epi); *  * </pre></code> *  * To create a zero content shape file set from which the user can add * shapes at runtime: <code><pre> * EsriPlugIn epi = new EsriPlugIn(&quot;name&quot;, EsriLayer.TYPE_POLYLINE); *  * </pre></code> *  * To add features to an EsriLayer: <code><pre> *  * OMGraphicList shapeData = new OMGraphicList(); * ArrayList tabularData = new ArrayList(); * float[] part0 = new float[] { 35.0f, -120.0f, -25.0f, -95.0f, 56.0f, -30.0f }; * float[] part1 = new float[] { -15.0f, -110.0f, 13.0f, -80.0f, -25.0f, 10.0f }; * OMPoly poly0 = new OMPoly(part0, OMGraphic.DECIMAL_DEGREES, OMGraphic.LINETYPE_RHUMB); * OMPoly poly1 = new OMPoly(part1, OMGraphic.DECIMAL_DEGREES, OMGraphic.LINETYPE_RHUMB); * shapeData.add(poly0); //part 1 * shapeData.add(poly1); //part 2 * shapeData.generate(_mapBean.getProjection()); * tabularData.add(0, &quot;a value&quot;); * plugin.addRecord(shapeData, tabularData); * plugin.repaint(); // assumes that plugin added to PlugInLayer *  * </pre></code> *  * To configure an EsriLayer through a properties file, specify file * references in terms of URLs, full or relative file paths. *  * To reference a file on Windows 2000: <code><pre> *      *      *        esri.class = com.bbn.openmap.plugin.esri.EsriPlugIn *        esri.prettyName = Esri Example *        esri.shp = file:///c:/data/shapefile.shp *      # -or- *        esri.shp = c:/data/shapefile.shp *      *        esri.dbf = file:///c:/data/shapefile.dbf *        esri.shx = file:///c:/data/shapefile.shx *      *       * </pre></code> *  * To reference a file on RedHat Linux 6.2: <code><pre> *      *      *        esri.class = com.bbn.openmap.plugin.esri.EsriPlugIn *        esri.prettyName = Esri Example *        esri.shp = file:///home/dvanauke/resources/shapefile.shp *      # - or - *        esri.shp = /home/dvanauke/resources/shapefile.shp *      *        esri.dbf = file:///home/dvanauke/resources/shapefile.dbf *        esri.shx = file:///home/dvanauke/resources/shapefile.shx *      *       * </pre></code> *  * To reference a file on a web server: <code><pre> *      *      *        esri.class = com.bbn.openmap.plugin.esri.EsriPlugIn *        esri.prettyName = Esri Example *        esri.shp = http://www.webserver.com/shapefile.shp *        esri.dbf = http://www.webserver.com/shapefile.dbf *        esri.shx = http://www.webserver.com/shapefile.shx *      *       * </pre></code> *  * The PlugIn has been updated to use the properties from the * DrawingAttributes object in order to specify how it's objects * should be rendered: <code><pre> *      *      *        esri.class = com.bbn.openmap.plugin.esri.EsriPlugIn *        esri.prettyName = Esri Example *        esri.lineColor = AARRGGBB (hex ARGB color) *        esri.fillColor = AARRGGBB (hex ARGB color) *        esri.selectColor = AARRGGBB (hex ARGB color) *        esri.lineWidth = AARRGGBB (hex ARGB color) *      *       * </pre></code> *  * See DrawingAttributes for more options. Also, as of OpenMap 4.5.4, * you don't have to specify the location of the .dbf and .shx files. * If you don't, the plugin assumes that those files are next to the * .shp file. *  * @author Doug Van Auken * @author Don Dietrick * @author Lonnie Goad from OptiMetrics provided selection bug *         solution and GUI interaction. */public class EsriPlugIn extends AbstractPlugIn implements ShapeConstants,        DataBoundsProvider {    private EsriGraphicList _list = null;    private DbfTableModel _model = null;    private int _type = -1;    private String dbf;    private String shx;    private String shp;    /**     * A simple list mechanism that will let selected OMGraphics to be     * drawn on top of all the others. Using this list instead of     * changing the order of the esri graphic list maintains the order     * of that list. We clear out this and add to it as necessary.     */    protected OMGraphicList selectedGraphics = new OMGraphicList();    /** The last projection. */    protected Projection proj;    protected DrawingAttributes drawingAttributes = DrawingAttributes.getDefaultClone();    /**     * Creates an EsriPlugIn that will be configured through the     * <code>setProperties()</code> method     */    public EsriPlugIn() {        Debug.message("esri", "EsriPlugIn: default constructor");    }    /**     * Creates an empty EsriPlugIn, useable for adding features at     * run-time.     *      * @param name The name of the layer     * @param type The type of layer     * @param columnCount The number of columns in the dbf model     */    public EsriPlugIn(String name, int type, int columnCount) throws Exception {        switch (type) {        case SHAPE_TYPE_POINT:            _list = new EsriPointList();            break;        case SHAPE_TYPE_POLYGON:            _list = new EsriPolygonList();            break;        case SHAPE_TYPE_POLYLINE:            _list = new EsriPolylineList();            break;        default:            _list = null;        }        _model = new DbfTableModel(columnCount);        this.name = name;    }    /**     * Creates an EsriPlugIn from a set of shape files     *      * @param name The name of the layer that may be used to reference     *        the layer     * @param dbf The url referencing the dbf extension file     * @param shp The url referencing the shp extension file     * @param shx The url referencing the shx extension file     */    public EsriPlugIn(String name, URL dbf, URL shp, URL shx) {        this.dbf = dbf.toString();        this.shp = shp.toString();        this.shx = shx.toString();        _list = getGeometry(shp, shx);        _model = getDbfTableModel(dbf);        _list.putAttribute(DBF_ATTRIBUTE, _model);        this.name = name;    }    /**     * Set the drawing attributes for the graphics on the list.     */    public void setDrawingAttributes(DrawingAttributes da) {        drawingAttributes = da;        if (_list != null) {            drawingAttributes.setTo(_list);        }    }    /**     * Get the drawing attributes for the graphics on the list.     */    public DrawingAttributes getDrawingAttributes() {        return drawingAttributes;    }    /**     * Handles adding records to the geometry list and the     * DbfTableModel.     *      * @param graphic An OMGraphic to add the graphics list     * @param record A record to add to the DbfTableModel     */    public void addRecord(OMGraphic graphic, ArrayList record) {        OMGraphicList list = getEsriGraphicList();        // Associate the record directly in the OMGraphic        graphic.putAttribute(SHAPE_DBF_INFO_ATTRIBUTE, record);        // If list == null, model will be too.        if (list != null) {            // Might as well set the index            graphic.putAttribute(SHAPE_INDEX_ATTRIBUTE,                    new Integer(list.size() + 1));            list.add(graphic);            _model.addRecord(record);        } else {            Debug.error("EsriPlugIn.addRecord(): invalid data files!");        }    }    /**     * Creates a DbfTableModel for a given .dbf file     *      * @param dbf The url of the file to retrieve.     * @return The DbfTableModel for this layer, null if something     *         went badly.     */    private DbfTableModel getDbfTableModel(URL dbf) {        return DbfTableModel.getDbfTableModel(dbf);    }    /**     * Returns the EsriGraphicList for this layer     *      * @return The EsriGraphicList for this layer     */    public EsriGraphicList getEsriGraphicList() {        if (_list == null) {            try {                // _model = getDbfTableModel(new URL(dbf));                // _list = getGeometry(new URL(shp), new URL(shx));                // Changed so that shp, dbf and shx can be named as                // resource, a file path, or a URL. Also, if the dbf                // and shx file are not provided, look for them next                // to the shape file. - DFD                if ((shx == null || shx.equals("")) && shp != null) {                    shx = shp.substring(0, shp.lastIndexOf('.') + 1)                            + PARAM_SHX;                }                if ((dbf == null || dbf.equals("")) && shp != null) {                    dbf = shp.substring(0, shp.lastIndexOf('.') + 1)                            + PARAM_DBF;                }                _model = getDbfTableModel(PropUtils.getResourceOrFileOrURL(dbf));                _list = getGeometry(PropUtils.getResourceOrFileOrURL(shp),                        PropUtils.getResourceOrFileOrURL(shx));                if (_model != null) {                    DrawingAttributesUtility.setDrawingAttributes(_list,                            _model,                            getDrawingAttributes());                }            } catch (MalformedURLException murle) {                Debug.error("EsriPlugIn|" + getName()                        + " Malformed URL Exception\n" + murle.getMessage());            } catch (Exception exception) {                Debug.error("EsriPlugIn|" + getName() + " Exception\n"                        + exception.getMessage());                exception.printStackTrace();            }        }        return _list;    }    public static void main(String[] argv) {        if (argv.length == 0) {            System.out.println("Give EsriPlugIn a path to a shape file, and it'll print out the graphics.");            System.exit(0);        }        Debug.init();        EsriPlugIn epi = new EsriPlugIn();        Properties props = new Properties();        props.put(PARAM_SHP, argv[0]);        epi.setProperties(props);        OMGraphicList list = epi.getEsriGraphicList();        if (list != null) {            Debug.output(list.getDescription());        }        String dbfFileName = argv[0].substring(0, argv[0].lastIndexOf('.') + 1)                + "dbf";        try {            DbfTableModel dbf = epi.getDbfTableModel(PropUtils.getResourceOrFileOrURL(epi,                    dbfFileName));            list.setAppObject(dbf);            Debug.output("Set list in table");            dbf.showGUI(dbfFileName, 0);        } catch (Exception e) {            Debug.error("Can't read .dbf file for .shp file: " + dbfFileName                    + "\n" + e.getMessage());            System.exit(0);        }        EsriShapeExport ese = new EsriShapeExport(list, null, "./ese");        Debug.output("Exporting...");        ese.export();        Debug.output("Done.");    }    /**     * The getRectangle call is the main call into the PlugIn module.     * The module is expected to fill a graphics list with objects     * that are within the screen parameters passed. It's assumed that     * the PlugIn will call generate(projection) on the OMGraphics     * returned! If you don't call generate on the OMGraphics, they     * will not be displayed on the map.     *      * @param p projection of the screen, holding scale, center     *        coords, height, width. May be null if the parent     *        component hasn't been given a projection.     */    public OMGraphicList getRectangle(Projection p) {        OMGraphicList list = getEsriGraphicList();        proj = p;        if (list != null) {            list.generate(p);            // Setting the list up so that if anything is "selected",            // it will also be drawn on top of all the other            // OMGraphics. This maintains order while also making any            // line edge changes more prominent.            OMGraphicList parent = new OMGraphicList();            parent.add(selectedGraphics);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产成人超碰人人澡人人澡| 欧美日韩视频不卡| 色网综合在线观看| 在线看国产日韩| 日韩一区二区在线播放| 久久久亚洲高清| 亚洲激情图片qvod| 日韩国产欧美三级| 成人伦理片在线| 欧美卡1卡2卡| 亚洲欧美激情小说另类| 蜜臀精品一区二区三区在线观看| 国产麻豆精品视频| 欧美日韩一区三区四区| 国产蜜臀av在线一区二区三区| 亚洲美女偷拍久久| 国产美女娇喘av呻吟久久| 色狠狠综合天天综合综合| 精品少妇一区二区三区在线视频| 亚洲丝袜自拍清纯另类| 激情另类小说区图片区视频区| 91国偷自产一区二区三区观看| 久久亚洲捆绑美女| 亚洲高清在线精品| 色一情一伦一子一伦一区| 国产日韩欧美制服另类| 另类调教123区| 91精品国产高清一区二区三区| 亚洲精品自拍动漫在线| 成人激情综合网站| 精品国产伦一区二区三区观看方式| 亚洲成av人片www| 91九色最新地址| 中文字幕亚洲在| caoporn国产精品| 欧美国产国产综合| 国产伦精品一区二区三区视频青涩 | 精品国产乱码久久久久久老虎| 洋洋av久久久久久久一区| 色综合色综合色综合色综合色综合 | 日韩欧美第一区| 日韩成人精品视频| 日韩一区二区三区在线| 天天色 色综合| 日韩欧美久久久| 精品一区二区免费视频| 久久蜜臀精品av| 成人中文字幕电影| ●精品国产综合乱码久久久久| 91在线视频网址| 一区二区三区在线观看视频| 欧美日本精品一区二区三区| 日韩影视精彩在线| 国产色综合久久| 色欧美片视频在线观看| 天堂资源在线中文精品| 欧美mv和日韩mv的网站| 成人精品国产一区二区4080| 亚洲一区二区三区四区五区中文 | 亚洲日本护士毛茸茸| 欧美日韩在线三级| 狠狠网亚洲精品| 亚洲欧美电影院| 日韩欧美你懂的| 北条麻妃国产九九精品视频| 亚洲第一电影网| 国产日本欧美一区二区| 欧美日韩亚洲综合在线| 国产成人aaa| 青青草国产成人av片免费| 国产精品久久久久久久裸模| 欧美日本韩国一区二区三区视频| 国产不卡视频一区二区三区| 亚洲线精品一区二区三区| 久久久精品免费观看| 欧美日韩精品综合在线| 91日韩一区二区三区| 国产一区高清在线| 天天av天天翘天天综合网| 亚洲另类色综合网站| 国产精品美女久久久久高潮| 精品国产青草久久久久福利| 欧美三级电影精品| 日本福利一区二区| 91小视频在线免费看| 成人黄色av电影| 国产a级毛片一区| 国产自产高清不卡| 老司机免费视频一区二区| 亚洲国产精品一区二区尤物区| 国产精品不卡在线| 日本一区二区三区四区在线视频 | 国产亚洲精品bt天堂精选| 91精品国产综合久久久久久漫画| 欧美亚洲一区二区在线观看| 99国产精品久久久| 波多野结衣在线一区| 丁香婷婷深情五月亚洲| 大尺度一区二区| 99精品视频在线观看| 95精品视频在线| 欧美三级电影网| 欧美一区二区三区免费在线看| 欧美区视频在线观看| 在线播放日韩导航| 欧美一卡2卡三卡4卡5免费| 91麻豆自制传媒国产之光| 99在线视频精品| 91最新地址在线播放| 在线观看欧美日本| 欧美日韩中文精品| 欧美一区二区三区播放老司机| 91精品福利在线一区二区三区| 精品成人一区二区| 中文字幕在线观看不卡视频| 亚洲精品成人悠悠色影视| 亚洲va国产va欧美va观看| 经典三级一区二区| 一本一道久久a久久精品| 欧美日韩国产综合一区二区三区 | 国产一区日韩二区欧美三区| 亚洲国产乱码最新视频| 久久99国产乱子伦精品免费| 成人h动漫精品| 欧美一级日韩免费不卡| 久久久蜜臀国产一区二区| 亚洲国产精品视频| 成人短视频下载| 精品福利一区二区三区免费视频| 亚洲人成网站影音先锋播放| 狠狠色综合日日| 正在播放亚洲一区| 18涩涩午夜精品.www| 国产福利电影一区二区三区| 91国偷自产一区二区三区成为亚洲经典| 欧美大片免费久久精品三p| 一区二区三区精品视频| 国产成人免费在线| 日韩欧美高清一区| 天天射综合影视| 欧美日韩日日夜夜| 日韩理论片中文av| 亚洲一级电影视频| 亚洲国产综合色| 91污在线观看| 国产精品久久久久一区二区三区共 | 一区二区激情视频| 色综合天天性综合| 日韩毛片一二三区| 9久草视频在线视频精品| 国产视频在线观看一区二区三区| 精品午夜久久福利影院| 91九色02白丝porn| 欧美亚洲禁片免费| 欧美不卡视频一区| 国产精品久久三| 丁香激情综合五月| 久久久久免费观看| 成人av资源在线观看| 自拍偷拍亚洲激情| 欧美日韩午夜精品| 麻豆成人免费电影| xnxx国产精品| 国产成人免费视| 国产精品免费视频观看| 一本久久精品一区二区| 天堂一区二区在线| 国产亚洲精品福利| 在线精品视频一区二区三四| 蜜臀av性久久久久蜜臀av麻豆| 日韩欧美黄色影院| 91蝌蚪国产九色| 日本vs亚洲vs韩国一区三区二区| 久久毛片高清国产| 欧美日韩一卡二卡三卡 | 成人午夜av电影| 亚洲高清久久久| 欧美极品xxx| 69精品人人人人| 一本大道综合伊人精品热热 | 国产精品久久久一区麻豆最新章节| 色综合久久久久综合99| 日韩一级片网站| 96av麻豆蜜桃一区二区| 久久不见久久见免费视频1| 亚洲卡通欧美制服中文| 精品蜜桃在线看| 欧美丝袜丝交足nylons| 99r国产精品| 国产高清亚洲一区| 日本成人在线看| 亚洲无线码一区二区三区| 久久久另类综合| 久久久久99精品国产片| 日韩一级在线观看| 欧美一区二区三区视频免费| 欧美在线观看一区二区| 欧美私模裸体表演在线观看| 一本一本久久a久久精品综合麻豆 一本一道波多野结衣一区二区 | 欧美福利一区二区|