Class: QgsBabelSimpleImportFormat¶
- class qgis.core.QgsBabelSimpleImportFormat¶
Bases:
QgsAbstractBabelFormat
A babel format capable of converting input files to GPX files.
Added in version 3.22.
QgsBabelSimpleImportFormat(format: Optional[str], description: Optional[str], capabilities: Union[Qgis.BabelFormatCapabilities, Qgis.BabelFormatCapability], extensions: Iterable[Optional[str]] = []) Constructor for QgsBabelSimpleImportFormat.
The
format
argument specifies the babel identifier for the input format.The
description
argument specified a descriptive name for the format.The
capabilities
argument must reflect whether the format is capable of handling waypoints, routes and/or tracks.The optional
extensions
argument can be used to populate a list of known file extensions for the format (e.g. “csv”, “txt”).QgsBabelSimpleImportFormat(a0:
QgsBabelSimpleImportFormat
)Methods
Returns the friendly description for the format.
Returns the list of known extensions for the format, e.g. "csv", "txt".
Converts a GPS feature type to the equivalent babel argument.
- param babel:
- description(self) str ¶
Returns the friendly description for the format.
- Return type:
str
- extensions(self) List[str] ¶
Returns the list of known extensions for the format, e.g. “csv”, “txt”.
- Return type:
List[str]
- featureTypeToArgument(type: Qgis.GpsFeatureType) str ¶
Converts a GPS feature type to the equivalent babel argument.
- importCommand(self, babel: str | None, featureType: Qgis.GpsFeatureType, input: str | None, output: str | None, flags: Qgis.BabelCommandFlags | Qgis.BabelCommandFlag = Qgis.BabelCommandFlags()) List[str] ¶
- Parameters:
babel (Optional[str])
featureType (Qgis.GpsFeatureType)
input (Optional[str])
output (Optional[str])
flags (Union[Qgis.BabelCommandFlags)
- Return type:
List[str]