Class: QgsVectorLayerGpsLogger¶
Handles logging of incoming GPS data to a vector layer.
Added in version 3.30.
Class Hierarchy¶
Base classes¶
Base class for objects which log incoming GPS data. |
|
Methods
Returns the destination field name for a specific GPS information component. |
|
Ends the current track, storing it in the |
|
Returns the layer in which recorded GPS points will be stored. |
|
Sets a destination field name for a specific GPS information component. |
|
Sets the layer in which recorded GPS points should be stored. |
|
Sets the layer in which recorded GPS tracks should be stored. |
|
Sets whether the logger will use the vector layer edit buffer for the destination layers. |
|
Returns the layer in which recorded GPS tracks will be stored. |
|
Returns |
- class qgis.core.QgsVectorLayerGpsLogger[source]¶
Bases:
QgsGpsLogger
- __init__(connection: QgsGpsConnection | None, parent: QObject | None = None)
Constructor for QgsVectorLayerGpsLogger with the specified
parent
object.The logger will automatically record GPS information from the specified
connection
.- Parameters:
connection (Optional[QgsGpsConnection])
parent (Optional[QObject] = None)
- destinationField(self, component: Qgis.GpsInformationComponent) str [source]¶
Returns the destination field name for a specific GPS information
component
.See also
- Parameters:
component (Qgis.GpsInformationComponent)
- Return type:
str
- endCurrentTrack(self)[source]¶
Ends the current track, storing it in the
tracksLayer()
if appropriate.
- pointsLayer(self) QgsVectorLayer | None [source]¶
Returns the layer in which recorded GPS points will be stored.
May be
None
if points are not being stored.See also
See also
- Return type:
Optional[QgsVectorLayer]
- setDestinationField(self, component: Qgis.GpsInformationComponent, field: str | None)[source]¶
Sets a destination
field
name for a specific GPS informationcomponent
.Depending on the
component
, the field will either refer to thepointsLayer()
ortracksLayer()
.Fields stored in the
pointsLayer()
are:Qgis
.GpsInformationComponent.Location:Qgis
.GpsInformationComponent.Altitude:Qgis
.GpsInformationComponent.GroundSpeed:Qgis
.GpsInformationComponent.Bearing:Qgis
.GpsInformationComponent.Pdop:Qgis
.GpsInformationComponent.Hdop:Qgis
.GpsInformationComponent.Vdop:Qgis
.GpsInformationComponent.HorizontalAccuracy:Qgis
.GpsInformationComponent.VerticalAccuracy:Qgis
.GpsInformationComponent.HvAccuracy:Qgis
.GpsInformationComponent.SatellitesUsed:Qgis
.GpsInformationComponent.Timestamp:Qgis
.GpsInformationComponent.TrackDistanceSinceLastPoint:Qgis
.GpsInformationComponent.TrackTimeSinceLastPoint:
Fields stored in the
tracksLayer()
are:Qgis
.GpsInformationComponent.TrackStartTime:Qgis
.GpsInformationComponent.TrackEndTime:Qgis
.GpsInformationComponent.TotalTrackLength:Qgis
.GpsInformationComponent.TrackDistanceFromStart:
See also
- Parameters:
component (Qgis.GpsInformationComponent)
field (Optional[str])
- setPointsLayer(self, layer: QgsVectorLayer | None)[source]¶
Sets the
layer
in which recorded GPS points should be stored.See also
See also
- Parameters:
layer (Optional[QgsVectorLayer])
- setTracksLayer(self, layer: QgsVectorLayer | None)[source]¶
Sets the
layer
in which recorded GPS tracks should be stored.See also
See also
- Parameters:
layer (Optional[QgsVectorLayer])
- setWriteToEditBuffer(self, buffer: bool)[source]¶
Sets whether the logger will use the vector layer edit buffer for the destination layers.
If
buffer
isFalse
then the features will be written directly to the destination layer’s data providers.The default behavior is to use the edit buffer.
See also
- Parameters:
buffer (bool)
- tracksLayer(self) QgsVectorLayer | None [source]¶
Returns the layer in which recorded GPS tracks will be stored.
May be
None
if tracks are not being stored.See also
See also
- Return type:
Optional[QgsVectorLayer]
- writeToEditBuffer(self) bool [source]¶
Returns
True
if the logger will use the vector layer edit buffer for the destination layers.If
False
then the features will be written directly to the destination layer’s data providers.The default behavior is to use the edit buffer.
See also
- Return type:
bool