本文整理汇总了C#中Polygon.getNumInteriorRing方法的典型用法代码示例。如果您正苦于以下问题:C# Polygon.getNumInteriorRing方法的具体用法?C# Polygon.getNumInteriorRing怎么用?C# Polygon.getNumInteriorRing使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Polygon
的用法示例。
在下文中一共展示了Polygon.getNumInteriorRing方法的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);
}
}
示例2: AppendPolygonText
/// <summary>
/// Converts a Polygon to <Polygon Text> 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(")");
}
}
示例3: AppendPolygonText
/// <summary>
/// Converts a Polygon to <Polygon Text> 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 ");
}
}