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

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

?? bufferfeatures.java

?? GIS緩沖區分析:ArcObjects緩沖區分析開發實例
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
/*
 Copyright 1995-2005 ESRI

 All rights reserved under the copyright laws of the United States.

 You may freely redistribute and use this sample code, with or without modification.

 Disclaimer: THE SAMPLE CODE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 
 WARRANTIES, INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 
 FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ESRI OR 
 CONTRIBUTORS 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) SUSTAINED BY YOU OR A THIRD PARTY, HOWEVER CAUSED AND ON ANY 
 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ARISING IN ANY 
 WAY OUT OF THE USE OF THIS SAMPLE CODE, EVEN IF ADVISED OF THE POSSIBILITY OF 
 SUCH DAMAGE.

 For additional information contact: Environmental Systems Research Institute, Inc.

 Attn: Contracts Dept.

 380 New York Street

 Redlands, California, U.S.A. 92373 

 Email: contracts@esri.com
*/
/*
 * ArcGIS Engine Developer Sample
 * Application Name: BufferFeatures.java
 */

package com.esri.arcgis.samples.beans.mapcontrol;

import java.awt.Dimension;
import java.awt.Frame;
import java.awt.Rectangle;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JDialog;
import javax.swing.JFileChooser;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JSlider;
import javax.swing.JTextField;
import javax.swing.UIManager;

import com.esri.arcgis.beans.TOC.TOCBean;
import com.esri.arcgis.beans.map.MapBean;
import com.esri.arcgis.beans.toolbar.ToolbarBean;
import com.esri.arcgis.carto.FeatureLayer;
import com.esri.arcgis.carto.IFeatureLayer;
import com.esri.arcgis.carto.ISelection;
import com.esri.arcgis.controlcommands.ControlsMapFullExtentCommand;
import com.esri.arcgis.controlcommands.ControlsMapPanTool;
import com.esri.arcgis.controlcommands.ControlsMapZoomInFixedCommand;
import com.esri.arcgis.controlcommands.ControlsMapZoomInTool;
import com.esri.arcgis.controlcommands.ControlsMapZoomOutFixedCommand;
import com.esri.arcgis.controlcommands.ControlsMapZoomOutTool;
import com.esri.arcgis.controlcommands.ControlsMapZoomPanTool;
import com.esri.arcgis.controlcommands.ControlsMapZoomToLastExtentBackCommand;
import com.esri.arcgis.controlcommands.ControlsMapZoomToLastExtentForwardCommand;
import com.esri.arcgis.controlcommands.ControlsSelectFeaturesTool;
import com.esri.arcgis.controlcommands.ControlsSelectTool;
import com.esri.arcgis.datasourcesfile.ShapefileWorkspaceFactory;
import com.esri.arcgis.display.IRgbColor;
import com.esri.arcgis.display.IRgbColorProxy;
import com.esri.arcgis.display.IScreenDisplay;
import com.esri.arcgis.display.ISimpleFillSymbol;
import com.esri.arcgis.display.ISymbol;
import com.esri.arcgis.display.ISymbolProxy;
import com.esri.arcgis.display.RgbColor;
import com.esri.arcgis.display.SimpleFillSymbol;
import com.esri.arcgis.display.esriSimpleFillStyle;
import com.esri.arcgis.geodatabase.Field;
import com.esri.arcgis.geodatabase.Fields;
import com.esri.arcgis.geodatabase.GeometryDef;
import com.esri.arcgis.geodatabase.ICursor;
import com.esri.arcgis.geodatabase.IEnumFeature;
import com.esri.arcgis.geodatabase.IEnumFeatureProxy;
import com.esri.arcgis.geodatabase.IFeature;
import com.esri.arcgis.geodatabase.IFeatureBuffer;
import com.esri.arcgis.geodatabase.IFeatureClass;
import com.esri.arcgis.geodatabase.IFeatureCursor;
import com.esri.arcgis.geodatabase.IFeatureWorkspace;
import com.esri.arcgis.geodatabase.IFeatureWorkspaceProxy;
import com.esri.arcgis.geodatabase.IField;
import com.esri.arcgis.geodatabase.IFieldEdit;
import com.esri.arcgis.geodatabase.IFields;
import com.esri.arcgis.geodatabase.IFieldsEdit;
import com.esri.arcgis.geodatabase.IGeometryDef;
import com.esri.arcgis.geodatabase.IGeometryDefEdit;
import com.esri.arcgis.geodatabase.IQueryFilter;
import com.esri.arcgis.geodatabase.IWorkspace;
import com.esri.arcgis.geodatabase.IWorkspaceFactory;
import com.esri.arcgis.geodatabase.QueryFilter;
import com.esri.arcgis.geodatabase.esriFeatureType;
import com.esri.arcgis.geodatabase.esriFieldType;
import com.esri.arcgis.geometry.IGeometry;
import com.esri.arcgis.geometry.IPolygon;
import com.esri.arcgis.geometry.IPolygonProxy;
import com.esri.arcgis.geometry.ITopologicalOperator;
import com.esri.arcgis.geometry.ITopologicalOperatorProxy;
import com.esri.arcgis.geometry.UnknownCoordinateSystem;
import com.esri.arcgis.geometry.esriGeometryType;
import com.esri.arcgis.system.AoInitialize;
import com.esri.arcgis.system.EngineInitializer;
import com.esri.arcgis.system.esriLicenseProductCode;
import com.esri.arcgis.systemUI.esriCommandStyles;

