Example #1
0
        /// <summary>The output of this method can be only used for debugging.</summary>
        /// <remarks>The output of this method can be only used for debugging. It is subject to change without notice.</remarks>
//		public override string ToString()
//		{
//			string snippet = com.epl.geometry.OperatorExportToJson.Local().Execute(GetSpatialReference(), GetGeometry());
//			if (snippet.Length > 200)
//			{
//				return snippet.Substring(0, 197 - 0) + "... (" + snippet.Length + " characters)";
//			}
//			else
//			{
//				return snippet;
//			}
//		}

        public override bool Equals(object other)
        {
            if (other == null)
            {
                return(false);
            }
            if (other == this)
            {
                return(true);
            }
            if (other.GetType() != GetType())
            {
                return(false);
            }
            com.epl.geometry.MapGeometry      omg = (com.epl.geometry.MapGeometry)other;
            com.epl.geometry.SpatialReference sr  = GetSpatialReference();
            com.epl.geometry.Geometry         g   = GetGeometry();
            com.epl.geometry.SpatialReference osr = omg.GetSpatialReference();
            com.epl.geometry.Geometry         og  = omg.GetGeometry();
            if (sr != osr)
            {
                if (sr == null || !sr.Equals(osr))
                {
                    return(false);
                }
            }
            if (g != og)
            {
                if (g == null || !g.Equals(og))
                {
                    return(false);
                }
            }
            return(true);
        }
 public override bool Equals(object other)
 {
     if (other == null)
     {
         return(false);
     }
     if (other == this)
     {
         return(true);
     }
     if (other.GetType() != GetType())
     {
         return(false);
     }
     com.epl.geometry.ogc.OGCGeometry another = (com.epl.geometry.ogc.OGCGeometry)other;
     com.epl.geometry.Geometry        geom1   = GetEsriGeometry();
     com.epl.geometry.Geometry        geom2   = another.GetEsriGeometry();
     if (geom1 == null)
     {
         if (geom2 != null)
         {
             return(false);
         }
     }
     else
     {
         if (!geom1.Equals(geom2))
         {
             return(false);
         }
     }
     if (esriSR == another.esriSR)
     {
         return(true);
     }
     if (esriSR != null && another.esriSR != null)
     {
         return(esriSR.Equals(another.esriSR));
     }
     return(false);
 }