![]() |
Maria GDK 4.7.0.170
Documentation of managed code in develop branch
|
Robust lat-lon rectangle representation. More...
Public Member Functions | |
| 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, bool requireArea=true) |
| 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 () |
| Returns hash code. | |
Static Public Member Functions | |
| 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. | |
Public Attributes | |
| GeoPos | Center |
| The center position. | |
| double | DeltaLat |
| Delta latitude ("lattitude size"). | |
| double | DeltaLon |
| Delta longitude ("longitude size") | |
Static Public Attributes | |
| 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). | |
Properties | |
| 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.
|
inline |
Initializes a new instance of the GeoRect struct from south, west, north and east most points.
| swLat | South most point (latitude). |
| swLon | West most point (longitude). |
| neLat | North most point (latitude). |
| neLon | East most point (longitude). |
Initializes a new instance of the GeoRect struct from south-west most and north-east most points.
| sw | South-west most point. |
| ne | north-east most point. |
|
inline |
Initializes a new instance of the GeoRect struct, from another GeoRect struct.
| pos | Center position. |
|
inline |
Initializes a new instance of the GeoRect struct from centerposition, height and width.
| pos | Center position. |
| deltaLat | Delta latitude ("lattitude size"). |
| deltaLon | Delta Longitude ("longitudel size"). |
|
inline |
Initializes a new instance of the GeoRect struct, form min/max latitude, with longitude -180 - 180.
| minLat | South most edge. |
| maxLat | North most edge. |
special case includes poles, either minLat must be -90 or maxLat must be 90
|
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!
| pos |
|
inline |
Extend the area by including a new position.
| pos | New position. |
|
inline |
Create a clone of the object. Strictly not required for structs, but removes caller assumptions that GeoPos is a struct.
|
inline |
Checks if a given GeoPos is inside the area.
| pos | Position to check. |
|
inline |
Checks if a given GeoRect is contained in the area.
| rc | Rectangle to check. |
|
inline |
Chacks if two GeoRect structs are equal.
| obj | Struct to check. |
|
inline |
Inflate latitude and longitude.
| deltaLat | Degrees added to latitude |
| deltaLon | Degrees added to longitude |
|
inline |
Inflate latitude and longitude extents with given factor.
| factor | Multiply latitude extents and longitude extents with this factor |
Returns the intersecting area of two GeoRect structs.
| rc | Intersecting struct. |
|
inline |
Checks if a given GeoRect intersects the area.
| rc | Rectangle to check. |
|
inlinestatic |
Calculates delta latitude.
| lat1 | First latitude. |
| lat2 | Second latitude. |
|
inlinestatic |
Calculates delta longitude.
| lon1 | First longitude. |
| lon2 | Second longitude. |
|
inlinestatic |
Normalizing a latitude value.
| lat | "Raw" latitude value. |
|
inlinestatic |
Normalizing a longitude value.
| lon | "Raw" longitude value. |
|
inline |
Return center position and delta lat/long formatted.