• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录

gisoracle

  • 博客园
  • 联系
  • 订阅
  • 管理

公告

View Post

通过ArcEngine获得注记的信息

访问注记层的元素和访问其他类型的地物一样,都需要通过IFeatureClass接口的Search函数获得一个IFeatureCursor对象,通过这个对象来遍历FeatureClass。

处理注记的代码为:

            if (pFeature.FeatureType == esriFeatureType.esriFTAnnotation)
            {
                IAnnotationFeature pAnnoFeature = pFeature as IAnnotationFeature;
                ITextElement pTextElement = pAnnoFeature.Annotation as ITextElement;
                string a = pTextElement.Text;
                double b = pTextElement.Symbol.Size;
                double c = pTextElement.Symbol.Angle;               
                IElement pElement = pAnnoFeature.Annotation as IElement;
                esriGeometryType geoType = pElement.Geometry.GeometryType;
                IPoint pPoint = pElement.Geometry as IPoint;
                double x = 0, y = 0;
                pPoint.QueryCoords(out x, out y);
                int cc = 0;

                return;
            }

 

来自:http://blog.sina.com.cn/s/blog_5432e0220100kzug.html

posted on 2010-12-02 19:15  gisai  阅读(510)  评论(0)    收藏  举报

刷新页面返回顶部
 
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3