Class: QgsGeographicCoordinateNumericFormat¶
- class qgis.core.QgsGeographicCoordinateNumericFormat¶
Bases:
QgsBasicNumericFormat
A numeric formatter which returns a text representation of a geographic coordinate (latitude or longitude).
New in version 3.26.
QgsGeographicCoordinateNumericFormat() Default constructor
QgsGeographicCoordinateNumericFormat(
QgsGeographicCoordinateNumericFormat
)Enums
Bases:
enum.IntEnum
Methods
Returns the angle format, which controls how bearing the angles are formatted described in the returned strings.
- rtype
QgsGeographicCoordinateNumericFormat
- param context
- param configuration
- param value
- rtype
str
Sets the directional formatting option, which controls how bearing the angles are formatted described in the returned strings.
- param configuration
Sets whether leading zeros for the degree values should be shown.
Sets whether directional suffixes (e.g.
Sets whether leading zeros in the minutes or seconds values should be shown.
Returns
True
if leading zeros for the degree values should be shown.Returns
True
if directional suffixes (e.g.Returns
True
if leading zeros in the minutes or seconds values should be shown.- rtype
int
- rtype
float
- rtype
str
Attributes
- class AngleFormat(value)¶
Bases:
enum.IntEnum
Angle format options.
DegreesMinutesSeconds
: Degrees, minutes and seconds, eg 30 degrees 45’30DegreesMinutes
: Degrees and decimal minutes, eg 30 degrees 45.55’DecimalDegrees
: Decimal degrees, eg 30.7555 degrees
- DecimalDegrees = 2¶
- DegreesMinutes = 1¶
- DegreesMinutesSeconds = 0¶
- baseClass¶
alias of
QgsGeographicCoordinateNumericFormat
- angleFormat(self) QgsGeographicCoordinateNumericFormat.AngleFormat ¶
Returns the angle format, which controls how bearing the angles are formatted described in the returned strings.
See also
- Return type
- clone(self) QgsGeographicCoordinateNumericFormat ¶
- Return type
- configuration(self, context: QgsReadWriteContext) Dict[str, Any] ¶
- Parameters
context (QgsReadWriteContext) –
- Return type
Dict[str, Any]
- create(self, configuration: Dict[str, Any], context: QgsReadWriteContext) QgsNumericFormat ¶
- Parameters
configuration (Dict[str) –
context (QgsReadWriteContext) –
- Return type
- formatDouble(self, value: float, context: QgsNumericFormatContext) str ¶
- Parameters
value (float) –
context (QgsNumericFormatContext) –
- Return type
str
- id(self) str ¶
- Return type
str
- setAngleFormat(self, format: QgsGeographicCoordinateNumericFormat.AngleFormat)¶
Sets the directional formatting option, which controls how bearing the angles are formatted described in the returned strings.
See also
- Parameters
- setConfiguration(self, configuration: Dict[str, Any], context: QgsReadWriteContext)¶
- Parameters
configuration (Dict[str) –
context (QgsReadWriteContext) –
- setShowDegreeLeadingZeros(self, show: bool)¶
Sets whether leading zeros for the degree values should be shown.
See also
- Parameters
show (bool) –
- setShowDirectionalSuffix(self, show: bool)¶
Sets whether directional suffixes (e.g. “N”) should be included.
See also
- Parameters
show (bool) –
- setShowLeadingZeros(self, show: bool)¶
Sets whether leading zeros in the minutes or seconds values should be shown.
See also
- Parameters
show (bool) –
- showDegreeLeadingZeros(self) bool ¶
Returns
True
if leading zeros for the degree values should be shown.See also
- Return type
bool
- showDirectionalSuffix(self) bool ¶
Returns
True
if directional suffixes (e.g. “N”) should be included.See also
- Return type
bool
- showLeadingZeros(self) bool ¶
Returns
True
if leading zeros in the minutes or seconds values should be shown.See also
- Return type
bool
- sortKey(self) int ¶
- Return type
int
- staticMetaObject = <PyQt5.QtCore.QMetaObject object>¶
- suggestSampleValue(self) float ¶
- Return type
float
- visibleName(self) str ¶
- Return type
str