本文整理汇总了C#中Polygon.isEmpty方法的典型用法代码示例。如果您正苦于以下问题:C# Polygon.isEmpty方法的具体用法?C# Polygon.isEmpty怎么用?C# Polygon.isEmpty使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Polygon
的用法示例。
在下文中一共展示了Polygon.isEmpty方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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(")");
}
}
示例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="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 ");
}
}