Historical Map
1.0
Plugin for automatic extraction of old forest from historical map
|
QGIS Plugin Implementation. More...
Public Member Functions | |
def | __init__ |
Constructor. More... | |
def | onChangedLayer |
If active layer is changed, change column combobox. More... | |
def | tr |
Get the translation for a string using Qt translation API. More... | |
def | add_action |
def | initGui |
Create the menu entries and toolbar icons inside the QGIS GUI. More... | |
def | unload |
Removes the plugin menu item and icon from QGIS GUI. More... | |
def | select_output_file |
Select file to save, and gives the right extension if the user don't put it. More... | |
def | select_load_file |
Select file to load in the field. More... | |
def | showDlg |
def | runFilter |
Performs the filtering of the map by calling function_historical_map.py. More... | |
def | runTrain |
Performs the training by calling function_historical_map.py. More... | |
def | runClassify |
Performs the classification by calling function_historical_map.py Method that performs the classification. More... | |
Public Attributes | |
iface | |
plugin_dir | |
translator | |
dlg | |
actions | |
menu | |
toolbar | |
QGIS Plugin Implementation.
Definition at line 37 of file historical_map.py.
def HistoricalMap.historical_map.HistoricalMap.__init__ | ( | self, | |
iface | |||
) |
Constructor.
param iface: An interface instance that will be passed to this class which provides the hook by which you can manipulate the QGIS application at run time. type iface: QgsInterface
declare all fields to fill, such as output raster, columns to find from a shp...
Definition at line 40 of file historical_map.py.
def HistoricalMap.historical_map.HistoricalMap.add_action | ( | self, | |
icon_path, | |||
text, | |||
callback, | |||
enabled_flag = True , |
|||
add_to_menu = True , |
|||
add_to_toolbar = True , |
|||
status_tip = None , |
|||
whats_this = None , |
|||
parent = None |
|||
) |
Add a toolbar icon to the toolbar. :param icon_path: Path to the icon for this action. Can be a resource path (e.g. ':/plugins/foo/bar.png') or a normal file system path. :type icon_path: str :param text: Text that should be shown in menu items for this action. :type text: str :param callback: Function to be called when the action is triggered. :type callback: function :param enabled_flag: A flag indicating if the action should be enabled by default. Defaults to True. :type enabled_flag: bool :param add_to_menu: Flag indicating whether the action should also be added to the menu. Defaults to True. :type add_to_menu: bool :param add_to_toolbar: Flag indicating whether the action should also be added to the toolbar. Defaults to True. :type add_to_toolbar: bool :param status_tip: Optional text to show in a popup when mouse pointer hovers over the action. :type status_tip: str :param parent: Parent widget for the new action. Defaults None. :type parent: QWidget :param whats_this: Optional text to show in the status bar when the mouse pointer hovers over the action. :returns: The action that was created. Note that the action is also added to self.actions list. :rtype: QAction
Definition at line 155 of file historical_map.py.
def HistoricalMap.historical_map.HistoricalMap.initGui | ( | self | ) |
Create the menu entries and toolbar icons inside the QGIS GUI.
Definition at line 218 of file historical_map.py.
def HistoricalMap.historical_map.HistoricalMap.onChangedLayer | ( | self, | |
index | |||
) |
If active layer is changed, change column combobox.
Definition at line 115 of file historical_map.py.
def HistoricalMap.historical_map.HistoricalMap.runClassify | ( | self | ) |
Performs the classification by calling function_historical_map.py Method that performs the classification.
First step is validating the form, then if all is ok, proceed to the classification.
Definition at line 382 of file historical_map.py.
def HistoricalMap.historical_map.HistoricalMap.runFilter | ( | self | ) |
Performs the filtering of the map by calling function_historical_map.py.
First step is validating the form, then if all is ok, proceed to the filtering.
Definition at line 282 of file historical_map.py.
def HistoricalMap.historical_map.HistoricalMap.runTrain | ( | self | ) |
Performs the training by calling function_historical_map.py.
First step is validating the form, then if all is ok, proceed to the training. Tell the user who don't have sklearn they can't use classifier except GMM.
Input :
Fields from the form Output : Open a popup to show where the matrix or the model is saved
Definition at line 324 of file historical_map.py.
def HistoricalMap.historical_map.HistoricalMap.select_load_file | ( | self | ) |
Select file to load in the field.
Definition at line 271 of file historical_map.py.
def HistoricalMap.historical_map.HistoricalMap.select_output_file | ( | self | ) |
Select file to save, and gives the right extension if the user don't put it.
Definition at line 239 of file historical_map.py.
def HistoricalMap.historical_map.HistoricalMap.showDlg | ( | self | ) |
Definition at line 279 of file historical_map.py.
def HistoricalMap.historical_map.HistoricalMap.tr | ( | self, | |
message | |||
) |
Get the translation for a string using Qt translation API.
We implement this ourselves since we do not inherit QObject.
:param message: String for translation. :type message: str, QString
:returns: Translated version of message. :rtype: QString
Definition at line 130 of file historical_map.py.
def HistoricalMap.historical_map.HistoricalMap.unload | ( | self | ) |
Removes the plugin menu item and icon from QGIS GUI.
Definition at line 229 of file historical_map.py.
HistoricalMap.historical_map.HistoricalMap.actions |
Definition at line 76 of file historical_map.py.
HistoricalMap.historical_map.HistoricalMap.dlg |
Definition at line 74 of file historical_map.py.
HistoricalMap.historical_map.HistoricalMap.iface |
Definition at line 54 of file historical_map.py.
HistoricalMap.historical_map.HistoricalMap.menu |
Definition at line 77 of file historical_map.py.
HistoricalMap.historical_map.HistoricalMap.plugin_dir |
Definition at line 58 of file historical_map.py.
HistoricalMap.historical_map.HistoricalMap.toolbar |
Definition at line 79 of file historical_map.py.
HistoricalMap.historical_map.HistoricalMap.translator |
Definition at line 67 of file historical_map.py.