• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# IMultiPoint类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中IMultiPoint的典型用法代码示例。如果您正苦于以下问题:C# IMultiPoint类的具体用法?C# IMultiPoint怎么用?C# IMultiPoint使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IMultiPoint类属于命名空间,在下文中一共展示了IMultiPoint类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: GeometryToSqlGeometry

        private static void GeometryToSqlGeometry(IMultiPoint geom, SqlGeometryBuilder bldr)
        {
            bldr.BeginGeometry(OpenGisGeometryType.MultiPoint);

            for (int i = 0, c = geom.NumGeometries; i < c; i++)
                GeometryToSqlGeometry(geom.Geometries[i] as IPoint, bldr);

            bldr.EndGeometry();
        }
开发者ID:interworks,项目名称:FastShapefile,代码行数:9,代码来源:ConvertToSqlGeometry.cs


示例2: IsSimple

 /// <summary>
 /// A MultiPoint is simple if it has no repeated points.
 /// </summary>
 public bool IsSimple(IMultiPoint mp)
 {
     if (mp.IsEmpty) 
         return true;
     ISet points = new ListSet();
     for (int i = 0; i < mp.NumGeometries; i++)
     {
         IPoint pt = (IPoint) mp.GetGeometryN(i);
         ICoordinate p = pt.Coordinate;
         if (points.Contains(p))
             return false;
         points.Add(p);
     }
     return true;
 }   
开发者ID:lishxi,项目名称:_SharpMap,代码行数:18,代码来源:IsSimpleOp.cs


示例3: IsSimple

 public bool IsSimple(IMultiPoint mp)
 {
     return IsSimpleMultiPoint(mp);
 }
开发者ID:jaundice,项目名称:NetTopologySuite,代码行数:4,代码来源:IsSimpleOp.cs


示例4: SetByteStream

 /// <summary>
 ///
 /// </summary>
 /// <param name="geometry"></param>
 /// <returns></returns>
 protected virtual int SetByteStream(IMultiPoint geometry)
 {
     int count = INIT_COUNT;
     count += 4;     // NumPoints
     foreach (Point geom in geometry.Geometries)
         count += SetByteStream(geom);
     return count;
 }
开发者ID:ExRam,项目名称:DotSpatial-PCL,代码行数:13,代码来源:WkbWriter.cs


示例5: Write

 /// <summary>
 ///
 /// </summary>
 /// <param name="multiPoint"></param>
 /// <param name="writer"></param>
 protected virtual void Write(IMultiPoint multiPoint, BinaryWriter writer)
 {
     WriteByteOrder(writer);
     writer.Write((int)WkbGeometryType.MultiPoint);
     writer.Write(multiPoint.NumGeometries);
     for (int i = 0; i < multiPoint.NumGeometries; i++)
         Write(multiPoint.Geometries[i] as Point, writer);
 }
开发者ID:ExRam,项目名称:DotSpatial-PCL,代码行数:13,代码来源:WkbWriter.cs


示例6: CheckValid

 /// <summary>
 /// Checks validity of a MultiPoint.
 /// </summary>
 /// <param name="g"></param>
 private void CheckValid(IMultiPoint g)
 {
     CheckInvalidCoordinates(g.Coordinates);
 }
开发者ID:lishxi,项目名称:_SharpMap,代码行数:8,代码来源:IsValidOp.cs


示例7: Write

 /// <summary>
 /// 
 /// </summary>
 /// <param name="multiPoint"></param>
 /// <param name="writer"></param>
 protected void Write(IMultiPoint multiPoint, BinaryWriter writer)
 {
     WriteByteOrder(writer);     // LittleIndian
     writer.Write((int) WKBGeometryTypes.WKBMultiPoint);
     writer.Write((int) multiPoint.NumGeometries);
     for (int i = 0; i < multiPoint.NumGeometries; i++)
         Write(multiPoint.Geometries[i] as IPoint, writer);
 }
开发者ID:izambakci,项目名称:tf-net,代码行数:13,代码来源:WKBWriter.cs


示例8: SetByteStreamLength

 /// <summary>
 /// 
 /// </summary>
 /// <param name="multiPoint"></param>
 /// <returns></returns>
 protected int SetByteStreamLength(IMultiPoint multiPoint)
 {            
     int numPoints = multiPoint.NumPoints;
     return CalculateLength(numPoints);
 }        
