enmapbox package

Submodules

enmapbox.algorithmprovider module

Date : August 2017 Copyright : (C) 2017 by Benjamin Jakimow Email : benjamin.jakimow@geo.hu-berlin.de
  • it under the terms of the GNU General Public License as published by *
  • the Free Software Foundation; either version 2 of the License, or *
  • (at your option) any later version. *

enmapbox.algorithmprovider.instance() → <Mock spec='str' id='140289915139152'>[source]

Returns the EnMAPBoxAlgorithmProvider instance registered to QgsProcessingRegistry :return:

enmapbox.dependencycheck module

This module contains functionality to check the calling python environment for required packages and return user-friendly warning in case of missing dependencies.

Date : Januar 2018 Copyright : (C) 2018 by Benjamin Jakimow Email : benjamin.jakimow@geo.hu-berlin.de

  • it under the terms of the GNU General Public License as published by *
  • the Free Software Foundation; either version 3 of the License, or *
  • (at your option) any later version. *

class enmapbox.dependencycheck.InstallationState[source]

Bases: enum.Enum

An enumeration.

Installed = '<installed>'
LoadingError = '<loading error>'
NotInstalled = '<not installed>'
Unknown = 'unknown'
class enmapbox.dependencycheck.PIPPackage(pyPkg: str, pipCmd: str = None)[source]

Bases: object

installArgs(user: bool = True, upgrade: bool = False) → List[str][source]
installCommand(*args, **kwds) → str[source]

Returns the installation command as string :param args: :param kwds: :return: str

installPackage(*args, **kwds)[source]
isInstalled() → bool[source]

Returns True if the package is installed and can be imported in python :return: :rtype:

updateAvailable() → bool[source]
updateCommand() → str[source]

Returns the update command as string :return: str

enmapbox.dependencycheck.checkGDALIssues() → List[str][source]

Tests for known GDAL issues :return: list of errors / known problems

enmapbox.dependencycheck.installTestData(overwrite_existing=False, ask=True)[source]

Downloads and installs the EnMAP-Box Example Data

enmapbox.dependencycheck.localPythonExecutable() → pathlib.Path[source]

Searches for the local python executable :return:

enmapbox.dependencycheck.missingPackageInfo(missing_packages: List[enmapbox.dependencycheck.PIPPackage], html=True) → str[source]

Converts a list of missing packages into better readable output. :param missing_packages: list of uninstalled packages :param html: bool, set True (default) to return HTML output string :return: str

enmapbox.dependencycheck.missingPackages() → List[enmapbox.dependencycheck.PIPPackage][source]

Returns missing packages :return: [PIPPackage] :rtype:

enmapbox.dependencycheck.missingTestData() → bool[source]
Returns (True, message:str) if testdata can not be loaded,
(False, None) else
Returns:(bool, str)
enmapbox.dependencycheck.outdatedTestData() → bool[source]

Returns whether testdata is outdated.

enmapbox.dependencycheck.requiredPackages(return_tuples: bool = False) → List[enmapbox.dependencycheck.PIPPackage][source]

Returns a list of pip packages that should be installable according to the requirements.txt file :return: [list of strings] :rtype: list

enmapbox.enmapboxplugin module

Date : August 2017 Copyright : (C) 2017 by Benjamin Jakimow Email : benjamin.jakimow@geo.hu-berlin.de
  • it under the terms of the GNU General Public License as published by *
  • the Free Software Foundation; either version 2 of the License, or *
  • (at your option) any later version. *

class enmapbox.enmapboxplugin.EnMAPBoxPlugin(iface)[source]

Bases: object

initGui()[source]
initialDependencyCheck()[source]

Runs a check for availability of package dependencies and give an readible error message :return: :return:

run()[source]
unload()[source]

enmapbox.resources module

enmapbox.testing module

Module contents

begin : Jan 2016 copyright : (C) 2016 by Benjamin Jakimow email : benjamin.jakimow@geo.hu-berlin.de

the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this software. If not, see <http://www.gnu.org/licenses/>.


class enmapbox.Qgis[source]

Bases: object

Collection of some static methods to programmatically interact with QGIS inside the QGIS console.

classmethod activeBand(index)[source]
classmethod activeData(index=None)[source]
classmethod activeDataset()[source]
classmethod activeRaster()[source]
classmethod activeVector()[source]
enmapbox.collectEnMAPBoxAlgorithms() → List[<Mock name='mock.QgsProcessingAlgorithm' id='140289949009488'>][source]

Safely collects all QgsProcessingalgorithms from enmapboxgeoalgorithms.algorithms Missing dependencies or import errors will not stop the EnMAP-Box from being loaded :return: [QgsProcessingAlgorithms] :rtype: list

enmapbox.debugLog(msg: str)[source]
enmapbox.enmapboxSettings() → <Mock name='mock.QSettings' id='140290068724496'>[source]

Returns the QSettings object for EnMAP-Box Settings :return: QSettings

enmapbox.icon() → <Mock name='mock.QIcon' id='140289949035088'>[source]

Returns the EnMAP icon. (Requires that the EnMAP resources have been loaded before) :return: QIcon

enmapbox.initAll(processing=True)[source]

Calls other init routines required to run the EnMAP-Box properly

enmapbox.initEditorWidgets()[source]

Initialises QgsEditorWidgets

enmapbox.initEnMAPBoxProcessingProvider()[source]

Initializes the EnMAPBoxProcessingProvider

enmapbox.initEnMAPBoxResources()[source]

Loads (or reloads) all Qt resource files

enmapbox.initMapLayerConfigWidgetFactories()[source]
enmapbox.messageLog(msg, level=<Mock name='mock.Qgis.Info' id='140289949040016'>)[source]

Writes a log message to the QGIS EnMAP-Box Log :param msg: log message string :param level: Qgis.MessageLevel=[Qgis.Info|Qgis.Warning|Qgis.Critical|Qgis.Success|Qgis.NONE]

enmapbox.removeEnMAPBoxProcessingProvider()[source]

Removes the EnMAPBoxProcessingProvider

enmapbox.run()[source]

Call to start the EnMAP-Box :return:

enmapbox.scantree(path, ending: str = '') → pathlib.Path[source]

Recursively returns file paths in directory

enmapbox.tr(text: str) → str[source]

to be implemented: string translation :param text: :return: str