Robust lat-lon rectangle representation.
More...
|
GeoRect | Clone () |
| Create a clone of the object. Strictly not required for structs, but removes caller assumptions that GeoPos is a struct.
|
|
| GeoRect (double swLat, double swLon, double neLat, double neLon) |
| Initializes a new instance of the GeoRect struct from south, west, north and east most points.
|
|
| GeoRect (GeoPos sw, GeoPos ne) |
| Initializes a new instance of the GeoRect struct from south-west most and north-east most points.
|
|
| GeoRect (GeoPos pos) |
| Initializes a new instance of the GeoRect struct, from another GeoRect struct.
|
|
| GeoRect (GeoPos pos, double deltaLat, double deltaLon) |
| Initializes a new instance of the GeoRect struct from centerposition, height and width.
|
|
| GeoRect (double minLat, double maxLat) |
| Initializes a new instance of the GeoRect struct, form min/max latitude, with longitude -180 - 180.
|
|
| GeoRect (GeoPos[] pos) |
| Initializes a new instance of the GeoRect struct containing the minimum enclosing rectangle which bounds the given GeoRect structs. Please note that if the input points span a longitude range of more than 180 degrees, the minimum bounding rectangle may be on the opposite side of the globe and less than 180 degrees in longitude!
|
|
void | AddPos (GeoPos pos) |
| Extend the area by including a new position.
|
|
override string | ToString () |
| Return center position and delta lat/long formatted.
|
|
bool | Contains (GeoPos pos) |
| Checks if a given GeoPos is inside the area.
|
|
bool | Intersects (GeoRect rc) |
| Checks if a given GeoRect intersects the area.
|
|
bool | Contains (GeoRect rc) |
| Checks if a given GeoRect is contained in the area.
|
|
GeoRect | Intersection (GeoRect rc) |
| Returns the intersecting area of two GeoRect structs.
|
|
override bool | Equals (object obj) |
| Chacks if two GeoRect structs are equal.
|
|
void | InflateRelative (double factor) |
| Inflate latitude and longitude extents with given factor.
|
|
void | InflateAbsolute (double deltaLat, double deltaLon) |
| Inflate latitude and longitude.
|
|
override int | GetHashCode () |
| Not implemented!
|
|
|
static double | NormalizedLat (double lat) |
| Normalizing a latitude value.
|
|
static double | NormalizedLon (double lon) |
| Normalizing a longitude value.
|
|
static double | LatDistance (double lat1, double lat2) |
| Calculates delta latitude.
|
|
static double | LonDistance (double lon1, double lon2) |
| Calculates delta longitude.
|
|
|
GeoPos | Center |
| The center position.
|
|
double | DeltaLat |
| Delta latitude ("lattitude size").
|
|
double | DeltaLon |
| Delta longitude ("longitude size")
|
|
|
static readonly GeoRect | Global = new GeoRect(new GeoPos(0, 0), 180.0, 360.0) |
| GeoRect struct representing the entire globe. (Center point 0,0 - 180 degrees heigh (delta lat) 360 degrees wide (delta longitude).
|
|
|
bool | IsInit [get] |
| True if rectangle has an area - or centerpoint differs from 0,0. Otherwice false.
|
|
bool | HasArea [get] |
| True if rectangle has an area. Otherwice false.
|
|
bool | IsValid [get] |
| True centerpoint ia a valid position.Otherwice false.
|
|
GeoPos | LowerLeft [get] |
| Get LowerLeft position of GeoRect struct.
|
|
GeoPos | UpperRight [get] |
| Get UpperRight position of GeoRect struct.
|
|
GeoPos | UpperLeft [get] |
| Get UpperLeft position of GeoRect struct.
|
|
GeoPos | LowerRight [get] |
| Get LowerRight position of GeoRect struct.
|
|
Robust lat-lon rectangle representation.
◆ GeoRect() [1/6]
TPG.GeoUnits.GeoRect.GeoRect |
( |
double |
swLat, |
|
|
double |
swLon, |
|
|
double |
neLat, |
|
|
double |
neLon |
|
) |
| |
|
inline |
Initializes a new instance of the GeoRect struct from south, west, north and east most points.
- Parameters
-
swLat | South most point (latitude). |
swLon | West most point (longitude). |
neLat | North most point (latitude). |
neLon | East most point (longitude). |
◆ GeoRect() [2/6]
Initializes a new instance of the GeoRect struct from south-west most and north-east most points.
- Parameters
-
sw | South-west most point. |
ne | north-east most point. |
◆ GeoRect() [3/6]
TPG.GeoUnits.GeoRect.GeoRect |
( |
GeoPos |
pos | ) |
|
|
inline |
Initializes a new instance of the GeoRect struct, from another GeoRect struct.
- Parameters
-
◆ GeoRect() [4/6]
TPG.GeoUnits.GeoRect.GeoRect |
( |
GeoPos |
pos, |
|
|
double |
deltaLat, |
|
|
double |
deltaLon |
|
) |
| |
|
inline |
Initializes a new instance of the GeoRect struct from centerposition, height and width.
- Parameters
-
pos | Center position. |
deltaLat | Delta latitude ("lattitude size"). |
deltaLon | Delta Longitude ("longitudel size"). |
◆ GeoRect() [5/6]
TPG.GeoUnits.GeoRect.GeoRect |
( |
double |
minLat, |
|
|
double |
maxLat |
|
) |
| |
|
inline |
Initializes a new instance of the GeoRect struct, form min/max latitude, with longitude -180 - 180.
- Parameters
-
minLat | South most edge. |
maxLat | North most edge. |
special case includes poles, either minLat must be -90 or maxLat must be 90
◆ GeoRect() [6/6]
TPG.GeoUnits.GeoRect.GeoRect |
( |
GeoPos[] |
pos | ) |
|
|
inline |
Initializes a new instance of the GeoRect struct containing the minimum enclosing rectangle which bounds the given GeoRect structs. Please note that if the input points span a longitude range of more than 180 degrees, the minimum bounding rectangle may be on the opposite side of the globe and less than 180 degrees in longitude!
- Parameters
-
◆ AddPos()
void TPG.GeoUnits.GeoRect.AddPos |
( |
GeoPos |
pos | ) |
|
|
inline |
Extend the area by including a new position.
- Parameters
-
◆ Clone()
GeoRect TPG.GeoUnits.GeoRect.Clone |
( |
| ) |
|
|
inline |
Create a clone of the object. Strictly not required for structs, but removes caller assumptions that GeoPos is a struct.
- Returns
◆ Contains() [1/2]
bool TPG.GeoUnits.GeoRect.Contains |
( |
GeoPos |
pos | ) |
|
|
inline |
Checks if a given GeoPos is inside the area.
- Parameters
-
- Returns
- True if area contains the given position, otherwice false.
◆ Contains() [2/2]
bool TPG.GeoUnits.GeoRect.Contains |
( |
GeoRect |
rc | ) |
|
|
inline |
Checks if a given GeoRect is contained in the area.
- Parameters
-
- Returns
- True if rc is fully contained in the area
◆ Equals()
override bool TPG.GeoUnits.GeoRect.Equals |
( |
object |
obj | ) |
|
|
inline |
Chacks if two GeoRect structs are equal.
- Parameters
-
- Returns
- True if equal, otherwice false.
◆ GetHashCode()
override int TPG.GeoUnits.GeoRect.GetHashCode |
( |
| ) |
|
|
inline |
Not implemented!
- Returns
- Not implemented!
◆ InflateAbsolute()
void TPG.GeoUnits.GeoRect.InflateAbsolute |
( |
double |
deltaLat, |
|
|
double |
deltaLon |
|
) |
| |
|
inline |
Inflate latitude and longitude.
- Parameters
-
deltaLat | Degrees added to latitude |
deltaLon | Degrees added to longitude |
◆ InflateRelative()
void TPG.GeoUnits.GeoRect.InflateRelative |
( |
double |
factor | ) |
|
|
inline |
Inflate latitude and longitude extents with given factor.
- Parameters
-
factor | Multiply latitude extents and longitude extents with this factor |
◆ Intersection()
Returns the intersecting area of two GeoRect structs.
- Parameters
-
- Returns
- The intersecting area.
◆ Intersects()
bool TPG.GeoUnits.GeoRect.Intersects |
( |
GeoRect |
rc | ) |
|
|
inline |
Checks if a given GeoRect intersects the area.
- Parameters
-
- Returns
- True if any part of rc is inside the area
◆ LatDistance()
static double TPG.GeoUnits.GeoRect.LatDistance |
( |
double |
lat1, |
|
|
double |
lat2 |
|
) |
| |
|
inlinestatic |
Calculates delta latitude.
- Parameters
-
lat1 | First latitude. |
lat2 | Second latitude. |
- Returns
- Delta latitude
◆ LonDistance()
static double TPG.GeoUnits.GeoRect.LonDistance |
( |
double |
lon1, |
|
|
double |
lon2 |
|
) |
| |
|
inlinestatic |
Calculates delta longitude.
- Parameters
-
lon1 | First longitude. |
lon2 | Second longitude. |
- Returns
- Delta longitude
◆ NormalizedLat()
static double TPG.GeoUnits.GeoRect.NormalizedLat |
( |
double |
lat | ) |
|
|
inlinestatic |
Normalizing a latitude value.
- Parameters
-
- Returns
- Normalized latitude, between -90 and 90 (truncated)
◆ NormalizedLon()
static double TPG.GeoUnits.GeoRect.NormalizedLon |
( |
double |
lon | ) |
|
|
inlinestatic |
Normalizing a longitude value.
- Parameters
-
lon | "Raw" longitude value. |
- Returns
- Normalized longitude, between -180 and 180 (adjusted)
◆ ToString()
override string TPG.GeoUnits.GeoRect.ToString |
( |
| ) |
|
|
inline |
Return center position and delta lat/long formatted.
- Returns
- Formatted result.
The documentation for this struct was generated from the following file:
- Src/Libraries/Teleplan.C4IS.Geo/Objects/GeoRect.cs