Skip to content

Commit acfc616

Browse files
7.10.7
1 parent 913c265 commit acfc616

23 files changed

Lines changed: 23004 additions & 22993 deletions

core/utils.py

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3248,19 +3248,22 @@ def createRasterFromReference(self, gdalRasterRef, bandNumber, outputRasterList,
32483248
gBand2 = gdalRasterRef.GetRasterBand(1)
32493249
ndVal = gBand2.GetNoDataValue()
32503250
if format is None:
3251-
format = gBand2.DataType
3251+
format_x = gBand2.DataType
32523252
elif format == 'Float64':
3253-
format = cfg.gdalSCP.GDT_Float64
3253+
format_x = cfg.gdalSCP.GDT_Float64
32543254
elif format == 'Float32':
3255-
format = cfg.gdalSCP.GDT_Float32
3255+
format_x = cfg.gdalSCP.GDT_Float32
32563256
elif format == 'Int32':
3257-
format = cfg.gdalSCP.GDT_Int32
3257+
format_x = cfg.gdalSCP.GDT_Int32
32583258
elif format == 'Int16':
3259-
format = cfg.gdalSCP.GDT_Int16
3259+
format_x = cfg.gdalSCP.GDT_Int16
32603260
elif format == 'UInt16':
3261-
format = cfg.gdalSCP.GDT_UInt16
3261+
format_x = cfg.gdalSCP.GDT_UInt16
32623262
elif format == 'Byte':
3263-
format = cfg.gdalSCP.GDT_Byte
3263+
format_x = cfg.gdalSCP.GDT_Byte
3264+
else:
3265+
format_x = cfg.gdalSCP.GDT_Float32
3266+
cfg.mx.msgBox("format_x", str(format_x))
32643267
if previewSize > 0:
32653268
tLX = rGT[0]
32663269
tLY = rGT[3]
@@ -3280,11 +3283,11 @@ def createRasterFromReference(self, gdalRasterRef, bandNumber, outputRasterList,
32803283
r = previewSize
32813284
rGT = (lX, rGT[1], rGT[2], tY, rGT[4], rGT[5])
32823285
if compress == 'No':
3283-
oR = tD.Create(o, c, r, bandNumber, format)
3286+
oR = tD.Create(o, c, r, bandNumber, format_x)
32843287
elif compress == 'DEFLATE21':
3285-
oR = tD.Create(o, c, r, bandNumber, format, options = ['COMPRESS=DEFLATE', 'PREDICTOR=2', 'ZLEVEL=1'])
3288+
oR = tD.Create(o, c, r, bandNumber, format_x, options = ['COMPRESS=DEFLATE', 'PREDICTOR=2', 'ZLEVEL=1'])
32863289
else:
3287-
oR = tD.Create(o, c, r, bandNumber, format, ['COMPRESS=' + compressFormat])
3290+
oR = tD.Create(o, c, r, bandNumber, format_x, ['COMPRESS=' + compressFormat])
32883291
if oR is None:
32893292
# logger
32903293
cfg.utls.logCondition(str(__name__) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), 'Error GDAL raster')

dock/scpdock.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2523,7 +2523,10 @@ def addHighlightPolygon(self, sourceLayer, ID):
25232523
except:
25242524
pass
25252525
clr = cfg.QtGuiSCP.QColor(cfg.ROIClrVal)
2526-
rT = 255 - cfg.ROITrnspVal * 255 // 100
2526+
try:
2527+
rT = 255 - int(cfg.ROITrnspVal) * 255 / 100
2528+
except:
2529+
rT = 100
25272530
clr.setAlpha(rT)
25282531
f = cfg.utls.getFeaturebyID(sourceLayer, ID)
25292532
cfg.rbbrBndPol = cfg.qgisGuiSCP.QgsHighlight(cfg.cnvs, f.geometry(), sourceLayer)

docs/repository.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?xml version = '1.0' encoding = 'UTF-8'?>
22
<plugins>
3-
<pyqgis_plugin name="Semi-Automatic Classification Plugin - master" version="7.10.6" plugin_id="284">
3+
<pyqgis_plugin name="Semi-Automatic Classification Plugin - master" version="7.10.7" plugin_id="284">
44
<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>
55
<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>
6-
<version>7.10.6</version>
6+
<version>7.10.7</version>
77
<qgis_minimum_version>3.0.0</qgis_minimum_version>
88
<qgis_maximum_version>3.99.0</qgis_maximum_version>
99
<homepage><![CDATA[https://fromgistors.blogspot.com/p/semi-automatic-classification-plugin.html]]></homepage>

i18n/models/semiautomaticclassificationplugin.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5524,12 +5524,12 @@ Do you want to add the required fields to this shapefile?</source>
55245524
<translation type="unfinished"></translation>
55255525
</message>
55265526
<message>
5527-
<location filename="../core/utils.py" line="7477"/>
5527+
<location filename="../core/utils.py" line="7480"/>
55285528
<source>Build overviews</source>
55295529
<translation type="unfinished"></translation>
55305530
</message>
55315531
<message>
5532-
<location filename="../core/utils.py" line="7477"/>
5532+
<location filename="../core/utils.py" line="7480"/>
55335533
<source>Do you want to build the external overviews of bands?</source>
55345534
<translation type="unfinished"></translation>
55355535
</message>
@@ -6144,7 +6144,7 @@ Do you want to add the required fields to this shapefile?</source>
61446144
<translation type="unfinished"></translation>
61456145
</message>
61466146
<message>
6147-
<location filename="../core/utils.py" line="9583"/>
6147+
<location filename="../core/utils.py" line="9586"/>
61486148
<source>SCP: completed process</source>
61496149
<translation type="unfinished"></translation>
61506150
</message>
@@ -6554,27 +6554,27 @@ Do you want to add the required fields to this shapefile?</source>
65546554
<translation type="unfinished"></translation>
65556555
</message>
65566556
<message>
6557-
<location filename="../core/utils.py" line="6368"/>
6557+
<location filename="../core/utils.py" line="6371"/>
65586558
<source>Calculating signature</source>
65596559
<translation type="unfinished"></translation>
65606560
</message>
65616561
<message>
6562-
<location filename="../core/utils.py" line="7751"/>
6562+
<location filename="../core/utils.py" line="7754"/>
65636563
<source>Writing file</source>
65646564
<translation type="unfinished"></translation>
65656565
</message>
65666566
<message>
6567-
<location filename="../core/utils.py" line="5662"/>
6567+
<location filename="../core/utils.py" line="5665"/>
65686568
<source>Conversion to vector</source>
65696569
<translation type="unfinished"></translation>
65706570
</message>
65716571
<message>
6572-
<location filename="../core/utils.py" line="7426"/>
6572+
<location filename="../core/utils.py" line="7429"/>
65736573
<source>Sieve</source>
65746574
<translation type="unfinished"></translation>
65756575
</message>
65766576
<message>
6577-
<location filename="../core/utils.py" line="7556"/>
6577+
<location filename="../core/utils.py" line="7559"/>
65786578
<source>Building overviews</source>
65796579
<translation type="unfinished"></translation>
65806580
</message>
@@ -6614,12 +6614,12 @@ Do you want to add the required fields to this shapefile?</source>
66146614
<translation type="unfinished"></translation>
66156615
</message>
66166616
<message>
6617-
<location filename="../core/utils.py" line="9030"/>
6617+
<location filename="../core/utils.py" line="9033"/>
66186618
<source>Remove rows</source>
66196619
<translation type="unfinished"></translation>
66206620
</message>
66216621
<message>
6622-
<location filename="../core/utils.py" line="9030"/>
6622+
<location filename="../core/utils.py" line="9033"/>
66236623
<source>Are you sure you want to remove highlighted rows from the table?</source>
66246624
<translation type="unfinished"></translation>
66256625
</message>
@@ -6964,7 +6964,7 @@ Do you want to add the required fields to this shapefile?</source>
69646964
<translation type="unfinished"></translation>
69656965
</message>
69666966
<message>
6967-
<location filename="../dock/scpdock.py" line="2834"/>
6967+
<location filename="../dock/scpdock.py" line="2837"/>
69686968
<source>Region growing</source>
69696969
<translation type="unfinished"></translation>
69706970
</message>

i18n/semiautomaticclassificationplugin.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5524,12 +5524,12 @@ Do you want to add the required fields to this shapefile?</source>
55245524
<translation type="unfinished"></translation>
55255525
</message>
55265526
<message>
5527-
<location filename="../core/utils.py" line="7477"/>
5527+
<location filename="../core/utils.py" line="7480"/>
55285528
<source>Build overviews</source>
55295529
<translation type="unfinished"></translation>
55305530
</message>
55315531
<message>
5532-
<location filename="../core/utils.py" line="7477"/>
5532+
<location filename="../core/utils.py" line="7480"/>
55335533
<source>Do you want to build the external overviews of bands?</source>
55345534
<translation type="unfinished"></translation>
55355535
</message>
@@ -6144,7 +6144,7 @@ Do you want to add the required fields to this shapefile?</source>
61446144
<translation type="unfinished"></translation>
61456145
</message>
61466146
<message>
6147-
<location filename="../core/utils.py" line="9583"/>
6147+
<location filename="../core/utils.py" line="9586"/>
61486148
<source>SCP: completed process</source>
61496149
<translation type="unfinished"></translation>
61506150
</message>
@@ -6554,27 +6554,27 @@ Do you want to add the required fields to this shapefile?</source>
65546554
<translation type="unfinished"></translation>
65556555
</message>
65566556
<message>
6557-
<location filename="../core/utils.py" line="6368"/>
6557+
<location filename="../core/utils.py" line="6371"/>
65586558
<source>Calculating signature</source>
65596559
<translation type="unfinished"></translation>
65606560
</message>
65616561
<message>
6562-
<location filename="../core/utils.py" line="7751"/>
6562+
<location filename="../core/utils.py" line="7754"/>
65636563
<source>Writing file</source>
65646564
<translation type="unfinished"></translation>
65656565
</message>
65666566
<message>
6567-
<location filename="../core/utils.py" line="5662"/>
6567+
<location filename="../core/utils.py" line="5665"/>
65686568
<source>Conversion to vector</source>
65696569
<translation type="unfinished"></translation>
65706570
</message>
65716571
<message>
6572-
<location filename="../core/utils.py" line="7426"/>
6572+
<location filename="../core/utils.py" line="7429"/>
65736573
<source>Sieve</source>
65746574
<translation type="unfinished"></translation>
65756575
</message>
65766576
<message>
6577-
<location filename="../core/utils.py" line="7556"/>
6577+
<location filename="../core/utils.py" line="7559"/>
65786578
<source>Building overviews</source>
65796579
<translation type="unfinished"></translation>
65806580
</message>
@@ -6614,12 +6614,12 @@ Do you want to add the required fields to this shapefile?</source>
66146614
<translation type="unfinished"></translation>
66156615
</message>
66166616
<message>
6617-
<location filename="../core/utils.py" line="9030"/>
6617+
<location filename="../core/utils.py" line="9033"/>
66186618
<source>Remove rows</source>
66196619
<translation type="unfinished"></translation>
66206620
</message>
66216621
<message>
6622-
<location filename="../core/utils.py" line="9030"/>
6622+
<location filename="../core/utils.py" line="9033"/>
66236623
<source>Are you sure you want to remove highlighted rows from the table?</source>
66246624
<translation type="unfinished"></translation>
66256625
</message>
@@ -6964,7 +6964,7 @@ Do you want to add the required fields to this shapefile?</source>
69646964
<translation type="unfinished"></translation>
69656965
</message>
69666966
<message>
6967-
<location filename="../dock/scpdock.py" line="2834"/>
6967+
<location filename="../dock/scpdock.py" line="2837"/>
69686968
<source>Region growing</source>
69696969
<translation type="unfinished"></translation>
69706970
</message>

i18n/semiautomaticclassificationplugin_ar.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5524,12 +5524,12 @@ Do you want to add the required fields to this shapefile?</source>
55245524
<translation type="unfinished"></translation>
55255525
</message>
55265526
<message>
5527-
<location filename="../core/utils.py" line="7477"/>
5527+
<location filename="../core/utils.py" line="7480"/>
55285528
<source>Build overviews</source>
55295529
<translation type="unfinished"></translation>
55305530
</message>
55315531
<message>
5532-
<location filename="../core/utils.py" line="7477"/>
5532+
<location filename="../core/utils.py" line="7480"/>
55335533
<source>Do you want to build the external overviews of bands?</source>
55345534
<translation type="unfinished"></translation>
55355535
</message>
@@ -6144,7 +6144,7 @@ Do you want to add the required fields to this shapefile?</source>
61446144
<translation type="unfinished"></translation>
61456145
</message>
61466146
<message>
6147-
<location filename="../core/utils.py" line="9583"/>
6147+
<location filename="../core/utils.py" line="9586"/>
61486148
<source>SCP: completed process</source>
61496149
<translation type="unfinished"></translation>
61506150
</message>
@@ -6554,27 +6554,27 @@ Do you want to add the required fields to this shapefile?</source>
65546554
<translation type="unfinished"></translation>
65556555
</message>
65566556
<message>
6557-
<location filename="../core/utils.py" line="6368"/>
6557+
<location filename="../core/utils.py" line="6371"/>
65586558
<source>Calculating signature</source>
65596559
<translation type="unfinished"></translation>
65606560
</message>
65616561
<message>
6562-
<location filename="../core/utils.py" line="7751"/>
6562+
<location filename="../core/utils.py" line="7754"/>
65636563
<source>Writing file</source>
65646564
<translation type="unfinished"></translation>
65656565
</message>
65666566
<message>
6567-
<location filename="../core/utils.py" line="5662"/>
6567+
<location filename="../core/utils.py" line="5665"/>
65686568
<source>Conversion to vector</source>
65696569
<translation type="unfinished"></translation>
65706570
</message>
65716571
<message>
6572-
<location filename="../core/utils.py" line="7426"/>
6572+
<location filename="../core/utils.py" line="7429"/>
65736573
<source>Sieve</source>
65746574
<translation type="unfinished"></translation>
65756575
</message>
65766576
<message>
6577-
<location filename="../core/utils.py" line="7556"/>
6577+
<location filename="../core/utils.py" line="7559"/>
65786578
<source>Building overviews</source>
65796579
<translation type="unfinished"></translation>
65806580
</message>
@@ -6614,12 +6614,12 @@ Do you want to add the required fields to this shapefile?</source>
66146614
<translation type="unfinished"></translation>
66156615
</message>
66166616
<message>
6617-
<location filename="../core/utils.py" line="9030"/>
6617+
<location filename="../core/utils.py" line="9033"/>
66186618
<source>Remove rows</source>
66196619
<translation type="unfinished"></translation>
66206620
</message>
66216621
<message>
6622-
<location filename="../core/utils.py" line="9030"/>
6622+
<location filename="../core/utils.py" line="9033"/>
66236623
<source>Are you sure you want to remove highlighted rows from the table?</source>
66246624
<translation type="unfinished"></translation>
66256625
</message>
@@ -6964,7 +6964,7 @@ Do you want to add the required fields to this shapefile?</source>
69646964
<translation type="unfinished"></translation>
69656965
</message>
69666966
<message>
6967-
<location filename="../dock/scpdock.py" line="2834"/>
6967+
<location filename="../dock/scpdock.py" line="2837"/>
69686968
<source>Region growing</source>
69696969
<translation type="unfinished"></translation>
69706970
</message>

i18n/semiautomaticclassificationplugin_de.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5524,12 +5524,12 @@ Do you want to add the required fields to this shapefile?</source>
55245524
<translation type="unfinished"></translation>
55255525
</message>
55265526
<message>
5527-
<location filename="../core/utils.py" line="7477"/>
5527+
<location filename="../core/utils.py" line="7480"/>
55285528
<source>Build overviews</source>
55295529
<translation type="unfinished"></translation>
55305530
</message>
55315531
<message>
5532-
<location filename="../core/utils.py" line="7477"/>
5532+
<location filename="../core/utils.py" line="7480"/>
55335533
<source>Do you want to build the external overviews of bands?</source>
55345534
<translation type="unfinished"></translation>
55355535
</message>
@@ -6144,7 +6144,7 @@ Do you want to add the required fields to this shapefile?</source>
61446144
<translation type="unfinished"></translation>
61456145
</message>
61466146
<message>
6147-
<location filename="../core/utils.py" line="9583"/>
6147+
<location filename="../core/utils.py" line="9586"/>
61486148
<source>SCP: completed process</source>
61496149
<translation type="unfinished"></translation>
61506150
</message>
@@ -6554,27 +6554,27 @@ Do you want to add the required fields to this shapefile?</source>
65546554
<translation type="unfinished"></translation>
65556555
</message>
65566556
<message>
6557-
<location filename="../core/utils.py" line="6368"/>
6557+
<location filename="../core/utils.py" line="6371"/>
65586558
<source>Calculating signature</source>
65596559
<translation type="unfinished"></translation>
65606560
</message>
65616561
<message>
6562-
<location filename="../core/utils.py" line="7751"/>
6562+
<location filename="../core/utils.py" line="7754"/>
65636563
<source>Writing file</source>
65646564
<translation type="unfinished"></translation>
65656565
</message>
65666566
<message>
6567-
<location filename="../core/utils.py" line="5662"/>
6567+
<location filename="../core/utils.py" line="5665"/>
65686568
<source>Conversion to vector</source>
65696569
<translation type="unfinished"></translation>
65706570
</message>
65716571
<message>
6572-
<location filename="../core/utils.py" line="7426"/>
6572+
<location filename="../core/utils.py" line="7429"/>
65736573
<source>Sieve</source>
65746574
<translation type="unfinished"></translation>
65756575
</message>
65766576
<message>
6577-
<location filename="../core/utils.py" line="7556"/>
6577+
<location filename="../core/utils.py" line="7559"/>
65786578
<source>Building overviews</source>
65796579
<translation type="unfinished"></translation>
65806580
</message>
@@ -6614,12 +6614,12 @@ Do you want to add the required fields to this shapefile?</source>
66146614
<translation type="unfinished"></translation>
66156615
</message>
66166616
<message>
6617-
<location filename="../core/utils.py" line="9030"/>
6617+
<location filename="../core/utils.py" line="9033"/>
66186618
<source>Remove rows</source>
66196619
<translation type="unfinished"></translation>
66206620
</message>
66216621
<message>
6622-
<location filename="../core/utils.py" line="9030"/>
6622+
<location filename="../core/utils.py" line="9033"/>
66236623
<source>Are you sure you want to remove highlighted rows from the table?</source>
66246624
<translation type="unfinished"></translation>
66256625
</message>
@@ -6964,7 +6964,7 @@ Do you want to add the required fields to this shapefile?</source>
69646964
<translation type="unfinished"></translation>
69656965
</message>
69666966
<message>
6967-
<location filename="../dock/scpdock.py" line="2834"/>
6967+
<location filename="../dock/scpdock.py" line="2837"/>
69686968
<source>Region growing</source>
69696969
<translation type="unfinished"></translation>
69706970
</message>

0 commit comments

Comments
 (0)