/**
 * This sample demonstrates how to buffer selected features in a layer, and
 * how to display the resulting buffer polygon on a Map. The buffer distance
 * is hard-coded to "1.0", which assumes that the shapefile data for the layer
 * is stored in decimal degrees, for simplicity.
 *
 */
public class BufferFeatures extends JFrame {

  MapBean mapBean = new MapBean();
  ToolbarBean toolbarBean = new ToolbarBean();
  TOCBean toc = new TOCBean();
  JPanel toolBarPanel = new JPanel();

  JButton button = new JButton("Add a shapefile...");
  JButton btnBuffer = new JButton("Buffer selected features");
  IGeometry result = null;
  String _distance = null;

  public BufferFeatures() {
    buildFrame();
  }

  /**
	 * Builds 'this' frame as per the following diagram:
   *
   *   /----------------------------------------------------------\
   *   |            BorderLayout.NORTH                            |
   *   |            Toolbar Control                               |
   *   |--------------|-------------------------------------------|
   *   |              |                                           |
   *   |              |                                           |
   *   |  TocControl  |     MapBean                            |
   *   |  BorderLayout|    BorderLayout.CENTER                    |
   *   |    WEST      |                                           |
   *   |              |                                           |
   *   |              |                                           |
   *   |              |                                           |
   *   |--------------|-------------------------------------------|
   */
  private void buildFrame(){

    getContentPane().setLayout(new java.awt.BorderLayout());
    getContentPane().add(mapBean,java.awt.BorderLayout.CENTER);
    getContentPane().add(toolBarPanel,java.awt.BorderLayout.NORTH);
    getContentPane().add(toc,java.awt.BorderLayout.WEST);
    toolBarPanel.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));
    toolBarPanel.add(button);
    toolBarPanel.add(btnBuffer);
    toolbarBean.setSize(450,20);
    toc.setSize(150,580);
    toolBarPanel.add(toolbarBean);


    button.addActionListener(new ActionListener(){
      public void actionPerformed(ActionEvent evt){
        //Browse to a shapefile and add a FeatureLayer to the map
        addShapefile();
      }
    });

    btnBuffer.addActionListener(new ActionListener(){
      public void actionPerformed(ActionEvent evt){
        processBufferButtonAction(evt);
      }
    });


  }

  /**
	 * Processes buffer when buffer button clicked.
   */
  public void processBufferButtonAction(ActionEvent evt){
    // Buffer the selected Features...
    BufferUI ui = new BufferUI(this,"Buffer Properties",true);
    ui.setSize(300,250);
    ui.setResizable(false);
    ui.setVisible(true);
  }

  public void doBuffer(String distance){

    _distance = distance;

    try {

       IScreenDisplay pScreenDisplay = mapBean.getActiveView().getScreenDisplay();
       ISimpleFillSymbol pSymbol = new SimpleFillSymbol();

       IRgbColor c = new RgbColor();
       IRgbColor color = new IRgbColorProxy(c);

       color.setRed(255);
       color.setGreen(0);
       color.setBlue(0);

       pSymbol.setColor(color);
       pSymbol.setStyle(esriSimpleFillStyle.esriSFSDiagonalCross);
       ISymbol s = new ISymbolProxy(pSymbol);

       ICursor[] fc = {};
       IQueryFilter qfilter = new QueryFilter();
       qfilter.setWhereClause(" ");
       ISelection selection = mapBean.getActiveView().getFocusMap().getFeatureSelection();
       IEnumFeature ef = new IEnumFeatureProxy(selection);
       IFeature feature = ef.next();
       ITopologicalOperator u = null;

       while(feature != null){

         ITopologicalOperator p = new ITopologicalOperatorProxy(feature.
               getShape());

         IGeometry buffer = p.buffer(Double.parseDouble(distance)); // Assumes a Geographic projection, for simplicity.
         IPolygon poly = new IPolygonProxy(buffer);

         if(u == null){
           u = new ITopologicalOperatorProxy(poly);
         }

         result = u.union(poly);

         feature = ef.next();


       }

       if(result != null){

         pScreenDisplay.startDrawing(0, Short.parseShort("0"));
         pScreenDisplay.setSymbol(s);
         pScreenDisplay.drawPolygon(result);
         pScreenDisplay.finishDrawing();
       }else{
         JOptionPane.showMessageDialog(this,"Please select features first!");
       }
    }
    catch (Exception ex) {
      ex.printStackTrace();
    }
  }

  /**
	 * Saves shape file
   */
  public void doSaveBuffer(String output){

    java.io.File pFile = new java.io.File(output);

    if(pFile.isDirectory()){
      JOptionPane.showMessageDialog(this,"The specified file is actually a directory. Please enter a shapefile name.");
      return;
    }

    String strFClassName = pFile.getName();

    if(result != null){
      try {

        IWorkspaceFactory factory = new ShapefileWorkspaceFactory();
        IWorkspace ws = factory.openFromFile(pFile.getParent(), 0);
        IFeatureWorkspace pFWS = new IFeatureWorkspaceProxy(ws);

        // Make sure the featureclass doesn't already exist...

        try{
          IFeatureClass pTest = pFWS.openFeatureClass(strFClassName + ".shp");
          if (pTest != null) {
            JOptionPane.showMessageDialog(this,
                strFClassName + " already exists. Please specify a unique shapefile name");

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
最新国产の精品合集bt伙计| 日韩欧美一二区| 国产精品资源在线观看| 亚洲aaa精品| 亚洲一区二区精品视频| 亚洲香蕉伊在人在线观| 一区二区三区四区高清精品免费观看 | 国产亚洲综合性久久久影院| 日韩一级视频免费观看在线| 日韩午夜激情av| 日韩美女视频一区二区在线观看| 日韩一区二区三区高清免费看看| 日韩欧美一级特黄在线播放| 久久综合久久鬼色中文字| 久久人人超碰精品| 国产精品电影一区二区三区| 亚洲欧美激情视频在线观看一区二区三区 | 亚洲综合清纯丝袜自拍| 亚洲一区视频在线观看视频| 免费日韩伦理电影| 国产一二三精品| 成人午夜电影网站| 色综合一个色综合| 欧美一区二区福利在线| 国产欧美日韩综合| 尤物在线观看一区| 免费在线看一区| 国产精品资源在线看| 91蜜桃视频在线| 日韩精品在线看片z| 中文字幕不卡在线观看| 亚洲一区在线播放| 国产一区在线看| 一本久道久久综合中文字幕| 精品精品欲导航| 成人免费在线视频| 日本人妖一区二区| 成人免费看的视频| 欧美伦理视频网站| 国产精品美女视频| 五月开心婷婷久久| a亚洲天堂av| 久久综合资源网| 亚洲电影一级黄| 成人黄色综合网站| 欧美大黄免费观看| 亚洲午夜影视影院在线观看| 国产a级毛片一区| 日韩欧美成人激情| 亚洲第一搞黄网站| 93久久精品日日躁夜夜躁欧美| 欧美一级爆毛片| 亚洲国产欧美另类丝袜| 成人网在线播放| 精品处破学生在线二十三| 亚洲第一成人在线| 91蜜桃在线免费视频| 中文一区二区在线观看 | 日韩精品最新网址| 亚洲免费在线电影| 成人一二三区视频| 国产亚洲一本大道中文在线| 夜夜揉揉日日人人青青一国产精品| 懂色av一区二区三区蜜臀 | 日本美女一区二区三区视频| 色呦呦日韩精品| 国产精品剧情在线亚洲| 国内国产精品久久| 日韩一区二区三区视频| 亚洲国产精品久久久久婷婷884| 91亚洲永久精品| 亚洲欧洲精品成人久久奇米网| 国产激情91久久精品导航 | 在线观看免费一区| 国产女人18水真多18精品一级做| 黄页视频在线91| 久久久久国产免费免费| 国产久卡久卡久卡久卡视频精品| 精品国产乱码久久久久久蜜臀| 美女网站色91| 久久丝袜美腿综合| 国产成人综合在线| 国产日韩精品一区二区三区 | 中文子幕无线码一区tr| 成人动漫精品一区二区| 综合久久一区二区三区| 99视频一区二区| 一区二区三区精品在线| 欧美日韩亚洲综合一区二区三区| 午夜精品一区二区三区三上悠亚 | 精品福利一二区| 国产麻豆欧美日韩一区| 日本一二三四高清不卡| 成人一区二区视频| 亚洲最大色网站| 日韩精品一区二区三区四区| 国产成人自拍高清视频在线免费播放| 国产日韩欧美一区二区三区乱码 | 国产精品家庭影院| 色综合天天综合| 水蜜桃久久夜色精品一区的特点| 日韩免费观看高清完整版| 国产高清久久久| 一区二区三区在线视频免费 | 国产很黄免费观看久久| 国产精品国产三级国产aⅴ入口| 91小宝寻花一区二区三区| 日韩黄色免费电影| 中文字幕一区二| 色婷婷亚洲婷婷| 裸体在线国模精品偷拍| 国产精品视频一二三| 欧美日韩在线播放| 国产福利一区二区三区视频在线| 亚洲男人的天堂av| 26uuu国产日韩综合| 91日韩精品一区| 激情综合网最新| 亚洲欧美日韩精品久久久久| 欧美刺激脚交jootjob| 成人av资源网站| 久久成人综合网| 亚洲国产欧美日韩另类综合 | 麻豆国产欧美日韩综合精品二区| 亚洲女人****多毛耸耸8| 91精品国产一区二区| 成人激情视频网站| 日本网站在线观看一区二区三区| 中文字幕一区二区三区四区不卡| 欧美一区二区视频在线观看2020| 91在线精品一区二区| 国产美女娇喘av呻吟久久| 亚洲成人福利片| 亚洲精品视频在线观看免费 | 色先锋资源久久综合| 久久99精品久久久久久国产越南 | 亚洲6080在线| 亚洲欧洲精品一区二区精品久久久| 精品毛片乱码1区2区3区| 欧美在线播放高清精品| 成人午夜免费av| 国产麻豆午夜三级精品| 蓝色福利精品导航| 舔着乳尖日韩一区| 一区二区免费看| 亚洲欧美日韩国产成人精品影院| 国产婷婷色一区二区三区四区 | 国产精品毛片大码女人| 久久综合久色欧美综合狠狠| 日韩精品一区二区三区在线| 欧美一区二区国产| 欧美日韩aaa| 7777精品伊人久久久大香线蕉经典版下载 | 亚洲精品在线电影| 日韩一区二区三区在线| 91精品中文字幕一区二区三区| 欧美日韩一区国产| 欧美嫩在线观看| 欧美一区二区三区四区久久| 欧美一区二区人人喊爽| 91精品婷婷国产综合久久性色 | 国产在线播放一区三区四| 国产成人在线免费| 国内精品免费在线观看| 国产成人欧美日韩在线电影| 国产91丝袜在线播放0| 国产98色在线|日韩| 91在线观看高清| 欧美日韩一二三区| 日韩一区和二区| 久久夜色精品一区| 欧美国产激情一区二区三区蜜月| 中文字幕一区二区在线播放| 一区2区3区在线看| 男人的天堂亚洲一区| 国产美女一区二区| 99亚偷拍自图区亚洲| 在线亚洲精品福利网址导航| 91精品国产色综合久久不卡电影 | 午夜久久久久久| 久久精品国产精品亚洲红杏| 国产美女精品一区二区三区| 91国模大尺度私拍在线视频| 欧美一级爆毛片| 国产精品二三区| 日韩福利电影在线| 成人午夜电影久久影院| 欧美日韩视频在线一区二区| 亚洲精品一区二区三区福利| 亚洲美女偷拍久久| 麻豆成人久久精品二区三区小说| 91视频在线看| 日韩三级视频在线看| 亚洲丝袜精品丝袜在线| 免费日本视频一区| 色婷婷av久久久久久久| 日韩片之四级片| 一区二区三区毛片| 国产传媒欧美日韩成人| 欧美一区二区二区|