zoukankan      html  css  js  c++  java
  • C#Arcengine通过坐标点生成面(环形)

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

    方法一

            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;
            }
  • 相关阅读:
    Spark笔记:RDD基本操作(下)
    Spark笔记:RDD基本操作(上)
    使用mapreduce计算环比的实例
    Hbase学习笔记01
    周爱民:真正的架构师是没有title的(图灵访谈)
    google map 路线服务
    Google Maps V3 之 路线服务
    CSS3支持box-flex弹性布局
    php curl用法
    .frm,.myd,myi转换为.sql导入数据库
  • 原文地址:https://www.cnblogs.com/leebokeyuan/p/5481978.html
Copyright © 2011-2022 走看看