Class: QgsAbstractBabelFormat

class qgis.core.QgsAbstractBabelFormat

Bases: sip.wrapper

Abstract base class for babel GPS formats.

New in version 3.22.

QgsAbstractBabelFormat(name: str = ‘’) Constructor for QgsAbstractBabelFormat, with the specified name.

QgsAbstractBabelFormat(QgsAbstractBabelFormat)

Methods

capabilities

Returns the format’s capabilities.

exportCommand

Generates a command for exporting GPS data into a different format using babel.

featureTypeToArgument

Converts a GPS feature type to the equivalent babel argument.

importCommand

Generates a command for importing data into a GPS format using babel.

name

Returns the format’s name.

capabilities(self) Qgis.BabelFormatCapabilities

Returns the format’s capabilities.

Return type

Qgis.BabelFormatCapabilities

exportCommand(self, babel: str, featureType: Qgis.GpsFeatureType, input: str, output: str, flags: Union[Qgis.BabelCommandFlags, Qgis.BabelCommandFlag] = Qgis.BabelCommandFlags()) List[str]

Generates a command for exporting GPS data into a different format using babel.

Parameters
  • babel (str) – path to the babel executable

  • featureType (Qgis.GpsFeatureType) – type of GPS feature to export

  • input (str) – input data path

  • output (str) – output path

  • flags (Union[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]

featureTypeToArgument(type: Qgis.GpsFeatureType) str

Converts a GPS feature type to the equivalent babel argument.

Parameters

type (Qgis.GpsFeatureType) –

Return type

str

importCommand(self, babel: str, featureType: Qgis.GpsFeatureType, input: str, output: str, flags: Union[Qgis.BabelCommandFlags, Qgis.BabelCommandFlag] = Qgis.BabelCommandFlags()) List[str]

Generates a command for importing data into a GPS format using babel.

Parameters
  • babel (str) – babel path to the babel executable

  • featureType (Qgis.GpsFeatureType) – type of GPS feature to import

  • input (str) – input data path

  • output (str) – output path

  • flags (Union[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]

name(self) str

Returns the format’s name.

Return type

str