Skip to content

Commit

Permalink
7.10.7
Browse files Browse the repository at this point in the history
  • Loading branch information
semiautomaticgit committed Sep 7, 2022
1 parent 913c265 commit acfc616
Show file tree
Hide file tree
Showing 23 changed files with 23,004 additions and 22,993 deletions.
23 changes: 13 additions & 10 deletions core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3248,19 +3248,22 @@ def createRasterFromReference(self, gdalRasterRef, bandNumber, outputRasterList,
gBand2 = gdalRasterRef.GetRasterBand(1)
ndVal = gBand2.GetNoDataValue()
if format is None:
format = gBand2.DataType
format_x = gBand2.DataType
elif format == 'Float64':
format = cfg.gdalSCP.GDT_Float64
format_x = cfg.gdalSCP.GDT_Float64
elif format == 'Float32':
format = cfg.gdalSCP.GDT_Float32
format_x = cfg.gdalSCP.GDT_Float32
elif format == 'Int32':
format = cfg.gdalSCP.GDT_Int32
format_x = cfg.gdalSCP.GDT_Int32
elif format == 'Int16':
format = cfg.gdalSCP.GDT_Int16
format_x = cfg.gdalSCP.GDT_Int16
elif format == 'UInt16':
format = cfg.gdalSCP.GDT_UInt16
format_x = cfg.gdalSCP.GDT_UInt16
elif format == 'Byte':
format = cfg.gdalSCP.GDT_Byte
format_x = cfg.gdalSCP.GDT_Byte
else:
format_x = cfg.gdalSCP.GDT_Float32
cfg.mx.msgBox("format_x", str(format_x))
if previewSize > 0:
tLX = rGT[0]
tLY = rGT[3]
Expand All @@ -3280,11 +3283,11 @@ def createRasterFromReference(self, gdalRasterRef, bandNumber, outputRasterList,
r = previewSize
rGT = (lX, rGT[1], rGT[2], tY, rGT[4], rGT[5])
if compress == 'No':
oR = tD.Create(o, c, r, bandNumber, format)
oR = tD.Create(o, c, r, bandNumber, format_x)
elif compress == 'DEFLATE21':
oR = tD.Create(o, c, r, bandNumber, format, options = ['COMPRESS=DEFLATE', 'PREDICTOR=2', 'ZLEVEL=1'])
oR = tD.Create(o, c, r, bandNumber, format_x, options = ['COMPRESS=DEFLATE', 'PREDICTOR=2', 'ZLEVEL=1'])
else:
oR = tD.Create(o, c, r, bandNumber, format, ['COMPRESS=' + compressFormat])
oR = tD.Create(o, c, r, bandNumber, format_x, ['COMPRESS=' + compressFormat])
if oR is None:
# logger
cfg.utls.logCondition(str(__name__) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), 'Error GDAL raster')
Expand Down
5 changes: 4 additions & 1 deletion dock/scpdock.py
Original file line number Diff line number Diff line change
Expand Up @@ -2523,7 +2523,10 @@ def addHighlightPolygon(self, sourceLayer, ID):
except:
pass
clr = cfg.QtGuiSCP.QColor(cfg.ROIClrVal)
rT = 255 - cfg.ROITrnspVal * 255 // 100
try:
rT = 255 - int(cfg.ROITrnspVal) * 255 / 100
except:
rT = 100
clr.setAlpha(rT)
f = cfg.utls.getFeaturebyID(sourceLayer, ID)
cfg.rbbrBndPol = cfg.qgisGuiSCP.QgsHighlight(cfg.cnvs, f.geometry(), sourceLayer)
Expand Down
4 changes: 2 additions & 2 deletions docs/repository.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version = '1.0' encoding = 'UTF-8'?>
<plugins>
<pyqgis_plugin name="Semi-Automatic Classification Plugin - master" version="7.10.6" plugin_id="284">
<pyqgis_plugin name="Semi-Automatic Classification Plugin - master" version="7.10.7" 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 ASTER, GOES, Landsat, MODIS, Sentinel-1, Sentinel-2, and Sentinel-3 images. Several algorithms are available for the land cover classification. This plugin requires the installation of GDAL, OGR, Numpy, SciPy, and Matplotlib. Some tools require also the installation of SNAP (ESA Sentinel Application Platform). For more information please visit https://fromgistors.blogspot.com .]]></about>
<version>7.10.6</version>
<version>7.10.7</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
22 changes: 11 additions & 11 deletions i18n/models/semiautomaticclassificationplugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5524,12 +5524,12 @@ Do you want to add the required fields to this shapefile?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../core/utils.py" line="7477"/>
<location filename="../core/utils.py" line="7480"/>
<source>Build overviews</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../core/utils.py" line="7477"/>
<location filename="../core/utils.py" line="7480"/>
<source>Do you want to build the external overviews of bands?</source>
<translation type="unfinished"></translation>
</message>
Expand Down Expand Up @@ -6144,7 +6144,7 @@ Do you want to add the required fields to this shapefile?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../core/utils.py" line="9583"/>
<location filename="../core/utils.py" line="9586"/>
<source>SCP: completed process</source>
<translation type="unfinished"></translation>
</message>
Expand Down Expand Up @@ -6554,27 +6554,27 @@ Do you want to add the required fields to this shapefile?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../core/utils.py" line="6368"/>
<location filename="../core/utils.py" line="6371"/>
<source>Calculating signature</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../core/utils.py" line="7751"/>
<location filename="../core/utils.py" line="7754"/>
<source>Writing file</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../core/utils.py" line="5662"/>
<location filename="../core/utils.py" line="5665"/>
<source>Conversion to vector</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../core/utils.py" line="7426"/>
<location filename="../core/utils.py" line="7429"/>
<source>Sieve</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../core/utils.py" line="7556"/>
<location filename="../core/utils.py" line="7559"/>
<source>Building overviews</source>
<translation type="unfinished"></translation>
</message>
Expand Down Expand Up @@ -6614,12 +6614,12 @@ Do you want to add the required fields to this shapefile?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../core/utils.py" line="9030"/>
<location filename="../core/utils.py" line="9033"/>
<source>Remove rows</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../core/utils.py" line="9030"/>
<location filename="../core/utils.py" line="9033"/>
<source>Are you sure you want to remove highlighted rows from the table?</source>
<translation type="unfinished"></translation>
</message>
Expand Down Expand Up @@ -6964,7 +6964,7 @@ Do you want to add the required fields to this shapefile?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../dock/scpdock.py" line="2834"/>
<location filename="../dock/scpdock.py" line="2837"/>
<source>Region growing</source>
<translation type="unfinished"></translation>
</message>
Expand Down
22 changes: 11 additions & 11 deletions i18n/semiautomaticclassificationplugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5524,12 +5524,12 @@ Do you want to add the required fields to this shapefile?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../core/utils.py" line="7477"/>
<location filename="../core/utils.py" line="7480"/>
<source>Build overviews</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../core/utils.py" line="7477"/>
<location filename="../core/utils.py" line="7480"/>
<source>Do you want to build the external overviews of bands?</source>
<translation type="unfinished"></translation>
</message>
Expand Down Expand Up @@ -6144,7 +6144,7 @@ Do you want to add the required fields to this shapefile?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../core/utils.py" line="9583"/>
<location filename="../core/utils.py" line="9586"/>
<source>SCP: completed process</source>
<translation type="unfinished"></translation>
</message>
Expand Down Expand Up @@ -6554,27 +6554,27 @@ Do you want to add the required fields to this shapefile?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../core/utils.py" line="6368"/>
<location filename="../core/utils.py" line="6371"/>
<source>Calculating signature</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../core/utils.py" line="7751"/>
<location filename="../core/utils.py" line="7754"/>
<source>Writing file</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../core/utils.py" line="5662"/>
<location filename="../core/utils.py" line="5665"/>
<source>Conversion to vector</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../core/utils.py" line="7426"/>
<location filename="../core/utils.py" line="7429"/>
<source>Sieve</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../core/utils.py" line="7556"/>
<location filename="../core/utils.py" line="7559"/>
<source>Building overviews</source>
<translation type="unfinished"></translation>
</message>
Expand Down Expand Up @@ -6614,12 +6614,12 @@ Do you want to add the required fields to this shapefile?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../core/utils.py" line="9030"/>
<location filename="../core/utils.py" line="9033"/>
<source>Remove rows</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../core/utils.py" line="9030"/>
<location filename="../core/utils.py" line="9033"/>
<source>Are you sure you want to remove highlighted rows from the table?</source>
<translation type="unfinished"></translation>
</message>
Expand Down Expand Up @@ -6964,7 +6964,7 @@ Do you want to add the required fields to this shapefile?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../dock/scpdock.py" line="2834"/>
<location filename="../dock/scpdock.py" line="2837"/>
<source>Region growing</source>
<translation type="unfinished"></translation>
</message>
Expand Down
22 changes: 11 additions & 11 deletions i18n/semiautomaticclassificationplugin_ar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5524,12 +5524,12 @@ Do you want to add the required fields to this shapefile?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../core/utils.py" line="7477"/>
<location filename="../core/utils.py" line="7480"/>
<source>Build overviews</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../core/utils.py" line="7477"/>
<location filename="../core/utils.py" line="7480"/>
<source>Do you want to build the external overviews of bands?</source>
<translation type="unfinished"></translation>
</message>
Expand Down Expand Up @@ -6144,7 +6144,7 @@ Do you want to add the required fields to this shapefile?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../core/utils.py" line="9583"/>
<location filename="../core/utils.py" line="9586"/>
<source>SCP: completed process</source>
<translation type="unfinished"></translation>
</message>
Expand Down Expand Up @@ -6554,27 +6554,27 @@ Do you want to add the required fields to this shapefile?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../core/utils.py" line="6368"/>
<location filename="../core/utils.py" line="6371"/>
<source>Calculating signature</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../core/utils.py" line="7751"/>
<location filename="../core/utils.py" line="7754"/>
<source>Writing file</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../core/utils.py" line="5662"/>
<location filename="../core/utils.py" line="5665"/>
<source>Conversion to vector</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../core/utils.py" line="7426"/>
<location filename="../core/utils.py" line="7429"/>
<source>Sieve</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../core/utils.py" line="7556"/>
<location filename="../core/utils.py" line="7559"/>
<source>Building overviews</source>
<translation type="unfinished"></translation>
</message>
Expand Down Expand Up @@ -6614,12 +6614,12 @@ Do you want to add the required fields to this shapefile?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../core/utils.py" line="9030"/>
<location filename="../core/utils.py" line="9033"/>
<source>Remove rows</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../core/utils.py" line="9030"/>
<location filename="../core/utils.py" line="9033"/>
<source>Are you sure you want to remove highlighted rows from the table?</source>
<translation type="unfinished"></translation>
</message>
Expand Down Expand Up @@ -6964,7 +6964,7 @@ Do you want to add the required fields to this shapefile?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../dock/scpdock.py" line="2834"/>
<location filename="../dock/scpdock.py" line="2837"/>
<source>Region growing</source>
<translation type="unfinished"></translation>
</message>
Expand Down
22 changes: 11 additions & 11 deletions i18n/semiautomaticclassificationplugin_de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5524,12 +5524,12 @@ Do you want to add the required fields to this shapefile?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../core/utils.py" line="7477"/>
<location filename="../core/utils.py" line="7480"/>
<source>Build overviews</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../core/utils.py" line="7477"/>
<location filename="../core/utils.py" line="7480"/>
<source>Do you want to build the external overviews of bands?</source>
<translation type="unfinished"></translation>
</message>
Expand Down Expand Up @@ -6144,7 +6144,7 @@ Do you want to add the required fields to this shapefile?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../core/utils.py" line="9583"/>
<location filename="../core/utils.py" line="9586"/>
<source>SCP: completed process</source>
<translation type="unfinished"></translation>
</message>
Expand Down Expand Up @@ -6554,27 +6554,27 @@ Do you want to add the required fields to this shapefile?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../core/utils.py" line="6368"/>
<location filename="../core/utils.py" line="6371"/>
<source>Calculating signature</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../core/utils.py" line="7751"/>
<location filename="../core/utils.py" line="7754"/>
<source>Writing file</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../core/utils.py" line="5662"/>
<location filename="../core/utils.py" line="5665"/>
<source>Conversion to vector</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../core/utils.py" line="7426"/>
<location filename="../core/utils.py" line="7429"/>
<source>Sieve</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../core/utils.py" line="7556"/>
<location filename="../core/utils.py" line="7559"/>
<source>Building overviews</source>
<translation type="unfinished"></translation>
</message>
Expand Down Expand Up @@ -6614,12 +6614,12 @@ Do you want to add the required fields to this shapefile?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../core/utils.py" line="9030"/>
<location filename="../core/utils.py" line="9033"/>
<source>Remove rows</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../core/utils.py" line="9030"/>
<location filename="../core/utils.py" line="9033"/>
<source>Are you sure you want to remove highlighted rows from the table?</source>
<translation type="unfinished"></translation>
</message>
Expand Down Expand Up @@ -6964,7 +6964,7 @@ Do you want to add the required fields to this shapefile?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../dock/scpdock.py" line="2834"/>
<location filename="../dock/scpdock.py" line="2837"/>
<source>Region growing</source>
<translation type="unfinished"></translation>
</message>
Expand Down
Loading

0 comments on commit acfc616

Please sign in to comment.