//自定义叠加传值
        private void CustomOverlapTranValue()
        {
            frmProgressBar1 pb = null;
            //
            IFeatureCursor fCur     = null;
            IFeatureCursor fCur_fc2 = null;

            //
            try
            {
                this.button1.Enabled = false;
                this.Cursor          = Cursors.WaitCursor;

                //获取参数
                string updateField  = this.CB_Fields1.Text.Trim();
                string valFromField = this.CB_Fields2.Text.Trim();

                pb                      = new frmProgressBar1();
                pb.Text                 = "空间叠加传值进度";
                pb.Caption1.Text        = "预处理中......";
                pb.progressBar1.Maximum = 10;
                pb.progressBar1.Value   = 0;
                pb.Show(this);
                Application.DoEvents();

                //2 开始空间叠加操作
                pb.Caption1.Text       = "空间叠加中...";
                pb.progressBar1.Value += 1;
                Application.DoEvents();
                //
                IFeatureClass fc1 = null;
                IFeatureClass fc2 = null;
                //
                object objval       = "";
                double geo_area     = 0.0;
                double geo_area_max = 0.0;
                //目标图层
                object obj = this.CB_LayerList1.SelectedItem;
                if (obj != null && obj is CommonComboBoxItem)
                {
                    CommonComboBoxItem item = obj as CommonComboBoxItem;
                    fc1 = item.Tag as IFeatureClass;
                }
                //源图层
                obj = this.CB_LayerList2.SelectedItem;
                if (obj != null && obj is CommonComboBoxItem)
                {
                    CommonComboBoxItem item = obj as CommonComboBoxItem;
                    fc2 = item.Tag as IFeatureClass;
                }
                //
                if (fc1 != null && fc2 != null)
                {
                    pb.progressBar1.Maximum = fc1.FeatureCount(null);
                    Application.DoEvents();
                    //目标图层
                    fCur = fc1.Update(null, false);
                    if (fCur != null)
                    {
                        int      recIndex = 0;
                        IFeature feat_fc1 = fCur.NextFeature();
                        while (feat_fc1 != null)
                        {
                            ZhFeature zhfeat_fc1 = new ZHFeaturePolygon(feat_fc1);
                            objval       = "";
                            geo_area     = 0.0;
                            geo_area_max = 0.0;
                            //获取面积最大的面积值
                            #region //与fc2相交运算功能
                            ISpatialFilter sFilter = new SpatialFilterClass();
                            sFilter.Geometry      = feat_fc1.ShapeCopy;
                            sFilter.GeometryField = fc2.ShapeFieldName;
                            sFilter.SpatialRel    = esriSpatialRelEnum.esriSpatialRelIntersects;
                            fCur_fc2 = fc2.Search(sFilter, false);
                            IFeature feat_fc2 = fCur_fc2.NextFeature();
                            while (feat_fc2 != null)
                            {
                                ZhFeature zhfeat_fc2 = new ZHFeaturePolygon(feat_fc2);
                                IGeometry t_geo      = null;
                                #region //获取相交对象
                                IGeometry            topGeo      = feat_fc1.ShapeCopy;
                                IGeometry            topGeo2     = feat_fc2.ShapeCopy;
                                ITopologicalOperator Topoperator = (ITopologicalOperator)topGeo;
                                Topoperator.Simplify();
                                ITopologicalOperator TopGeometry = (ITopologicalOperator)topGeo2;
                                TopGeometry.Simplify();
                                try
                                {
                                    t_geo = Topoperator.Intersect(topGeo2, topGeo.Dimension);
                                }
                                catch (Exception ee)
                                {
                                    t_geo = null;
                                }
                                #endregion
                                if (t_geo is IArea)
                                {   //面积
                                    geo_area = (t_geo as IArea).Area;
                                }
                                else if (t_geo is ICurve)
                                {   //长度
                                    geo_area = (t_geo as ICurve).Length;
                                }
                                if (geo_area >= geo_area_max)
                                {
                                    objval       = zhfeat_fc2.getFieldValue(valFromField);
                                    geo_area_max = geo_area;
                                }
                                //下一个要素
                                feat_fc2 = fCur_fc2.NextFeature();
                            }
                            if (fCur_fc2 != null)
                            {
                                TokayWorkspace.ComRelease(fCur_fc2);
                                fCur_fc2 = null;
                            }
                            #endregion
                            //设置值
                            zhfeat_fc1.setFieldValue(updateField, objval);
                            fCur.UpdateFeature(feat_fc1);
                            //
                            recIndex += 1;
                            pb.progressBar1.Value = recIndex;
                            pb.Caption1.Text      = "正在叠加传值......... 第" + pb.progressBar1.Value + "个/共" + pb.progressBar1.Maximum + "个";
                            Application.DoEvents();
                            //
                            //下一个要素
                            feat_fc1 = fCur.NextFeature();
                        }
                    }
                    if (fCur != null)
                    {
                        fCur.Flush();
                    }
                    if (fCur != null)
                    {
                        TokayWorkspace.ComRelease(fCur);
                        fCur = null;
                    }
                    if (pb != null)
                    {
                        pb.Close();
                        pb.Dispose();
                        pb = null;
                    }
                    MessageBox.Show("传值完毕!", "提示");
                }
            }
            catch (Exception ee)
            {
                Log.WriteLine(ee);
                MessageBox.Show(ee.Message, "提示");
            }
            finally
            {
                this.button1.Enabled = true;
                this.Cursor          = Cursors.Default;

                if (fCur != null)
                {
                    TokayWorkspace.ComRelease(fCur);
                    fCur = null;
                }
                if (fCur_fc2 != null)
                {
                    TokayWorkspace.ComRelease(fCur_fc2);
                    fCur_fc2 = null;
                }
                if (pb != null)
                {
                    pb.Close();
                    pb.Dispose();
                    pb = null;
                }
            }
        }