• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
bobird的学习笔记
博客园    首页    新随笔    联系   管理    订阅  订阅

GeoMetry——Clone

//根据原始GeoMetry拷贝GeoMetry

 

        public static IGeometry CopyGeoMetry(IGeometry PGeoMetry)

        {

            IClone pClone = PGeoMetry as IClone;

            IGeometry copyGeoMetry = pClone.Clone() as IGeometry;

            return copyGeoMetry;

        }

//获取线的中点

public static IPoint getLineCenterPoint(IPolyline pPolyline)

{

    double d = pPolyline.Length;

    IPoint pPoint = new PointClass();

    pPolyline.QueryPoint(esriSegmentExtension.esriNoExtension, d / 2, false, pPoint);

    return pPoint;

 

}

//点打断线

if (pMap == null || pFeature == null)
            {
                return false;
            }
            IFeatureEdit pFeatureEdit = null;
            pFeatureEdit = pFeature as IFeatureEdit;
            ISet pSplitSet;
            try
            {
                pSplitSet = pFeatureEdit.Split(pSplitPoint);
            }
            catch
            {
                return false;
            }
            pSplitSet.Reset();
            IFeature pSplitFeature = null;
            pSplitFeature = pSplitSet.Next() as IFeature;

            while (pSplitFeature != null)
            {
                CreateSplitFeature(pMap,pSplitFeature.ShapeCopy);
                FlashGeometry(pMap,pSplitFeature.ShapeCopy);
                pSplitFeature = pSplitSet.Next() as IFeature;
            }
            return true;


posted on 2013-01-06 16:48  bobird  阅读(377)  评论(0)    收藏  举报
刷新页面返回顶部
博客园  ©  2004-2026
浙公网安备 33010602011771号 浙ICP备2021040463号-3