Skip to content

Commit

Permalink
8.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
semiautomaticgit committed Nov 3, 2023
1 parent 31f1a59 commit 59b184f
Show file tree
Hide file tree
Showing 7 changed files with 15,691 additions and 15,675 deletions.
2 changes: 1 addition & 1 deletion __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def description():


def version():
return 'Version 8.1.1 - Infinity'
return 'Version 8.1.2 - Infinity'


def icon():
Expand Down
2 changes: 1 addition & 1 deletion docs/repository.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<pyqgis_plugin name="Semi-Automatic Classification Plugin - master" version="8.1.1" plugin_id="284">
<description><![CDATA[The Semi-Automatic Classification Plugin (SCP) allows for the supervised classification of remote sensing images, providing tools for the download, the preprocessing and postprocessing of images.]]></description>
<about><![CDATA[Developed by Luca Congedo, the Semi-Automatic Classification Plugin (SCP) allows for the supervised classification of remote sensing images, providing tools for the download, the preprocessing and postprocessing of images. Search and download is available for Landsat, Sentinel-2 images. Several algorithms are available for the land cover classification. This plugin requires the installation of Remotior Sensus, GDAL, OGR, Numpy, SciPy, and Matplotlib. For more information please visit https://fromgistors.blogspot.com .]]></about>
<version>8.1.1</version>
<version>8.1.2</version>
<qgis_minimum_version>3.0.0</qgis_minimum_version>
<qgis_maximum_version>3.99.0</qgis_maximum_version>
<homepage><![CDATA[https://fromgistors.blogspot.com/p/semi-automatic-classification-plugin.html]]></homepage>
Expand Down
9 changes: 9 additions & 0 deletions interface/classification_tab.py
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,15 @@ def run_classifier(save_classifier=None, preview_point=None):
cfg.util_qgis.save_qml_style(
raster, '%s/%s.qml' % (directory, name)
)
if output.extra['algorithm_raster'] is not None:
# add raster to layers
cfg.util_qgis.add_raster_layer(
output.extra['algorithm_raster']
)
if output.extra['signature_rasters'] is not None:
# add raster to layers
for s in output.extra['signature_rasters']:
cfg.util_qgis.add_raster_layer(s)
else:
cfg.mx.msg_err_1()
cfg.ui_utils.remove_progress_bar(smtp=str(__name__))
Expand Down
56 changes: 29 additions & 27 deletions interface/scp_dock.py
Original file line number Diff line number Diff line change
Expand Up @@ -424,33 +424,35 @@ def roi_signature_table_tree(self, tree=None):
signatures = self.signature_catalog.table.signature_id.tolist()
class_name_list = []
for signature in signatures:
signature_array = self.signature_catalog.table[
self.signature_catalog.table['signature_id'] == signature]
macroclass_id = signature_array.macroclass_id[0]
class_id = signature_array.class_id[0]
class_name = signature_array.class_name[0]
class_name_list.append(class_name)
selected = signature_array.selected[0]
geometry_check = signature_array.geometry[0]
signature_check = signature_array.signature[0]
color = signature_array.color[0]
if signature_check == 1 and geometry_check == 1:
type_info = cfg.roi_and_signature_type
elif geometry_check == 1:
type_info = cfg.roi_type
elif signature_check == 1:
type_info = cfg.signature_type
else:
type_info = ''
cfg.logger.log.error('type_info empty')
# replace for checkbox state
if selected == 1:
selected = 2
self.add_class_tree_item(
macroclass_id=macroclass_id, class_id=class_id,
class_info=class_name, type_info=type_info,
signature_id=signature, color=color, checkbox_state=selected
)
if signature != 'N/A':
signature_array = self.signature_catalog.table[
self.signature_catalog.table['signature_id'] == signature]
macroclass_id = signature_array.macroclass_id[0]
class_id = signature_array.class_id[0]
class_name = signature_array.class_name[0]
class_name_list.append(class_name)
selected = signature_array.selected[0]
geometry_check = signature_array.geometry[0]
signature_check = signature_array.signature[0]
color = signature_array.color[0]
if signature_check == 1 and geometry_check == 1:
type_info = cfg.roi_and_signature_type
elif geometry_check == 1:
type_info = cfg.roi_type
elif signature_check == 1:
type_info = cfg.signature_type
else:
type_info = ''
cfg.logger.log.error('type_info empty')
# replace for checkbox state
if selected == 1:
selected = 2
self.add_class_tree_item(
macroclass_id=macroclass_id, class_id=class_id,
class_info=class_name, type_info=type_info,
signature_id=signature, color=color,
checkbox_state=selected
)
cfg.logger.log.debug('class_name_list: %s' % str(class_name_list))
self.tree.show()
self.tree.setSortingEnabled(True)
Expand Down
82 changes: 42 additions & 40 deletions interface/signature_threshold_tab.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,46 +44,48 @@ def signature_thresholds_to_table():
ids = sig_table.signature_id.tolist()
row = 0
for signature_id in ids:
signature_array = cfg.scp_training.signature_catalog.table[
cfg.scp_training.signature_catalog.table[
'signature_id'] == signature_id]
macroclass_id = signature_array.macroclass_id[0]
class_id = signature_array.class_id[0]
class_name = signature_array.class_name[0]
macroclass_name = (
cfg.scp_training.signature_catalog.macroclasses[
macroclass_id
]
)
min_dist_thr = signature_array.min_dist_thr[0]
max_like_thr = signature_array.max_like_thr[0]
spec_angle_thr = signature_array.spec_angle_thr[0]
cfg.util_qt.insert_table_row(table, row)
cfg.util_qt.add_table_item(
table, int(macroclass_id), row, 0, False
)
cfg.util_qt.add_table_item(
table, str(macroclass_name), row, 1, False
)
cfg.util_qt.add_table_item(
table, int(class_id), row, 2, False
)
cfg.util_qt.add_table_item(
table, str(class_name), row, 3, False
)
cfg.util_qt.add_table_item(
table, str(min_dist_thr), row, 4
)
cfg.util_qt.add_table_item(
table, str(max_like_thr), row, 5
)
cfg.util_qt.add_table_item(
table, str(spec_angle_thr), row, 6
)
cfg.util_qt.add_table_item(
table, str(signature_id), row, 7, False
)
row += 1
if signature_id != 'N/A':
signature_array = \
cfg.scp_training.signature_catalog.table[
cfg.scp_training.signature_catalog.table[
'signature_id'] == signature_id]
macroclass_id = signature_array.macroclass_id[0]
class_id = signature_array.class_id[0]
class_name = signature_array.class_name[0]
macroclass_name = (
cfg.scp_training.signature_catalog.macroclasses[
macroclass_id
]
)
min_dist_thr = signature_array.min_dist_thr[0]
max_like_thr = signature_array.max_like_thr[0]
spec_angle_thr = signature_array.spec_angle_thr[0]
cfg.util_qt.insert_table_row(table, row)
cfg.util_qt.add_table_item(
table, int(macroclass_id), row, 0, False
)
cfg.util_qt.add_table_item(
table, str(macroclass_name), row, 1, False
)
cfg.util_qt.add_table_item(
table, int(class_id), row, 2, False
)
cfg.util_qt.add_table_item(
table, str(class_name), row, 3, False
)
cfg.util_qt.add_table_item(
table, str(min_dist_thr), row, 4
)
cfg.util_qt.add_table_item(
table, str(max_like_thr), row, 5
)
cfg.util_qt.add_table_item(
table, str(spec_angle_thr), row, 6
)
cfg.util_qt.add_table_item(
table, str(signature_id), row, 7, False
)
row += 1
table.blockSignals(False)
cfg.util_qt.sort_table_column(table, 7)

Expand Down
5 changes: 4 additions & 1 deletion metadata.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name=Semi-Automatic Classification Plugin
qgisMinimumVersion=3.00
description=The Semi-Automatic Classification Plugin (SCP) allows for the supervised classification of remote sensing images, providing tools for the download, the preprocessing and postprocessing of images.
version=8.1.1
version=8.1.2
about=Developed by Luca Congedo, the Semi-Automatic Classification Plugin (SCP) allows for the supervised classification of remote sensing images, providing tools for the download, the preprocessing and postprocessing of images. Search and download is available for Landsat, Sentinel-2 images. Several algorithms are available for the land cover classification. This plugin requires the installation of Remotior Sensus, GDAL, OGR, Numpy, SciPy, and Matplotlib. For more information please visit https://fromgistors.blogspot.com .

author=Luca Congedo
Expand All @@ -13,6 +13,9 @@ icon=semiautomaticclassificationplugin.png

changelog=

8.1.2
-fixed classification tool

8.1.1
-fixed band set tools integration with image conversion

Expand Down
Loading

0 comments on commit 59b184f

Please sign in to comment.