开发者ID:lishxi,项目名称:_SharpMap,代码行数:10,代码来源:ShapeWriter.cs


示例9: SetByteStreamLength

 /// <summary>
 /// 
 /// </summary>
 /// <param name="multiPoint"></param>
 /// <returns></returns>
 protected int SetByteStreamLength(IMultiPoint multiPoint)
 {
     int count = InitValue;
     foreach (IPoint p in multiPoint.Geometries)
         count += SetByteStreamLength(p);
     return count;
 }
开发者ID:ste10k41,项目名称:nettopologysuite,代码行数:12,代码来源:GMLWriter.cs


示例10: AppendMultiPointText

 /// <summary>
 /// Converts a <c>MultiPoint</c> to &lt;MultiPoint Text format, then
 /// appends it to the writer.
 /// </summary>
 /// <param name="multiPoint">The <c>MultiPoint</c> to process.</param>
 /// <param name="level"></param>
 /// <param name="writer">The output writer to append to.</param>
 private void AppendMultiPointText(IMultiPoint multiPoint, int level, TextWriter writer)
 {
     if (multiPoint.IsEmpty) 
         writer.Write(" EMPTY");
     else 
     {
         writer.Write("(");
         for (int i = 0; i < multiPoint.NumGeometries; i++) 
         {
             if (i > 0) writer.Write(",");
             AppendCoordinate(((IPoint) multiPoint.GetGeometryN(i)).Coordinate, writer, multiPoint.PrecisionModel);
         }
         writer.Write(")");
     }
 }
开发者ID:lishxi,项目名称:_SharpMap,代码行数:22,代码来源:WKTWriter.cs


示例11: AppendMultiPointTaggedText

 /// <summary>
 /// Converts a <c>MultiPoint</c> to &lt;MultiPoint Tagged Text
 /// format, then appends it to the writer.
 /// </summary>
 /// <param name="multipoint">The <c>MultiPoint</c> to process.</param>
 /// <param name="level"></param>
 /// <param name="writer">The output writer to append to.</param>
 private void AppendMultiPointTaggedText(IMultiPoint multipoint, int level, TextWriter writer)
 {
     writer.Write("MULTIPOINT");
     AppendMultiPointText(multipoint, level, writer);
 }
开发者ID:lishxi,项目名称:_SharpMap,代码行数:12,代码来源:WKTWriter.cs


示例12: TransformMultiPoint

 /// <summary>
 /// 
 /// </summary>
 /// <param name="geom"></param>
 /// <param name="parent"></param>
 /// <returns></returns>
 protected virtual IGeometry TransformMultiPoint(IMultiPoint geom, IGeometry parent) 
 {
     ArrayList transGeomList = new ArrayList();
     for (int i = 0; i < geom.NumGeometries; i++) 
     {
         IGeometry transformGeom = TransformPoint((IPoint) geom.GetGeometryN(i), geom);
         if (transformGeom == null) continue;
         if (transformGeom.IsEmpty) continue;
         transGeomList.Add(transformGeom);
     }
     return factory.BuildGeometry(transGeomList);
 }
开发者ID:DIVEROVIEDO,项目名称:DotSpatial,代码行数:18,代码来源:GeometryTransformer.cs


示例13: ToMultiPointArray

 /// <summary>
 /// Converts the <c>ICollection</c> to an array.
 /// </summary>
 /// <param name="multiPoints">The <c>ICollection</c> of MultiPoints to convert.</param>
 /// <returns>The <c>ICollection</c> in array format.</returns>
 public static IMultiPoint[] ToMultiPointArray(ICollection multiPoints)
 {
     IMultiPoint[] list = new IMultiPoint[multiPoints.Count];
     int i = 0;
     foreach (IMultiPoint mp in multiPoints)
         list[i++] = mp;
     return list;
 }
开发者ID:DIVEROVIEDO,项目名称:DotSpatial,代码行数:13,代码来源:GeometryFactory.cs


示例14: FromMultiPoint

 private static DSMultiPoint FromMultiPoint(IMultiPoint geometry, DSGeometryFactory factory, bool setUserData)
 {
     var result = factory.CreateMultiPoint(FromCoordinates(geometry.Coordinates));
     if (setUserData)
         result.UserData = geometry.UserData;
     return result;
 }
开发者ID:ste10k41,项目名称:nettopologysuite,代码行数:7,代码来源:GeometryConverterToDotSpatial.cs


