基于AE通过指定中心点和半径画圆
来源:互联网 发布:软件测试岗位要求 编辑:程序博客网 时间:2024/05/28 15:26
在AE中通过指定中心点和半径画圆
本文转自:http://www.cnblogs.com/GISCafe/archive/2008/05/26/1207927.html
/// <summary>
/// 通过指定的中心点、半径画圆
/// </summary>
/// <param name="pLayer">要画的圆所在的图层</param>
/// <param name="pPoint">圆的中心点</param>
/// <param name="circleRadius">半径圆的</param>
/// <param name="pScreenDisplay">图形绘制对象</param>
private void DrawCircleByCenterAndRadius(ILayer pLayer, IPoint pPoint, double circleRadius, IScreenDisplay pScreenDisplay)
{
if (pLayer != null)
{
ISegmentCollection pSegmentCollection = null;
if (pLayer is IFeatureLayer)
{
IFeatureLayer pFeatureLayer = pLayer as IFeatureLayer;
IFeatureClass pFeatureClass = pFeatureLayer.FeatureClass;
if (pFeatureClass != null)
{
if (pFeatureClass.ShapeType == esriGeometryType.esriGeometryPolyline)
{
pSegmentCollection = new PolylineClass();
}
else if (pFeatureClass.ShapeType == esriGeometryType.esriGeometryPolygon)
{
pSegmentCollection = new PolygonClass();
}
//开始画圆
pSegmentCollection.SetCircle(pPoint, circleRadius);
IFeature pCircleFeature = pFeatureClass.CreateFeature();
pCircleFeature.Shape = pSegmentCollection as IGeometry;
pCircleFeature.Store();
//局部刷新
IInvalidArea pInvalidArea = new InvalidAreaClass();
pInvalidArea.Add(pSegmentCollection);
pInvalidArea.Display = pScreenDisplay;
pInvalidArea.Invalidate((short)esriScreenCache.esriAllScreenCaches);
}
}
}
}
/// 通过指定的中心点、半径画圆
/// </summary>
/// <param name="pLayer">要画的圆所在的图层</param>
/// <param name="pPoint">圆的中心点</param>
/// <param name="circleRadius">半径圆的</param>
/// <param name="pScreenDisplay">图形绘制对象</param>
private void DrawCircleByCenterAndRadius(ILayer pLayer, IPoint pPoint, double circleRadius, IScreenDisplay pScreenDisplay)
{
if (pLayer != null)
{
ISegmentCollection pSegmentCollection = null;
if (pLayer is IFeatureLayer)
{
IFeatureLayer pFeatureLayer = pLayer as IFeatureLayer;
IFeatureClass pFeatureClass = pFeatureLayer.FeatureClass;
if (pFeatureClass != null)
{
if (pFeatureClass.ShapeType == esriGeometryType.esriGeometryPolyline)
{
pSegmentCollection = new PolylineClass();
}
else if (pFeatureClass.ShapeType == esriGeometryType.esriGeometryPolygon)
{
pSegmentCollection = new PolygonClass();
}
//开始画圆
pSegmentCollection.SetCircle(pPoint, circleRadius);
IFeature pCircleFeature = pFeatureClass.CreateFeature();
pCircleFeature.Shape = pSegmentCollection as IGeometry;
pCircleFeature.Store();
//局部刷新
IInvalidArea pInvalidArea = new InvalidAreaClass();
pInvalidArea.Add(pSegmentCollection);
pInvalidArea.Display = pScreenDisplay;
pInvalidArea.Invalidate((short)esriScreenCache.esriAllScreenCaches);
}
}
}
}
调用:
DrawCircleByCenterAndRadius(axMapControl1.get_Layer(1), pPoint, 180, axMapControl1.ActiveView.ScreenDisplay);
- 基于AE通过指定中心点和半径画圆
- 在AE中通过指定中心点和半径画圆
- GPS以中心点为圆心,指定距离为半径获取随机坐标点
- 创建大小100*100矩阵,所有数值置零,并画半径为50,中心点为(50,50)的圆
- 通过半径计算圆直径、周长和面积
- MFC 根据圆心和半径画圆
- ArcGIS API for Javascript 开发:不适用esri.toolbar.draw接口,由用户控制定位中心点和半径,实现查询落在圆内的要素
- C#以中心点经纬度和范围半径为基准计算矩形四个顶点的经纬度
- 指定圆心、半径,创建一个圆。IGraphicsContainer
- 编程求指定半径r的圆的面值和周长,并输出计算结果
- fzu 2213 通过圆心坐标和半径判断两圆的关系
- 基于JAVA求圆的面积和半径,JOptionPane有框输入
- 根据中心点、半径长度、半径角度求另一半径的坐标
- MATLAB中已知圆心和半径画圆
- Android高德地图设置中心点图标,通过逆地理编码实时获取中心点的经纬度和详细位置
- vue-amap圆形编辑完获取半径中心点
- PCL:通过条件设置或者半径设置去除指定点云
- 求圆的半径和面积
- 3195 Design the city //LCA
- 光脚丫学LINQ(016):[演练]创建简单对象模型和LINQ查询(C#)
- Phenix 分布式应用开发平台 for Delphi (源码) 发布
- 应用find批量删除文件,解压文件
- Section 2.2 Party Lamps
- 基于AE通过指定中心点和半径画圆
- 装SQL Server的COM+警告
- 遍历各磁盘(包括本地硬盘,光盘,可移动磁盘)及查找某文件并启动
- Spring framework实现定时器之Quartz
- JS/AS(Flash)通信失效的可能原因
- ajax+jdbc实现数据库分页
- 《GOF设计模式》—生成器(Builder)—Delphi源码示例:生成器接口
- Windows下的文件查找操作
- 《GOF设计模式》—生成器(Builder)—Delphi源码示例:RTF阅读器