Provides access to members that format Latitudes and Longitudes.
Description
The members in the ILatLonFormat2interface define how the ValueToStringmethod in the associated INumberFormat****interface formats numbers.
The LatLonFormatcoclass also inherits the INumericFormat ****interface, so both these interface's properties determine how numbers are formatted.
When To Use
Use the ILatLonFormat2interface to format numbers that represent a latitude or longitude.
Members
Name | Description | |
---|---|---|
![]() |
GetDMS | Obtains the degrees, minutes, and seconds for a lat/lon number. |
![]() |
IsLatitude | Indicates if a formatted number is a latitude or not. |
![]() |
IsLatitude | Indicates if a formatted number is a latitude or not. |
![]() |
ShowDirections | Indicates if a directional letter (N-S-E-W) is appended to the formatted number. |
![]() |
ShowZeroMinutes | Indicates if zero minutes are included in formatted output. |
![]() |
ShowZeroSeconds | Indicates if zero seconds are included in formatted output. |
ILatLonFormat2.GetDMS Method
Obtains the degrees, minutes, and seconds for a lat/lon number.
Public Sub GetDMS ( _
ByVal Value As Double, _
ByRef degrees As Integer, _
ByRef Minutes As Integer, _
ByRef Seconds As Double _
)
public void GetDMS (
double Value,
ref int degrees,
ref int Minutes,
ref double Seconds
);
Description
The GetDMSmethod returns the degrees, minutes, and seconds values for a given decimal degree latitudinal or longitudinal value.
To use it you should pass in the input decimal degree value and also pass in three double values representing the output degrees, minutes, and seconds that will be populated by the method.
ILatLonFormat2.IsLatitude Property
Indicates if a formatted number is a latitude or not.
Public Property IsLatitude As Boolean
public bool IsLatitude {get; set;}
Description
The IsLatitudeproperty sets or returns an indicator that tells whether the curvature of the coordinate system causes latitude labels to be placed on top or below the dataframe border, or for longitude labels that appear to the right or left of the dataframe border. It also determines the directional label appended to the format when the ValueToString****method in the associated INumberFormat interface formats numbers.
The settings for ShowDirectionsare:
Setting | Description |
---|---|
**False** | (Default) _Latitude_labels are placed on top of the dataframe border. _Longitude_labels are placed to the left of the dataframe border.If ShowDirections**is True, a directional letter designation of either E or W is appended to the format, for example, 23�E**. |
True | _Latitude_labels are placed below the dataframe border. _Longitude_labels are placed to the right of the dataframe border.If ShowDirections**is True, a directional letter designation of either N or S is appended to the format, for example, 17�N**. |
Remarks
When used with the IDMSGridLabel interface, it sets an indicator to specify that latitude labels will be placed on top of the data frame border, and longitude labels will be placed to the left of the data frame border. If True, the directional letter will be either N or S; with IDMSGridLabel, latitude labels are placed below the data frame border and longitude labels are placed to the right.
ILatLonFormat2.IsLatitude Property
Indicates if a formatted number is a latitude or not.
Public Property IsLatitude As Boolean
public bool IsLatitude {get; set;}
Description
The IsLatitudeproperty sets or returns an indicator that tells whether the curvature of the coordinate system causes latitude labels to be placed on top or below the dataframe border, or for longitude labels that appear to the right or left of the dataframe border. It also determines the directional label appended to the format when the ValueToString****method in the associated INumberFormat interface formats numbers.
The settings for ShowDirectionsare:
Setting | Description |
---|---|
**False** | (Default) _Latitude_labels are placed on top of the dataframe border. _Longitude_labels are placed to the left of the dataframe border.If ShowDirections**is True, a directional letter designation of either E or W is appended to the format, for example, 23�E**. |
True | _Latitude_labels are placed below the dataframe border. _Longitude_labels are placed to the right of the dataframe border.If ShowDirections**is True, a directional letter designation of either N or S is appended to the format, for example, 17�N**. |
Remarks
When used with the IDMSGridLabel interface, it sets an indicator to specify that latitude labels will be placed on top of the data frame border, and longitude labels will be placed to the left of the data frame border. If True, the directional letter will be either N or S; with IDMSGridLabel, latitude labels are placed below the data frame border and longitude labels are placed to the right.
ILatLonFormat2.ShowDirections Property
Indicates if a directional letter (N-S-E-W) is appended to the formatted number.
Public Property ShowDirections As Boolean
public bool ShowDirections {get; set;}
Description
The ShowDirectionsproperty sets or returns an indicator that tells whether to append a directional letter designation (N, S, E, or W) when the ValueToString**method in the associated INumberFormat**interface formats numbers.
The settings for ShowDirectionsare:
Setting | Description |
---|---|
**False** | (Default) A directional letter designation is not appended to the format, for example, 270�. |
True | A directional letter designation is appended to the format, for example, 270�E. |
Remarks
As an alternative, the ShowPlusSign property from INumericFormat can be used to show similar information since the LatLonFormat coclass also supports this interface.
ILatLonFormat2.ShowZeroMinutes Property
Indicates if zero minutes are included in formatted output.
Public Property ShowZeroMinutes As Boolean
public bool ShowZeroMinutes {get; set;}
Description
The ShowZeroMinutesproperty sets or returns an indicator that tells whether or not a zero value in the minutes location is expressed when the ValueToString**method in the associated INumberFormat**interface formats numbers. Non-zero values are always expressed in the format.
The settings for ShowZeroMinutesare:
Setting | Description |
---|---|
**False** | (Default) Zero values in the minutes location are not shown, for example 17�N. |
True | Zero values in the minutes location are shown, for example 17�0'N. |
ILatLonFormat2.ShowZeroSeconds Property
Indicates if zero seconds are included in formatted output.
Public Property ShowZeroSeconds As Boolean
public bool ShowZeroSeconds {get; set;}
Description
The ShowZeroSecondsproperty sets or returns an indicator that tells whether or not a zero value in the seconds location is expressed when the ValueToString method in the associated INumberFormat interface formats numbers. Non-zero values are always expressed in the format.
The settings for ShowZeroSecondsare:
Setting | Description |
---|---|
**False** | (Default) Zero values in the seconds location are not shown, for example 17�N . |
True | Zero values in the seconds location are shown, for example 17�0'0"N . |
Remarks
If ShowZeroSecondsis True, zero values in the _minutes_location are also shown regardless of the ShowZeroMinutes setting.
Classes that implement ILatLonFormat2
Classes | Description |
---|---|
LatLonFormat | An object for formatting numbers in a lat/lon format. |