示例15: FromMultiPoint

 private static GeoAPIMultiPoint FromMultiPoint(IMultiPoint geometry, GeoAPIGeometryFactory factory, bool copyUserData)
 {
     var result = factory.CreateMultiPoint(FromCoordinates(geometry.Coordinates));
     if (copyUserData)
         result.UserData = geometry.UserData;
     return result;
 }
开发者ID:Walt-D-Cat,项目名称:NetTopologySuite,代码行数:7,代码来源:GeometryConverterToGeoAPI.cs


示例16: IsSimpleMultiPoint

        private bool IsSimpleMultiPoint(IMultiPoint mp)
        {
            if (mp.IsEmpty) 
                return true;

            HashSet<Coordinate> points = new HashSet<Coordinate>();
            for (int i = 0; i < mp.NumGeometries; i++)
            {
                IPoint pt = (IPoint)mp.GetGeometryN(i);
                Coordinate p = pt.Coordinate;
                if (points.Contains(p))
                {
                    _nonSimpleLocation = p;
                    return false;
                }
                points.Add(p);
            }
            return true;
        }
开发者ID:jaundice,项目名称:NetTopologySuite,代码行数:19,代码来源:IsSimpleOp.cs


示例17: Write

 /// <summary>
 /// 
 /// </summary>
 /// <param name="multiPoint"></param>
 /// <param name="writer"></param>
 protected void Write(IMultiPoint multiPoint, XmlTextWriter writer)
 {
     writer.WriteStartElement("MultiPoint", GMLElements.gmlNS);
     for (int i = 0; i < multiPoint.NumGeometries; i++)
     {
         writer.WriteStartElement("pointMember", GMLElements.gmlNS);
         Write(multiPoint.Geometries[i] as IPoint, writer);
         writer.WriteEndElement();
     }
     writer.WriteEndElement();
 }
开发者ID:ste10k41,项目名称:nettopologysuite,代码行数:16,代码来源:GMLWriter.cs


示例18: Write

        /// <summary>
        /// Method to write a multipoint geometry to the <paramref name="writer"/>
        /// </summary>
        /// <param name="points">The multipoint geometry</param>
        /// <param name="writer">The JSON writer</param>
        public static void Write(IMultiPoint points, JsonTextWriter writer)
        {
            if (points == null)
                return;
            if (writer == null)
                throw new ArgumentNullException("writer", "A valid JSON writer object is required");

            writer.WriteStartObject();
            writer.WritePropertyName("type");
            writer.WriteValue("MultiPoint");
            writer.WritePropertyName("coordinates");
            /*
            writer.WriteStartArray();
            foreach (var entry in points.Coordinates)
                WriteCoord(entry, writer);
            writer.WriteEndArray();
             */
            WriteCoord(points.Coordinates, writer);
            writer.WriteEndObject();
        }
开发者ID:geobabbler,项目名称:SharpMap,代码行数:25,代码来源:GeoJSONWriter.cs


示例19: Write

        /// <summary>
        /// 
        /// </summary>
        /// <param name="multiPoint"></param>
        /// <param name="writer"></param>
        public void Write(IMultiPoint multiPoint, BinaryWriter writer)
        {
            writer.Write((int) ShapeGeometryTypes.MultiPoint);

            // Write BoundingBox            
            WriteBoundingBox(multiPoint, writer);

            // Write NumPoints            
            writer.Write((int) multiPoint.NumPoints);

            // Write Coordinates
            for (int i = 0; i < multiPoint.NumPoints; i++)
                Write(multiPoint.Coordinates[i], writer);
        }
开发者ID:lishxi,项目名称:_SharpMap,代码行数:19,代码来源:ShapeWriter.cs


示例20: SetByteStream

        /// <summary>
        /// 
        /// </summary>
        /// <param name="geometry"></param>
        /// <returns></returns>
        protected int SetByteStream(IMultiPoint geometry)
        {
			// int size
			int result = 4;
			if (geometry.NumPoints > 0)
			{
				// We can shortcut here, as all subgeoms have the same fixed size
				result += geometry.NumPoints * SetByteStream(geometry.Geometries[0] as IGeometry);
			}
			return result;
		}
开发者ID:lishxi,项目名称:_SharpMap,代码行数:16,代码来源:PostGisWriter.cs



注:本文中的IMultiPoint类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IMultiPolygon类代码示例发布时间:2022-05-24
下一篇:
C# IMultiLineString类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap