来自:http://www.cnblogs.com/lee24789229/p/5481978.html

通过传入坐标点,返回几何图形,此代码部分可以生成环形面。

方法一

        private IGeometry getGeometry(IPointCollection Points)
{
IPointCollection iPointCollection = new PolygonClass(); Ring ring = new RingClass();
object missing = Type.Missing; ring.AddPointCollection(Points); IGeometryCollection pointPolygon = new PolygonClass();
pointPolygon.AddGeometry(ring as IGeometry, ref missing, ref missing);
IPolygon polyGonGeo = pointPolygon as IPolygon;
//polyGonGeo.Close();
polyGonGeo.SimplifyPreserveFromTo();
return polyGonGeo as IGeometry; }

方法二:

        private IGeometry getGeometry1(IPointCollection Points)
{
//IPointCollection iPointCollection = new PolygonClass();
object pMissing = Type.Missing;
//iPointCollection.AddPointCollection(Points); IGeometryCollection pGeoColl = Points as IGeometryCollection;
ISegmentCollection pRing = new RingClass();
pRing.AddSegmentCollection(pGeoColl as ISegmentCollection);
object miss = Type.Missing;
IGeometryCollection pPolygon = new PolygonClass();
pPolygon.AddGeometry(pRing as IGeometry, ref miss, ref miss); ITopologicalOperator topologicalOperator = pPolygon as ITopologicalOperator;
topologicalOperator.Simplify(); return pPolygon as IGeometry;
}
本博客有部分内容来自网络,如有问题请联系QQ24789229,并注明来自博客园。

C#Arcengine通过坐标点生成面(环形)的更多相关文章

  1. arcmap坐标点生成线和面(更正版)

    一:本博客的脉络 (1 )做了例如以下更正:之前在网上搜到的结果是:arcmap坐标点生成线和面 ------ 注意该功能在ArcGIS10中没有了,当时自己也没有多想就转载了,再此做一下更正或者叫做 ...

  2. 使用wcf编写坐标字符串生成shapefile文件,在iis发布供前端调用

    项目有一需求,需要由坐标字符串(格式:x,y,点名)生成shapefile,由于在前台开发类似功能比较麻烦而且也不适用,最终决定使用WCF来实现,不借助现有GIS软件,基于GDAL实现. 实现过程如下 ...

  3. ArcEngine下一个TIN生成的轮廓

    太晚了,直接连接的源代码: /// <summary> /// TIN生成等高线 /// </summary> /// <param name="pInterv ...

  4. iOS 开发技巧-制作环形进度条

    有几篇博客写到了怎么实现环形进度条,大多是使用Core Graph来实现,实现比较麻烦且效率略低,只是一个小小的进度条而已,我们当然是用最简单而且效率高的方式来实现. 先看一下这篇博客,博客地址:ht ...

  5. iOS一分钟学会环形进度条

    有几篇博客写到了怎么实现环形进度条,大多是使用Core Graph来实现,实现比较麻烦且效率略低,只是一个小小的进度条而已,我们当然是用最简单而且效率高的方式来实现.先看一下这篇博客,博客地址:htt ...

  6. Web---图片验证码生成教程详解-从简单到复杂-从本地到前后台

    首先,我们先来看本地如何生成图片验证码的,再来写输出到网页的验证码如何实现. 先来看最简单的-实现的功能是,将一个字符串变成图片写入到文件中 实现代码: package cn.hncu.img; im ...

  7. python生成随机图形验证码

    使用python生成随机图片验证码,需要使用pillow模块 1.安装pillow模块 pip install pillow 2.pillow模块的基本使用 1.创建图片 from PIL impor ...

  8. jQuery CircleCounter的环形倒计时效果

    在线演示1 本地下载 使用jQuery插件CircleCounter生成的环形倒计时效果,这个插件使用HTML5画布生成动画效果,还不错,大家可以试试! 顺带手录制了个代码,大家不吝赐教:http:/ ...

  9. python 生成随机图片验证码

    1.安装pillow模块 pip install pillow (1)创建图片 from PIL import Image #定义使用Image类实例化一个长为400px,宽为400px,基于RGB的 ...

随机推荐

  1. 有关c语言编程

    有关C语言编程 统计代码"行数" 对于统计代码"行数",行数不包括空白行和注释行.程序改进如下: while(fgets (mystring , 100 , f ...

  2. Struts DispatchAction Example

    The DispatchAction class (org.apache.struts.actions.DispatchAction) provides a way to group all rela ...

  3. java 基础类库之 FormatFun

    package com.exjor.webdemo; import java.text.SimpleDateFormat; import java.util.Date; public class Fo ...

  4. Asp.Net MVC路由调试工具-RouteDebugger

    1.获取方式 第一种方法: 在程序包控制台中执行命令 PM> Install-Package routedebugger 安装成功后Web.config文件中会自动加入行 <add key ...

  5. python脚本获取本机公网ip

    1.获取公网IP地址方式,访问:http://txt.go.sohu.com/ip/soip 2.python脚本实现: #!/usr/bin/python # -*- coding:utf8 -*- ...

  6. CSUOJ 1040 Round-number

    Description Most of the time when rounding a given number, it is customary to round to some multiple ...

  7. 使用Swing的JSpinner组件设置日期时间选择器

    代码: //获得时间日期模型 SpinnerDateModel model = new SpinnerDateModel(); //获得JSPinner对象 JSpinner year = new J ...

  8. 切换 NPM 镜像源

    转载:快速切换NPM源 我们介绍过cnpmjs.org和淘宝 npm 两个 NPM 镜像.除此之外,还有一些国外的 NPM 镜像.不同地区访问不同的镜像速度可能有差异,因此有时候需要切换 NPM 镜像 ...

  9. django 启动nginx的时候,报端口被占用的问题

    Nginx [emerg] listen() to 0.0.0.0:80, backlog 511 failed (98: Address already in use) Nginx更新后经常遇到这样 ...

  10. springBoot application.properties 基础配置

    # 文件编码 banner.charset= UTF-8 # 文件位置 banner.location= classpath:banner.txt # 日志配置 # 日志配置文件的位置. 例如对于Lo ...