13 private readonly
string boxId;
14 private readonly
bool includeMin;
15 private readonly
bool includeMax;
23 : this(
Min,
Max, true, true)
69 public string BoxId => this.boxId;
100 !(this.min is
null) &&
101 !(this.max is
null) &&
102 this.min.Longitude > this.max.Longitude;
109 StringBuilder sb =
new StringBuilder();
125 return sb.ToString();
131 StringBuilder sb =
new StringBuilder();
138 sb.Append(this.min?.NormalizedValue);
140 sb.Append(this.max?.NormalizedValue);
147 return sb.ToString();
155 (this.min?.Equals(Obj.Min) ?? Obj.Min is
null) &&
156 (this.max?.
Equals(Obj.Max) ?? Obj.Max is
null) &&
157 this.includeMin == Obj.includeMin &&
158 this.includeMax == Obj.includeMax;
164 int Result = this.min?.GetHashCode() ?? 0;
165 Result ^= Result << 5 ^ (this.max?.GetHashCode() ?? 0);
166 Result ^= Result << 5 ^ this.includeMin.GetHashCode();
167 Result ^= Result << 5 ^ this.includeMax.GetHashCode();
180 if (A is
null ^ B is
null)
197 if (A is
null ^ B is
null)
213 return !Location.LiesOutside(this.min, this.max, !this.includeMin, !this.includeMax);
224 return !Location.LiesOutside(this.min, this.max, !this.includeMin, !this.includeMax, IgnoreAltitude);
Contains information about a geo-spatial bounding box using the Mercator Projection.
static bool operator==(GeoBoundingBox A, GeoBoundingBox B)
Checks if two geo-spatial bounding boxes are equal.
string BoxId
The ID of the geo-spatial bounding box.
GeoBoundingBox(string BoxId, GeoPosition Min, GeoPosition Max, bool IncludeMin, bool IncludeMax)
Contains information about a position in a geo-spatial coordinate system.
GeoBoundingBox(GeoPosition Min, GeoPosition Max, bool IncludeMin, bool IncludeMax)
Contains information about a position in a geo-spatial coordinate system.
bool Contains(GeoPosition Location)
If the bounding box contains a location.
bool LongitudeWrapped
If the bounding box is longitude-wrapped, i.e. if the box passes the +-180 degrees longitude.
GeoBoundingBox(GeoPosition Min, GeoPosition Max)
Contains information about a position in a geo-spatial coordinate system.
static bool operator!=(GeoBoundingBox A, GeoBoundingBox B)
Checks if two geo-spatial bounding boxes are not equal.
bool IncludeMax
If the max latitude/longitude/altitude should be considered as included in the boundoing box.
string ToNormalizedString()
bool Contains(GeoPosition Location, bool IgnoreAltitude)
If the bounding box contains a location.
override int GetHashCode()
override bool Equals(object obj)
GeoPosition Max
Upper-right corner of bounding box.
GeoBoundingBox(string BoxId, GeoPosition Min, GeoPosition Max)
Contains information about a position in a geo-spatial coordinate system.
bool IncludeMin
If the min latitude/longitude/altitude should be considered as included in the boundoing box.
GeoPosition Min
Lower-left corner of bounding box.
override string ToString()
Contains information about a position in a geo-spatial coordinate system.
Interface for a geo-spatial bounding box using the Mercator Projection.