Represents a geographical position.
More...
|
| GeoPos (double lat, double lon) |
| Initializes a new instance of the GeoPos struct from separate latitude and longitude values (degrees).
|
|
| GeoPos (double latDeg, double latMin, double latSec, double lonDeg, double lonMin, double lonSec) |
| Initializes a new instance of the GeoPos struct from dms components.
|
|
| GeoPos (Tuple< double, double > latlon) |
| Initializes a new instance of the GeoPos struct from a latitude and longitude pair (degrees).
|
|
void | Set (double lat, double lon) |
| Sets/re-sets the position.
|
|
void | SetInvalid () |
| Sets the content to an invalid position.
|
|
override bool | Equals (object obj) |
| Checks if a GeoPos structs have equal content to this.
|
|
override int | GetHashCode () |
| Get the objects hash code.
|
|
override string | ToString () |
| Returns the GeoPos struct as formatted string (PositionFormat: GeoDMS).
|
|
string | ToString (PositionFormat posFormat) |
| Returns the GeoPos struct as formatted string, selectable format.
|
|
string | ToString (string formatString, CultureInfo ci=null) |
| Returns the GeoPos struct as formatted string (PositionFormat: GeoDMS).
|
|
void | Normalize (double eps=0.0) |
| Normalize position by clamping latitude to [-90, 90] and keeping longitude between -180 and 180 by modulo.
|
|
|
double | Lat |
| Latitude of the position, in degrees.
|
|
double | Lon |
| Longitude of the position, in degrees.
|
|
|
bool | IsValid [get] |
| Valitation of position.
|
|
static GeoPos | InvalidPos [get] |
| GeoPos struct representing an invalid position.
|
|
Represents a geographical position.
◆ GeoPos() [1/3]
TPG.GeoUnits.GeoPos.GeoPos |
( |
double |
lat, |
|
|
double |
lon |
|
) |
| |
|
inline |
Initializes a new instance of the GeoPos struct from separate latitude and longitude values (degrees).
- Parameters
-
lat | Latitude of the position, in degrees. |
lon | Longitude of the position, in degrees. |
◆ GeoPos() [2/3]
TPG.GeoUnits.GeoPos.GeoPos |
( |
double |
latDeg, |
|
|
double |
latMin, |
|
|
double |
latSec, |
|
|
double |
lonDeg, |
|
|
double |
lonMin, |
|
|
double |
lonSec |
|
) |
| |
|
inline |
Initializes a new instance of the GeoPos struct from dms components.
- Parameters
-
latDeg | Latitude degrees [-90,90] |
latMin | Latutude minutes |
latSec | Latitude seconds |
lonDeg | Longitude degrees [-180,180] |
lonMin | Longitude minutes |
lonSec | Longitude seconds |
◆ GeoPos() [3/3]
TPG.GeoUnits.GeoPos.GeoPos |
( |
Tuple< double, double > |
latlon | ) |
|
|
inline |
Initializes a new instance of the GeoPos struct from a latitude and longitude pair (degrees).
- Parameters
-
latlon | Pair of latitude & longitude |
◆ Equals()
override bool TPG.GeoUnits.GeoPos.Equals |
( |
object |
obj | ) |
|
|
inline |
Checks if a GeoPos structs have equal content to this.
- Parameters
-
- Returns
◆ GetHashCode()
override int TPG.GeoUnits.GeoPos.GetHashCode |
( |
| ) |
|
|
inline |
Get the objects hash code.
- Returns
- Hash code.
◆ Normalize()
void TPG.GeoUnits.GeoPos.Normalize |
( |
double |
eps = 0::0 | ) |
|
|
inline |
Normalize position by clamping latitude to [-90, 90] and keeping longitude between -180 and 180 by modulo.
- Parameters
-
◆ operator!=()
static bool TPG.GeoUnits.GeoPos.operator!= |
( |
GeoPos |
p1, |
|
|
GeoPos |
p2 |
|
) |
| |
|
inlinestatic |
Checks if two GeoPos structs have different content.
- Parameters
-
- Returns
◆ operator==()
static bool TPG.GeoUnits.GeoPos.operator== |
( |
GeoPos |
p1, |
|
|
GeoPos |
p2 |
|
) |
| |
|
inlinestatic |
Checks if two GeoPos structs have equal content.
- Parameters
-
p1 | First GeoPos |
p2 | Second GeoPos |
- Returns
◆ Parse() [1/2]
Parsing the content of a formatted position string according to provided format.
- Parameters
-
s | String to be parsed. |
unitSettingProvider | Provided IGeoUnitsSettingProvider format. |
- Returns
- New GeoPos instance.
◆ Parse() [2/2]
Parsing the content of a formatted position string according to provided format.
- Parameters
-
s | String to be parsed. |
posFormat | Provided PositionFormat format. |
- Returns
- New GeoPos instance.
◆ Set()
void TPG.GeoUnits.GeoPos.Set |
( |
double |
lat, |
|
|
double |
lon |
|
) |
| |
|
inline |
Sets/re-sets the position.
- Parameters
-
lat | Latitude of the position, in degrees. |
lon | Longitude of the position, in degrees. |
◆ ToString() [1/3]
override string TPG.GeoUnits.GeoPos.ToString |
( |
| ) |
|
|
inline |
Returns the GeoPos struct as formatted string (PositionFormat: GeoDMS).
- Returns
- Formatted string.
◆ ToString() [2/3]
Returns the GeoPos struct as formatted string, selectable format.
- Parameters
-
posFormat | Selected PositionFormat. |
- Returns
- Formatted string.
◆ ToString() [3/3]
string TPG.GeoUnits.GeoPos.ToString |
( |
string |
formatString, |
|
|
CultureInfo |
ci = null |
|
) |
| |
|
inline |
Returns the GeoPos struct as formatted string (PositionFormat: GeoDMS).
- Returns
- Formatted string.
◆ TryParse() [1/2]
Try parsing the content of a formatted position string according to provided format.
- Parameters
-
s | String to be parsed. |
unitSettingProvider | Provided IGeoUnitsSettingProvider format. |
gp | New GeoPos instance. |
- Returns
- True if parsed sucessfully, othervice false.
◆ TryParse() [2/2]
Try parsing the content of a formatted position string according to provided format.
- Parameters
-
s | String to be parsed. |
posFormat | Provided PositionFormat format. |
gp | New GeoPos instance. |
- Returns
- True if parsed sucessfully, othervice false.
◆ Lat
double TPG.GeoUnits.GeoPos.Lat |
Latitude of the position, in degrees.
Between -90.0 and 90.0 defgrees.
◆ Lon
double TPG.GeoUnits.GeoPos.Lon |
Longitude of the position, in degrees.
Between -180.0 and 180.0 degrees.
◆ IsValid
bool TPG.GeoUnits.GeoPos.IsValid |
|
get |
Valitation of position.
True if contained position is valid, otherwice false.
The documentation for this struct was generated from the following file:
- Src/Libraries/Teleplan.C4IS.Geo/Objects/GeoPos.cs