创建面注记PolygonElement
1.根据4点创建一个面
/// <summary>
/// 根据4个点创建图形,点序要顺时针
/// </summary>
/// <param name="pnt1">点1</param>
/// <param name="pnt2">点2</param>
/// <param name="pnt3">点3</param>
/// <param name="pnt4">点4</param>
/// <returns>IPolygon</returns>
public static IPolygon CreatePolygonBy4Points(IPoint pnt1, IPoint pnt2, IPoint pnt3, IPoint pnt4)
{
IPointCollection pPntCol = new PolygonClass();
object missing = Type.Missing; ////顺时针添加
pPntCol.AddPoint(pnt1, ref missing, ref missing);
pPntCol.AddPoint(pnt2, ref missing, ref missing);
pPntCol.AddPoint(pnt3, ref missing, ref missing);
pPntCol.AddPoint(pnt4, ref missing, ref missing);
pPntCol.AddPoint(pnt1, ref missing, ref missing); //// 为保持首尾相联,故将第一个点再添加一次
return pPntCol as IPolygon;
}
2.创建面符号
/// <summary>
/// 创建 面 符号
/// </summary>
/// <param name="r">The r.</param>
/// <param name="g">The g.</param>
/// <param name="b">The b.</param>
/// <returns>ISimpleFillSymbol</returns>
public static ISimpleFillSymbol CreateGeoSymbol(int r, int g, int b)
{
ISimpleFillSymbol psymbol = new SimpleFillSymbolClass() as ISimpleFillSymbol;
psymbol.Color = ColorCustom(r, g, b);
psymbol.Outline.Color = ColorCustom(r, g, b);
return psymbol;
}
3.创建PolygonElement
IElement pele = new PolygonElementClass();
pele.Geometry = pGeoCol as IGeometry;
(pele as IFillShapeElement).Symbol = CreateGeoSymbol(r, gD, b);
(pmap as IGraphicsContainer).AddElement(pele, 0);
创建面注记PolygonElement的更多相关文章
- 创建文本注记TextElement
1.创建一个字体 /// <summary> /// 字体设置 /// </summary> /// <param name="size">Th ...
- 创建线注记LineElement
1.根据2点创建一条线 /// <summary> /// 创建线 /// </summary> /// <param name="pnt1"> ...
- ArcGis 创建Annotation注记要素类、添加注记要素 并加载到Activeview AO C#
AO中一般有两种方式存储图面注记元素,一种使用TextElement,它是文档级的元素,编辑后要通过文档(mxd)保存:另一种是使用Annotation要素类,它是一个独立的要素类(featurecl ...
- 【ESRI论坛6周年征文】ArcEngine注记(Anno/ Label/Element等)处理专题 -入门篇
原发表于ESRI中国社区,转过来.我的社区帐号:jhlong http://bbs.esrichina-bj.cn/ESRI/viewthread.php?tid=122097 ----------- ...
- ArcGIS中的标注和注记
在ArcMap中可以使用标注和注记来识别要素,选择标注或注记取决于你需要如何控制文本显示以及在ArcMap中如何存储文本. 1.标注只是临时显示相关数据或字段 2.标注用于长时间保存数据以及显示方式. ...
- AE指定字段转成注记
转自原文 ae指定字段转成注记 ArcMap中有一个功能是Label Features,就是可以将图层内指定字段值显示以Label形式显示在主窗口上,在Label Features后,用右键点击图层, ...
- 用IFeatureWorkspaceAnno.CreateAnnotationClass 创建注记图层时报“The application is not licensed to modify or create schema”的错误的解决方案。
用IFeatureWorkspaceAnno.CreateAnnotationClass 的方法创建注记图层的时候报"The application is not licensed to m ...
- 关于arcgis engine的注记显示与关闭问题
1.注记的添加需要拿到IGeoFeatureLayer接口下的AnnotationProperties属性,转为IAnnotationLayerPropertiesCollection接口,并创建一个 ...
- ArcEngine标注和注记
转自原文 ArcEngine标注和注记 标注和注记是ArcEngine中提供的两种使用文字信息标注地图要素的方式.其中标注是作为图层的属性存在的,可以动态创建,注记作为地理要素被存储.需要注意的是Sh ...
随机推荐
- sshfs 实现普通用户可读写
先实现普通用户免密码host1可登入host2host1# yum install fuse sshfs; 如果装不上,需要安装epep源 --enablerepo=epelhost1# su - e ...
- mysql内置函数大全
mysql 字符串函数用法集合 ASCII(str)返回字符串str的最左面字符的ASCII代码值. mysql> select ascii('d'); +------------+ | asc ...
- Asp.Net MVC+BootStrap+EF6.0实现简单的用户角色权限管理7
做完角色之后接下来做先做页面按钮的增加.删除.修改.这里用到的功能和角色那边是一样的.就不多说了.直接上代码. 后台控制器代码 using AuthorDesign.Web.App_Start.Com ...
- Windows Server 2012 虚拟化实战:域
在Windows Server系统中,一些服务必需要构建在域的环境中,这不仅是为了统一验证和资源共享,同时也是为了网络安全.为构建虚拟化测试,我们需要先搭建域环境.之前先来大概了解一下域. 在使用工作 ...
- 解惑spring嵌套事物
工作中一直对spring中的事物管理都是最简单的配置 但是spring中的事物传播性配置 还有很多种,有时候经常疑惑service调用service的问题,今天的论坛上看到一篇写的非常详细的文字.记录 ...
- 解决开启SQL Server sql Always on Group 事务日志增大的问题
配置了Alwayson之后,因为没有只能使用完全恢复模式,不能使用简单或大容量日志模式,所以日志不断增长,不能使用改变恢复模式的方式清空日志 手动操作收缩或截断日志也无效 读了一些文章后发现,有人使用 ...
- 轻松搞懂WebService工作原理
用更简单的方式给大家谈谈WebService,让你更快更容易理解,希望对初学者有所帮助. WebService是基于网络的.分布式的模块化组件. 我们直接来看WebService的一个简易工作流程: ...
- 【2016-10-25】【坚持学习】【Day12】【WPF】【Telerik】【VirtualtionData 虚拟化数据】
VirtualQueryableCollectionView When working with the UI components that enable UI Virtualization, yo ...
- [ZZ]From QA to Engineering Productivity
http://googletesting.blogspot.com/2016/03/from-qa-to-engineering-productivity.html In Google’s early ...
- WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
http://dl.bintray.com/sequenceiq/sequenceiq-bin/ http://www.secdoctor.com/html/yyjs/31101.html