当前位置: 首页>>代码示例>>C#>>正文


C# Polygon.getExteriorRing方法代码示例

本文整理汇总了C#中Polygon.getExteriorRing方法的典型用法代码示例。如果您正苦于以下问题:C# Polygon.getExteriorRing方法的具体用法?C# Polygon.getExteriorRing怎么用?C# Polygon.getExteriorRing使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Polygon的用法示例。


在下文中一共展示了Polygon.getExteriorRing方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: WritePolygon

        private void WritePolygon(Polygon poly, WKBByteOrder byteOrder)
        {
            // Write byte order
            _writer.Write((byte)byteOrder);

            // Write type
            this.WriteType(poly, byteOrder);

            // Get the number of rings in this polygon.
            int numRings = poly.getNumInteriorRing() + 1;

            // Write the number of rings to the stream (add one for the shell)
            this.Write((uint)numRings, byteOrder);

            // Get the shell of this polygon.
            this.WriteLineString(poly.getExteriorRing(), byteOrder, false);

            // Loop on the number of rings - 1 because we already wrote the shell.
            for (int i = 0; i < numRings-1; i++)
            {
                this.WriteLineString(poly.getInteriorRingN(i), byteOrder, false);
            }
        }
开发者ID:vmoll,项目名称:geotools,代码行数:23,代码来源:GeometryWKBWriter.cs

示例2: AppendPolygonText

        /// <summary>
        /// Converts a Polygon to &lt;Polygon Text&gt; format, then
        /// Appends it to the writer.
        /// </summary>
        /// <param name="polygon">The Polygon to process.</param>
        /// <param name="level"></param>
        /// <param name="indentFirst"></param>
        /// <param name="writer"></param>
        protected void AppendPolygonText(Polygon polygon, int level, bool indentFirst, StringWriter writer)
        {
            if ( polygon.isEmpty() )
            {
                writer.Write("EMPTY");
            }
            else
            {
                if (indentFirst)
                {
                    Indent(level, writer);
                }

                writer.Write("(");
                AppendLineStringText(polygon.getExteriorRing(), level, false, writer);

                for (int i = 0; i < polygon.getNumInteriorRing(); i++)
                {
                    writer.Write(", ");
                    AppendLineStringText(polygon.getInteriorRingN(i), level + 1, true, writer);
                }

                writer.Write(")");
            }
        }
开发者ID:vmoll,项目名称:geotools,代码行数:33,代码来源:GeometryWKTWriter.cs

示例3: AppendPolygonText

        /// <summary>
        /// Converts a Polygon to &lt;Polygon Text&gt; format, then
        /// Appends it to the writer.
        /// </summary>
        /// <param name="polygon">The Polygon to process.</param>
        /// <param name="writer"></param>
        protected void AppendPolygonText(Polygon polygon,  TextWriter writer)
        {
            if (polygon.isEmpty())
            {
                //writer.Write("EMPTY");
            }
            else
            {

                AppendLineStringText(polygon.getExteriorRing(),writer);
                for (int i = 0; i < polygon.getNumInteriorRing(); i++)
                {
                    AppendLineStringText(polygon.getInteriorRingN(i),  writer);
                }
                writer.Write(" Z ");
            }
        }
开发者ID:vmoll,项目名称:geotools,代码行数:23,代码来源:GeometrySVGWriter.cs


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