• 大小: 466KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2022-08-09
  • 语言: 其他
  • 标签: arcGis  

资源简介

开发环境:VS2010;
能够打开shp等各类常见地理信息格式文件;符号化;渲染;统计分析;地图整饰;地图打印;鹰眼

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Collections;

using ESRI.ArcGIS.Carto;
using ESRI.ArcGIS.Geodatabase;
using ESRI.ArcGIS.esriSystem;

namespace QueryAndStatistics
{
    public partial class FormStatistics : Form
    {
        //当前MapControl控件中的Map对象
        private IMap currentMap;    
        //设置哈希表类型的类变量来存储图层名称和所对应矢量图层的IFeaturelayer接口对象
        private Hashtable layersHashtable;
        //设置类变量存储当前的矢量图层对象
        private IFeaturelayer currentFeaturelayer = null;

        /// 
        /// 获得当前MapControl控件中的Map对象。
        /// 

        public IMap CurrentMap
        {
            set
            {
                currentMap = value;
            }
        }

        /// 
        /// 构造函数
        /// 

        public FormStatistics()
        {
            InitializeComponent();
            //新建哈希表对象
            layersHashtable = new Hashtable();
        }

        /// 
        /// 窗体加载函数,给各控件赋初始值
        /// 

        /// 
        /// 
        private void FormStatistics_Load_1(object sender EventArgs e)
        {
            try
            {
                IFeaturelayer featurelayer; //设置临时变量存储矢量图层对象
                string layerName;   //设置临时变量存储图层的名称
                int layersCount = 0;    //设置临时变量存储具有选择要素的图层总个数
                int allSelectedFeatures = 0;    //设置临时变量存储被选择要素的总数

                //清空哈希表
                layersHashtable.Clear();

                //对Map中的每个图层进行判断和加载名称
                for (int i = 0; i < currentMap.layerCount; i++)
                {
                    //如果该图层为图层组类型,则分别对所包含的每个图层进行操作
                    if (currentMap.get_layer(i) is Grouplayer)
                    {
                        //使用ICompositelayer接口进行遍历操作
                        ICompositelayer compositelayer = currentMap.get_layer(i) as ICompositelayer;
                        for (int j = 0; j < compositelayer.Count; j++)
                        {
                            //得到图层的名称
                            layerName = compositelayer.get_layer(j).Name;
                            //得到IFeaturelayer接口的矢量图层对象
                            featurelayer = (IFeaturelayer)compositelayer.get_layer(j);
                            //通过接口转换获得当前图层选择集中被选择要素的总数,如果大于0则进行统计
                            if (((IFeatureSelection)featurelayer).SelectionSet.Count > 0)
                            {
                                //在comboBoxlayers中添加该图层的名称
                                comboBoxlayers.Items.Add(layerName);
                                //在哈希表中添加一项,包括图层名称和图层对象
                                layersHashtable.Add(layerName featurelayer);
                                //具有选择要素的图层总个数加1
                                layer

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件     145408  2018-06-30 12:00  EngineWindowsApplication5\EngineWindowsApplication5\bin\Debug\EngineWindowsApplication5.exe

     文件     206336  2018-06-30 12:00  EngineWindowsApplication5\EngineWindowsApplication5\bin\Debug\EngineWindowsApplication5.pdb

     文件      11600  2018-10-02 11:12  EngineWindowsApplication5\EngineWindowsApplication5\bin\Debug\EngineWindowsApplication5.vshost.exe

     文件        490  2018-04-12 07:35  EngineWindowsApplication5\EngineWindowsApplication5\bin\Debug\EngineWindowsApplication5.vshost.exe.manifest

     文件        299  2018-06-13 09:38  EngineWindowsApplication5\EngineWindowsApplication5\Class\EnumQueryType.cs

     文件       7851  2018-06-20 14:57  EngineWindowsApplication5\EngineWindowsApplication5\Class\OperatePageLayout.cs

     文件      13427  2018-06-21 12:37  EngineWindowsApplication5\EngineWindowsApplication5\EngineWindowsApplicationZH.csproj

     文件        478  2018-06-13 09:39  EngineWindowsApplication5\EngineWindowsApplication5\EngineWindowsApplicationZH.csproj.user

     文件      10141  2018-06-21 10:59  EngineWindowsApplication5\EngineWindowsApplication5\FormStatistics.cs

     文件       6543  2018-06-21 10:40  EngineWindowsApplication5\EngineWindowsApplication5\FormStatistics.Designer.cs

     文件       5817  2018-06-21 10:40  EngineWindowsApplication5\EngineWindowsApplication5\FormStatistics.resx

     文件        775  2018-03-15 20:09  EngineWindowsApplication5\EngineWindowsApplication5\LicenseInitializer.cs

     文件      15255  2018-03-15 20:09  EngineWindowsApplication5\EngineWindowsApplication5\LicenseInitializer.Designer.cs

     文件      76085  2018-06-21 12:07  EngineWindowsApplication5\EngineWindowsApplication5\MainForm.cs

     文件      42055  2018-06-21 12:07  EngineWindowsApplication5\EngineWindowsApplication5\MainForm.Designer.cs

     文件      65379  2018-06-21 12:07  EngineWindowsApplication5\EngineWindowsApplication5\MainForm.resx

     文件     125518  2018-04-11 22:36  EngineWindowsApplication5\EngineWindowsApplication5\obj\x86\Debug\DesignTimeResolveAssemblyReferences.cache

     文件       6447  2018-10-02 11:12  EngineWindowsApplication5\EngineWindowsApplication5\obj\x86\Debug\DesignTimeResolveAssemblyReferencesInput.cache

     文件        180  2018-06-21 12:37  EngineWindowsApplication5\EngineWindowsApplication5\obj\x86\Debug\EngineWindowsApplication5.bufferAnalysis.resources

     文件       1209  2018-03-15 20:21  EngineWindowsApplication5\EngineWindowsApplication5\obj\x86\Debug\EngineWindowsApplication5.csproj.FileListAbsolute.txt

     文件       1040  2018-03-15 20:20  EngineWindowsApplication5\EngineWindowsApplication5\obj\x86\Debug\EngineWindowsApplication5.csproj.GenerateResource.Cache

     文件     130229  2018-03-15 20:14  EngineWindowsApplication5\EngineWindowsApplication5\obj\x86\Debug\EngineWindowsApplication5.csprojResolveAssemblyReference.cache

     文件     145408  2018-06-30 12:00  EngineWindowsApplication5\EngineWindowsApplication5\obj\x86\Debug\EngineWindowsApplication5.exe

     文件        180  2018-06-21 12:37  EngineWindowsApplication5\EngineWindowsApplication5\obj\x86\Debug\EngineWindowsApplication5.FormQueryByAttribute.resources

     文件      40677  2018-06-21 12:37  EngineWindowsApplication5\EngineWindowsApplication5\obj\x86\Debug\EngineWindowsApplication5.MainForm.resources

     文件        717  2018-06-21 12:37  EngineWindowsApplication5\EngineWindowsApplication5\obj\x86\Debug\EngineWindowsApplication5.PageLayout.frmSymbol.resources

     文件       3329  2018-06-21 12:37  EngineWindowsApplication5\EngineWindowsApplication5\obj\x86\Debug\EngineWindowsApplication5.PageLayout.frmTemplate.resources

     文件     206336  2018-06-30 12:00  EngineWindowsApplication5\EngineWindowsApplication5\obj\x86\Debug\EngineWindowsApplication5.pdb

     文件        180  2018-06-21 12:37  EngineWindowsApplication5\EngineWindowsApplication5\obj\x86\Debug\EngineWindowsApplication5.Properties.Resources.resources

     文件       2097  2018-06-21 12:37  EngineWindowsApplication5\EngineWindowsApplication5\obj\x86\Debug\EngineWindowsApplication5.SpatialQueryForm.resources

............此处省略71个文件信息

评论

共有 条评论