Class: QgsAbstractBabelFormat¶
Abstract base class for babel GPS formats.
Added in version 3.22.
Class Hierarchy¶
Subclasses¶
A babel format capable of interacting directly with a GPS device.  | 
|
A babel format capable of converting input files to GPX files.  | 
Methods
Returns the format's capabilities.  | 
|
Generates a command for exporting GPS data into a different format using babel.  | 
|
Generates a command for importing data into a GPS format using babel.  | 
|
Returns the format's name.  | 
Static Methods
Converts a GPS feature type to the equivalent babel argument.  | 
- class qgis.core.QgsAbstractBabelFormat[source]¶
 Bases:
object- __init__(name: str | None = '')
 Constructor for QgsAbstractBabelFormat, with the specified
name.- Parameters:
 name (Optional[str] = '')
- __init__(a0: QgsAbstractBabelFormat)
 - Parameters:
 
- capabilities(self) Qgis.BabelFormatCapabilities[source]¶
 Returns the format’s capabilities.
- Return type:
 
- exportCommand(self, babel: str | None, featureType: Qgis.GpsFeatureType, input: str | None, output: str | None, flags: Qgis.BabelCommandFlags | Qgis.BabelCommandFlag = Qgis.BabelCommandFlags()) List[str][source]¶
 Generates a command for exporting GPS data into a different format using babel.
- Parameters:
 babel (Optional[str]) – path to the babel executable
featureType (Qgis.GpsFeatureType) – type of GPS feature to export
input (Optional[str]) – input data path
output (Optional[str]) – output path
flags (Union[Qgis.BabelCommandFlags, Qgis.BabelCommandFlag] = Qgis.BabelCommandFlags()) – optional flags to control how babel command is generated
Returns an empty list if the format does not support exports (see
capabilities()).- Return type:
 List[str]
- static featureTypeToArgument(type: Qgis.GpsFeatureType) str[source]¶
 Converts a GPS feature type to the equivalent babel argument.
- Parameters:
 type (Qgis.GpsFeatureType)
- Return type:
 str
- importCommand(self, babel: str | None, featureType: Qgis.GpsFeatureType, input: str | None, output: str | None, flags: Qgis.BabelCommandFlags | Qgis.BabelCommandFlag = Qgis.BabelCommandFlags()) List[str][source]¶
 Generates a command for importing data into a GPS format using babel.
- Parameters:
 babel (Optional[str]) – babel path to the babel executable
featureType (Qgis.GpsFeatureType) – type of GPS feature to import
input (Optional[str]) – input data path
output (Optional[str]) – output path
flags (Union[Qgis.BabelCommandFlags, Qgis.BabelCommandFlag] = Qgis.BabelCommandFlags()) – optional flags to control how babel command is generated
Returns an empty list if the format does not support imports (see
capabilities()).- Return type:
 List[str]