Mapsui.Geometries.MultiPoint.IsEmpty C# (CSharp) Method

IsEmpty() public method

If true, then this Geometry represents the empty point set, Ø, for the coordinate space.
public IsEmpty ( ) : bool
return bool
        public override bool IsEmpty()
        {
            return (Points != null) && (Points.Count == 0);
        }

Usage Example

Example #1
0
 /// <summary>
 /// Converts a MultiPoint to &lt;MultiPoint Text&gt; format, then
 /// Appends it to the writer.
 /// </summary>
 /// <param name="multiPoint">The MultiPoint to process.</param>
 /// <param name="writer">The output stream writer to Append to.</param>
 private static void AppendMultiPointText(MultiPoint multiPoint, StringWriter writer)
 {
     if (multiPoint == null || multiPoint.IsEmpty())
         writer.Write("EMPTY");
     else
     {
         writer.Write("(");
         for (int i = 0; i < multiPoint.Points.Count; i++)
         {
             if (i > 0)
                 writer.Write(", ");
             AppendCoordinate(multiPoint[i], writer);
         }
         writer.Write(")");
     }
 }