示例#1
0
 /// <summary>
 /// This allows the creation of the correct kind of Extent class from an Envelope, which can contain
 /// M or Z values.
 /// </summary>
 /// <param name="self">The Envelope to convert into an Extent.</param>
 /// <returns></returns>
 public static Extent ToExtent(this IEnvelope self)
 {
     if (self.HasZ())
     {
         // regardless of whether it has M, we need an MZExtent.
         return(new ExtentMZ(self));
     }
     if (self.HasM())
     {
         return(new ExtentM(self));
     }
     return(new Extent(self));
 }