Struct GeoBounds
An axis-aligned latitude/longitude box, in degrees WGS84.
public readonly struct GeoBounds
- Inherited Members
Remarks
Does not model a span that crosses the antimeridian: a box from longitude 170 to -170 is rejected as min-exceeds-max rather than understood as the 20-degree span across the date line. Callers with global data should split at 180 and work with two boxes.
Constructors
GeoBounds(double, double, double, double)
Creates a bounding box from its edges, in degrees WGS84.
public GeoBounds(double minLat, double minLon, double maxLat, double maxLon)
Parameters
minLatdoubleSouthern edge, degrees WGS84.
minLondoubleWestern edge, degrees WGS84.
maxLatdoubleNorthern edge, degrees WGS84.
maxLondoubleEastern edge, degrees WGS84.
Exceptions
- ArgumentException
Either minimum exceeds its maximum. This is also what an antimeridian-crossing span looks like; see the type remarks.
Properties
Center
The midpoint of the box. This is the center of the rectangle in degrees, not a great-circle or area-weighted centroid.
public LatLon Center { get; }
Property Value
MaxLat
Northern edge, degrees WGS84.
public double MaxLat { get; }
Property Value
MaxLon
Eastern edge, degrees WGS84.
public double MaxLon { get; }
Property Value
MinLat
Southern edge, degrees WGS84.
public double MinLat { get; }
Property Value
MinLon
Western edge, degrees WGS84.
public double MinLon { get; }