Ejemplo n.º 1
0
        public override bool Equals(object obj)
        {
            if (ReferenceEquals(this, obj))
            {
                return(true);
            }

            if (obj == null || this.GetType() != obj.GetType())
            {
                return(false);
            }

            FeatureId other = (FeatureId)obj;

            if (other.originalType != this.originalType)
            {
                return(false);
            }

            if (other.originalType == typeof(string))
            {
                return(other.stringValue == this.stringValue);
            }
            else
            {
                return(other.intValue == this.intValue);
            }
        }
Ejemplo n.º 2
0
 public Feature(Geometry geometry, IDictionary <string, dynamic> properties = null, IEnumerable <double> boundingBox = null, FeatureId id = null) : base(GeoJsonType.Feature, geometry == null ? false : geometry.IsThreeDimensional(), boundingBox)
 {
     this.Geometry   = geometry; // Geometry can be null
     this.Properties = properties ?? new Dictionary <string, dynamic>();
     this.Id         = id;       // id can be null
 }