diff --git a/.gitignore b/.gitignore
new file mode 100755
index 0000000..9fe17bc
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,129 @@
+# Byte-compiled / optimized / DLL files
+__pycache__/
+*.py[cod]
+*$py.class
+
+# C extensions
+*.so
+
+# Distribution / packaging
+.Python
+build/
+develop-eggs/
+dist/
+downloads/
+eggs/
+.eggs/
+lib/
+lib64/
+parts/
+sdist/
+var/
+wheels/
+pip-wheel-metadata/
+share/python-wheels/
+*.egg-info/
+.installed.cfg
+*.egg
+MANIFEST
+
+# PyInstaller
+# Usually these files are written by a python script from a template
+# before PyInstaller builds the exe, so as to inject date/other infos into it.
+*.manifest
+*.spec
+
+# Installer logs
+pip-log.txt
+pip-delete-this-directory.txt
+
+# Unit test / coverage reports
+htmlcov/
+.tox/
+.nox/
+.coverage
+.coverage.*
+.cache
+nosetests.xml
+coverage.xml
+*.cover
+*.py,cover
+.hypothesis/
+.pytest_cache/
+
+# Translations
+*.mo
+*.pot
+
+# Django stuff:
+*.log
+local_settings.py
+db.sqlite3
+db.sqlite3-journal
+
+# Flask stuff:
+instance/
+.webassets-cache
+
+# Scrapy stuff:
+.scrapy
+
+# Sphinx documentation
+docs/_build/
+
+# PyBuilder
+target/
+
+# Jupyter Notebook
+.ipynb_checkpoints
+
+# IPython
+profile_default/
+ipython_config.py
+
+# pyenv
+.python-version
+
+# pipenv
+# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
+# However, in case of collaboration, if having platform-specific dependencies or dependencies
+# having no cross-platform support, pipenv may install dependencies that don't work, or not
+# install all needed dependencies.
+#Pipfile.lock
+
+# PEP 582; used by e.g. github.com/David-OConnor/pyflow
+__pypackages__/
+
+# Celery stuff
+celerybeat-schedule
+celerybeat.pid
+
+# SageMath parsed files
+*.sage.py
+
+# Environments
+.env
+.venv
+env/
+venv/
+ENV/
+env.bak/
+venv.bak/
+
+# Spyder project settings
+.spyderproject
+.spyproject
+
+# Rope project settings
+.ropeproject
+
+# mkdocs documentation
+/site
+
+# mypy
+.mypy_cache/
+.dmypy.json
+dmypy.json
+
+# Pyre type checker
+.pyre/
\ No newline at end of file
diff --git a/COPYING.txt b/COPYING
old mode 100644
new mode 100755
similarity index 99%
rename from COPYING.txt
rename to COPYING
index 94a9ed0..f288702
--- a/COPYING.txt
+++ b/COPYING
@@ -1,7 +1,7 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
- Copyright (C) 2007 Free Software Foundation, Inc. Open a file Select a multiband image Move highlighted band down Add bands loaded in QGIS Move highlighted band up Add OpenStreetMap to the map Add OpenStreetMap to the map (© OpenStreetMap contributors. The cartography is licensed as CC BY-SA. Tile Usage Policy) Set area in the map Lower right X Upper left X Lower right Y Upper left Y Show / hide area Find images Select a product Maximum cloud cover percentage Filter images Maximum number of results (images) Delete row Display preview of highlighted images in map Reset Export table to text file Import table from text file Filter If checked, remember user name and password locally in QGIS (WARNING: password is stored unencrypted) Password Login Harmonized Landsat Sentinel-2 (https://urs.earthdata.nasa.gov) User name Download Load images in QGIS after download Download images from list only if the corresponding previews are loaded in QGIS404
' in html:
- r = cfg.QNetworkRequestSCP(cfg.QtCoreSCP.QUrl(cfg.htmlW))
- cfg.reply2 = cfg.qgisCoreSCP.QgsNetworkAccessManager.instance().get(r)
- cfg.reply2.finished.connect(self.replyInTextBrowser2)
- if len(html) > 0:
- cfg.uidc.main_textBrowser.clear()
- cfg.uidc.main_textBrowser.setHtml(html)
- cfg.reply.finished.disconnect()
- cfg.reply.abort()
- cfg.reply.close()
- cfg.utls.logCondition(str(__name__) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode())
-
- # load reply in text browser
- def replyInTextBrowser2(self):
- cfg.reply2.deleteLater()
- html2 = cfg.reply2.readAll().data()
- html = bytes.decode(html2)
- if len(html) > 0:
- cfg.uidc.main_textBrowser.clear()
- cfg.uidc.main_textBrowser.setHtml(html)
- cfg.reply2.finished.disconnect()
- cfg.reply2.abort()
- cfg.reply2.close()
- cfg.utls.logCondition(str(__name__) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode())
-
- # reply Finish
- def replyFinish(self):
- cfg.replyP.deleteLater()
- cfg.fileP = cfg.replyP.readAll()
- cfg.utls.logCondition(str(__name__) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode())
-
- # replyText
- def replyText(self):
- cfg.replyP.deleteLater()
- cfg.htmlP = cfg.replyP.readAll()
- cfg.utls.logCondition(str(__name__) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode())
-
- # progress
- def downloadProgress(self, value, total):
- cfg.uiUtls.updateBar(self.progressP, '(' + str(value/1048576) + '/' + str(total/1048576) + ' MB) ' + self.urlP, cfg.QtWidgetsSCP.QApplication.translate('semiautomaticclassificationplugin', 'Downloading'))
- if cfg.actionCheck == 'No':
- cfg.replyP.finished.disconnect()
- cfg.replyP.abort()
- cfg.replyP.close()
-
- # reply redirect
- def replyRedirect(self):
- cfg.replyR.deleteLater()
- rA = cfg.replyR.attribute(cfg.QNetworkRequestSCP.RedirectionTargetAttribute)
- if rA is not None:
- cfg.replyRURL = rA.toString()
- cfg.utls.logCondition(str(__name__) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode())
-
- # reply redirect
- def replyRedirect2(self):
- cfg.replyR2.deleteLater()
- rA = cfg.replyR2.attribute(cfg.QNetworkRequestSCP.RedirectionTargetAttribute)
- if rA is not None:
- cfg.replyRURL2 = rA.toString()
- cfg.utls.logCondition(str(__name__) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode())
-
- # reply redirect
- def replyRedirect3(self):
- cfg.replyR3.deleteLater()
- rA = cfg.replyR3.attribute(cfg.QNetworkRequestSCP.RedirectionTargetAttribute)
- if rA is not None:
- cfg.replyRURL3 = rA.toString()
- cfg.utls.logCondition(str(__name__) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode())
-
- # connect with password QT
- def passwordConnect(self, user, password, url, topLevelUrl, outputPath = None, progress = None, quiet = 'No', redirect = 'No'):
- # logger
- cfg.utls.logCondition(str(__name__) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), ' ' + url)
- # auth
- base64UP = cfg.base64SCP.encodestring(bytes(user + ':' + password, 'utf-8')[:-1])
- h = bytes('Basic ', 'utf-8') + base64UP
- hKey = cfg.QtCoreSCP.QByteArray(bytes('Authorization', 'utf-8') )
- hValue = cfg.QtCoreSCP.QByteArray(h)
- r = cfg.QNetworkRequestSCP(cfg.QtCoreSCP.QUrl(url))
- r.setRawHeader(hKey, hValue)
- qnamI = cfg.qgisCoreSCP.QgsNetworkAccessManager.instance()
- if redirect != 'No':
- cfg.replyR = qnamI.get(r)
- cfg.replyR.finished.connect(self.replyRedirect)
- # loop
- eL = cfg.QtCoreSCP.QEventLoop()
- cfg.replyR.finished.connect(eL.quit)
- eL.exec_()
- cfg.replyR.finished.disconnect(eL.quit)
- cfg.replyR.finished.disconnect()
- cfg.replyR.abort()
- cfg.replyR.close()
- r2 = cfg.QNetworkRequestSCP(cfg.QtCoreSCP.QUrl(cfg.replyRURL))
- r2.setRawHeader(hKey, hValue)
- cfg.replyR2 = qnamI.get(r2)
- cfg.replyR2.finished.connect(self.replyRedirect2)
- # loop
- eL = cfg.QtCoreSCP.QEventLoop()
- cfg.replyR2.finished.connect(eL.quit)
- eL.exec_()
- cfg.replyR2.finished.disconnect(eL.quit)
- cfg.replyR2.finished.disconnect()
- cfg.replyR2.abort()
- cfg.replyR2.close()
- r3 = cfg.QNetworkRequestSCP(cfg.QtCoreSCP.QUrl(cfg.replyRURL2))
- r3.setRawHeader(hKey, hValue)
- cfg.replyR3 = qnamI.get(r3)
- cfg.replyR3.finished.connect(self.replyRedirect3)
- # loop
- eL = cfg.QtCoreSCP.QEventLoop()
- cfg.replyR3.finished.connect(eL.quit)
- eL.exec_()
- cfg.replyR3.finished.disconnect(eL.quit)
- cfg.replyR3.finished.disconnect()
- cfg.replyR3.abort()
- cfg.replyR3.close()
- try:
- if outputPath is None:
- cfg.replyP = qnamI.get(r)
- cfg.replyP.finished.connect(self.replyText)
- # loop
- eL = cfg.QtCoreSCP.QEventLoop()
- cfg.replyP.finished.connect(eL.quit)
- eL.exec_()
- cfg.replyP.finished.disconnect(eL.quit)
- cfg.replyP.finished.disconnect()
- cfg.replyP.abort()
- cfg.replyP.close()
- return cfg.htmlP
- else:
- self.urlP = url
- self.progressP = progress
- cfg.replyP = qnamI.get(r)
- cfg.replyP.finished.connect(self.replyFinish)
- cfg.replyP.downloadProgress.connect(self.downloadProgress)
- # loop
- eL = cfg.QtCoreSCP.QEventLoop()
- cfg.replyP.finished.connect(eL.quit)
- eL.exec_()
- cfg.replyP.finished.disconnect(eL.quit)
- cfg.replyP.finished.disconnect()
- cfg.replyP.abort()
- cfg.replyP.close()
- with open(outputPath, 'wb') as file:
- file.write(cfg.fileP)
- if cfg.actionCheck == 'No':
- raise ValueError('Cancel action')
- if cfg.osSCP.path.getsize(outputPath) > 500:
- cfg.fileP = None
- return 'Yes'
- else:
- if 'problem' in cfg.fileP:
- cfg.fileP = None
- return 'No'
- else:
- cfg.fileP = None
- return 'Yes'
- except Exception as err:
- if str(err) != 'Cancel action':
- if quiet == 'No':
- if 'ssl' in str(err):
- cfg.mx.msgErr56()
- else:
- cfg.mx.msgErr50(str(err))
- # logger
- cfg.utls.logCondition(str(__name__) + '-' + (cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), ' ERROR exception: ' + str(err))
- return 'No'
-
- # get password opener
- def getPasswordHandler(self, user, password, topLevelUrl):
- pswMng = cfg.urllibSCP.request.HTTPPasswordMgrWithDefaultRealm()
- pswMng.add_password(None, topLevelUrl, user, password)
- passwordHandler = cfg.urllibSCP.request.HTTPBasicAuthHandler(pswMng)
- cfg.utls.logCondition(str(__name__) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode())
- return passwordHandler
-
- # connect with password Python
- def passwordConnectPython(self, user, password, url, topLevelUrl, outputPath = None, progress = None, quiet = 'No'):
- # logger
- cfg.utls.logCondition(str(__name__) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), ' ' + url)
- proxyHandler = cfg.utls.getProxyHandler()
- passwordHandler = cfg.utls.getPasswordHandler(user, password, topLevelUrl)
- cookieHandler = cfg.urllibSCP.request.HTTPCookieProcessor()
- if proxyHandler is None:
- if len(user) > 0:
- opener = cfg.urllibSCP.request.build_opener(cookieHandler, passwordHandler)
- else:
- opener = cfg.urllibSCP.request.build_opener(cookieHandler)
- else:
- if len(user) > 0:
- opener = cfg.urllibSCP.request.build_opener(proxyHandler, cookieHandler, passwordHandler)
- else:
- opener = cfg.urllibSCP.request.build_opener(proxyHandler, cookieHandler)
- cfg.urllibSCP.request.install_opener(opener)
- try:
- if outputPath is None:
- response = opener.open(url)
- return response
- else:
- f = cfg.urllibSCP.request.urlopen(url)
- total_size = int(f.headers['Content-Length'])
- MB_size = round(total_size/1048576, 2)
- block_size = 1024 * 1024
- ratio = 0
- tune = 'Yes'
- with open(outputPath, 'wb') as file:
- while True:
- if tune == 'Yes':
- start = cfg.datetimeSCP.datetime.now()
- block = f.read(block_size)
- dSize = round(int(cfg.osSCP.stat(outputPath).st_size)/1048576, 2)
- cfg.uiUtls.updateBar(progress, '(' + str(dSize) + '/' + str(MB_size) + ' MB) ' + url, cfg.QtWidgetsSCP.QApplication.translate('semiautomaticclassificationplugin', 'Downloading'))
- cfg.QtWidgetsSCP.qApp.processEvents()
- if not block:
- break
- file.write(block)
- if tune == 'Yes':
- end = cfg.datetimeSCP.datetime.now()
- delta = end - start
- newRatio = block_size / delta.microseconds
- if newRatio > ratio:
- block_size = block_size + 1024 * 1024
- elif newRatio < ratio:
- block_size = block_size - 1024 * 1024
- tune = 'No'
- ratio = newRatio
- if cfg.actionCheck == 'No':
- raise ValueError('Cancel action')
- return 'Yes'
- except Exception as err:
- # logger
- cfg.utls.logCondition(str(__name__) + '-' + (cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), ' ERROR exception: ' + str(err))
- if str(err) != 'Cancel action':
- if quiet == 'No':
- if 'ssl' in str(err):
- cfg.mx.msgErr56()
- elif 'Navigation failed' in str(err) or 'Internal Server Error' in str(err):
- return 'Internal Server Error'
- else:
- cfg.mx.msgErr50(str(err))
- return 'No'
-
- # get proxy opener
- def getProxyHandler(self):
- cfg.utls.getQGISProxySettings()
- if str(cfg.proxyEnabled) == 'true' and len(cfg.proxyHost) > 0:
- if len(cfg.proxyUser) > 0:
- proxyHandler = cfg.urllibSCP.ProxyHandler({'http': 'http://'+ cfg.proxyUser + ':' + cfg.proxyPassword + '@' + cfg.proxyHost + ':' + cfg.proxyPort})
- else:
- proxyHandler = cfg.urllibSCP.ProxyHandler({'http': 'http://' + cfg.proxyHost + ':' + cfg.proxyPort})
- else:
- proxyHandler = None
- cfg.utls.logCondition(str(__name__) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode())
- return proxyHandler
-
- # connect to USGS
- def generalOpener(self):
- cfg.utls.logCondition(str(__name__) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode())
- proxyHandler = cfg.utls.getProxyHandler()
- cfg.cookieJ = cfg.CookieJarSCP()
- if proxyHandler is None:
- cfg.openerGeneral = cfg.urllibSCP.request.build_opener(cfg.urllibSCP.request.HTTPCookieProcessor(cfg.cookieJ))
- else:
- cfg.openerGeneral = cfg.urllibSCP.request.build_opener(proxyHandler, cfg.urllibSCP.request.HTTPCookieProcessor(cfg.cookieJ))
-
- # NASA search
- def NASASearch(self, url):
- # logger
- cfg.utls.logCondition(str(__name__) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), ' url:' + str(url))
- cfg.utls.generalOpener()
- request1 = cfg.urllibSCP.request.Request(url)
- try:
- response1 = cfg.openerGeneral.open(request1)
- except Exception as err:
- cfg.urllibSCP.request.install_opener(cfg.openerGeneral)
- # certificate error
- newContext = cfg.sslSCP.SSLContext(cfg.sslSCP.PROTOCOL_TLSv1_2)
- response1 = cfg.urllibSCP.request.urlopen(request1, context=newContext)
- # logger
- cfg.utls.logCondition(str(__name__) + '-' + (cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), ' ERROR exception: ' + str(err))
- cfg.utls.logCondition(str(__name__) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode())
- return response1
-
- # download file
- def downloadFile(self, url, outputPath, fileName = None, progress = None):
- try:
- cfg.utls.logCondition(str(__name__) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), ' url:' + str(url))
- proxyHandler = cfg.utls.getProxyHandler()
- if proxyHandler is not None:
- opener = cfg.urllibSCP.request.build_opener(proxyHandler)
- cfg.urllibSCP.request.install_opener(opener)
- else:
- opener = cfg.urllibSCP.request.build_opener()
- f = cfg.urllibSCP.request.urlopen(url)
- try:
- total_size = int(f.headers['Content-Length'])
- MB_size = round(total_size/1048576, 2)
- except:
- total_size = 1
- block_size = 1024 * 1024
- ratio = 0
- tune = 'Yes'
- if block_size >= total_size:
- response = f.read()
- l = open(outputPath, 'wb')
- l.write(response)
- l.close()
- else:
- with open(outputPath, 'wb') as file:
- while True:
- if tune == 'Yes':
- start = cfg.datetimeSCP.datetime.now()
- block = f.read(block_size)
- dSize = round(int(cfg.osSCP.stat(outputPath).st_size)/1048576, 2)
- cfg.uiUtls.updateBar(progress, '(' + str(dSize) + '/' + str(MB_size) + ' MB) ' + url, cfg.QtWidgetsSCP.QApplication.translate('semiautomaticclassificationplugin', 'Downloading'))
- cfg.QtWidgetsSCP.qApp.processEvents()
- if not block:
- break
- file.write(block)
- if tune == 'Yes':
- end = cfg.datetimeSCP.datetime.now()
- delta = end - start
- newRatio = block_size / delta.microseconds
- if newRatio > ratio:
- block_size = block_size + 1024 * 1024
- elif newRatio < ratio:
- block_size = block_size - 1024 * 1024
- tune = 'No'
- ratio = newRatio
- if cfg.actionCheck == 'No':
- raise ValueError('Cancel action')
- return 'Yes'
- except Exception as err:
- # logger
- cfg.utls.logCondition(str(__name__) + '-' + (cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), ' ERROR exception: ' + str(err) + ' url:' + str(url))
- return err
-
- # download virtual images
- def downloadVirtualImages(self, url, outputPath, fileName = None, progress = None, extentList = None):
- try:
- cfg.utls.logCondition(str(__name__) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), ' url:' + str(url))
- cfg.uiUtls.updateBar(progress, url, cfg.QtWidgetsSCP.QApplication.translate('semiautomaticclassificationplugin', 'Downloading'))
- cfg.QtWidgetsSCP.qApp.processEvents()
- output = cfg.utls.createVirtualRaster3(['/vsicurl/' + url], outputPath, None, 'Yes', 0, 'No', extentList)
- return 'Yes'
- except Exception as err:
- # logger
- cfg.utls.logCondition(str(__name__) + '-' + (cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), ' ERROR exception: ' + str(err) + ' url:' + str(url))
- return err
-
- # connect with password
- def USGSLogin(self, user, password, topLevelUrl):
- cfg.utls.logCondition(str(__name__) + "-" + str(cfg.inspectSCP.stack()[0][3])+ " " + cfg.utls.lineOfCode())
- if len(user) > 0:
- cfg.utls.generalOpener()
- request1 = cfg.urllibSCP.request.Request(topLevelUrl)
- response1 = cfg.openerGeneral.open(request1)
- html1 = response1.read()
- # required token
- tok = cfg.reSCP.findall('', str(html1))
- tid = tok[0].replace('"', '').replace(' ', '')
- # login
- params = cfg.urllibSCP.parse.urlencode({'username': user, 'password': password, 'csrf_token': tid})
- params2 = params.encode()
- request2 = cfg.urllibSCP.request.Request('https://ers.cr.usgs.gov/login', params2)
- response2 = cfg.openerGeneral.open(request2)
- for cookie in cfg.cookieJ:
- if cookie.name == "EROS_SSO_production":
- cookievalue = cookie.value
- try:
- cfg.openerGeneral.addheaders = [('Cookie', 'EROS_SSO_production=' + cookievalue)]
- return cookievalue
- except Exception as err:
- # logger
- cfg.utls.logCondition(str(__name__) + '-' + (cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), ' ERROR exception: ' + str(err))
- raise ValueError('Login error')
-
- # download file
- def downloadFileUSGS(self, user, password, topLevelUrl, url, outputPath, fileName = None, progress = None, quiet = 'No'):
- cfg.utls.logCondition(str(__name__) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), ' url:' + str(url))
- cookievalue = cfg.utls.USGSLogin(user, password, topLevelUrl)
- cfg.urllibSCP.request.install_opener(cfg.openerGeneral)
- cfg.timeSCP.sleep(0.5)
- try:
- request1 = cfg.urllibSCP.request.Request(url)
- response1 = cfg.openerGeneral.open(request1)
- cfg.timeSCP.sleep(0.5)
- f = cfg.urllibSCP.request.urlopen(response1.url)
- total_size = int(f.headers['Content-Length'])
- MB_size = round(total_size/1048576, 2)
- block_size = 1024 * 1024
- ratio = 0
- tune = 'Yes'
- with open(outputPath, 'wb') as file:
- while True:
- if tune == 'Yes':
- start = cfg.datetimeSCP.datetime.now()
- block = f.read(block_size)
- dSize = round(int(cfg.osSCP.stat(outputPath).st_size)/1048576, 2)
- cfg.uiUtls.updateBar(progress, '(' + str(dSize) + '/' + str(MB_size) + ' MB) ' + url, cfg.QtWidgetsSCP.QApplication.translate('semiautomaticclassificationplugin', 'Downloading'))
- cfg.QtWidgetsSCP.qApp.processEvents()
- if not block:
- break
- file.write(block)
- if tune == 'Yes':
- end = cfg.datetimeSCP.datetime.now()
- delta = end - start
- newRatio = block_size / delta.microseconds
- if newRatio > ratio:
- block_size = block_size + 1024 * 1024
- elif newRatio < ratio:
- block_size = block_size - 1024 * 1024
- tune = 'No'
- ratio = newRatio
- if cfg.actionCheck == 'No':
- raise ValueError('Cancel action')
- cfg.utls.logCondition(str(__name__) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode())
- return 'Yes'
- except Exception as err:
- if str(err) != 'Cancel action':
- if quiet == 'No':
- cfg.mx.msgErr50(str(err))
- # logger
- cfg.utls.logCondition(str(__name__) + "-" + (cfg.inspectSCP.stack()[0][3])+ " " + cfg.utls.lineOfCode(), " ERROR exception: " + str(err) + " url:" + str(url))
- raise ValueError(str(err))
-
- # encrypt password
- def encryptPassword(self, password):
- e = cfg.base64SCP.b64encode(bytes(password, 'utf-8'))
- return str(e)
-
- # decrypt password
- def decryptPassword(self, password):
- if password is not None:
- d = cfg.base64SCP.b64decode(password)
- return d
- else:
- return ''
-
-##################################
- ''' LOG functions '''
-##################################
-
- # Clear log file
- def clearLogFile(self):
- if cfg.osSCP.path.isfile(cfg.logFile):
- try:
- l = open(cfg.logFile, 'w')
- except:
- pass
- try:
- # logger
- cfg.utls.logToFile(str(__name__) + "-" + str(cfg.inspectSCP.stack()[0][3])+ " " + cfg.utls.lineOfCode(), "LOG ACTIVE" + cfg.sysSCPInfo)
- cfg.ui.log_tableWidget.clearContents()
- for i in range(0, cfg.ui.log_tableWidget.rowCount()):
- cfg.ui.log_tableWidget.removeRow(0)
- except:
- cfg.mx.msg2()
-
- # Get the code line number for log file
- def lineOfCode(self):
- return str(cfg.inspectSCP.currentframe().f_back.f_lineno)
-
- # logger condition
- def logCondition(self, function, message = ""):
- if cfg.logSetVal == 'Yes':
- cfg.utls.logToFile(function, message)
-
- # Logger of function
- def logToFile(self, function, message):
- # message string
- m = cfg.datetimeSCP.datetime.now().strftime("%Y-%m-%d %H.%M.%S.%f") + " " + function + " " + message + "\n"
- if cfg.osSCP.path.isfile(cfg.logFile):
- try:
- l = open(cfg.logFile, 'a')
- except:
- pass
- else:
- l = open(cfg.logFile, 'w')
- try:
- l.write("Date Function Message \n")
- l.write(m)
- l.close()
- except:
- pass
- try:
- l.write(m)
- l.close()
- # log table
- mT = m.split("\t")
- tW = cfg.ui.log_tableWidget
- c = tW.rowCount()
- # add list items to table
- tW.setRowCount(c + 1)
- if "ERROR exception" in mT[2]:
- cfg.utls.addTableItem(tW, mT[0], c, 0, 'No', cfg.QtGuiSCP.QColor(254, 137, 137))
- cfg.utls.addTableItem(tW, mT[1], c, 1, 'No', cfg.QtGuiSCP.QColor(254, 137, 137))
- cfg.utls.addTableItem(tW, mT[2], c, 2, 'No', cfg.QtGuiSCP.QColor(254, 137, 137))
- elif "error" in mT[2].lower():
- cfg.utls.addTableItem(tW, mT[0], c, 0, 'No', cfg.QtGuiSCP.QColor(30, 200, 200))
- cfg.utls.addTableItem(tW, mT[1], c, 1, 'No', cfg.QtGuiSCP.QColor(30, 200, 200))
- cfg.utls.addTableItem(tW, mT[2], c, 2, 'No', cfg.QtGuiSCP.QColor(30, 200, 200))
- else:
- cfg.utls.addTableItem(tW, mT[0], c, 0, 'No')
- cfg.utls.addTableItem(tW, mT[1], c, 1, 'No')
- cfg.utls.addTableItem(tW, mT[2], c, 2, 'No')
- cfg.ui.log_tableWidget.scrollToBottom()
- except:
- pass
-
-##################################
- ''' Time functions '''
-##################################
-
- # get time
- def getTime(self):
- t = cfg.datetimeSCP.datetime.now().strftime("%Y%m%d_%H%M%S%f")
- return t
-
- # convert seconds to H M S
- def timeToHMS(self, time):
- min, sec = divmod(time, 60)
- hour, min = divmod(min, 60)
- if hour > 0:
- m = str("%.f" % round(hour)) + " H " + str("%.f" % round(min)) + " min"
- else:
- m = str("%.f" % round(min)) + " min " + str("%.f" % round(sec)) + " sec"
- return m
-
-##################################
- ''' Symbology functions '''
-##################################
-
- # set layer color for ROIs
- def ROISymbol(self, layer):
- st = { 'color': '0,0,0,230', 'color_border': '255,255,255,230', 'style': 'solid', 'style_border': 'dash' }
- r = cfg.qgisCoreSCP.QgsFillSymbol.createSimple(st)
- renderer = layer.renderer()
- renderer.setSymbol(r)
-
- # Define vector symbology
- def vectorSymbol(self, layer, signatureList, macroclassCheck):
- c = []
- n = []
- # class count
- mc = []
- v = signatureList
- s = cfg.qgisCoreSCP.QgsSymbol.defaultSymbol(layer.geometryType())
- s.setColor(cfg.QtGuiSCP.QColor('#000000'))
- c.append(cfg.qgisCoreSCP.QgsRendererCategory(0, s, '0 - ' + cfg.uncls))
- for i in range(0, len(v)):
- if macroclassCheck == 'Yes':
- if int(v[i][0]) not in mc:
- mc.append(int(v[i][0]))
- n.append([int(v[i][0]), cfg.QtGuiSCP.QColor(v[i][6]), str(v[i][1])])
- else:
- n.append([int(v[i][2]), v[i][6], str(v[i][3])])
- for b in sorted(n, key=lambda c: c[0]):
- s = cfg.qgisCoreSCP.QgsSymbol.defaultSymbol(layer.geometryType())
- s.setColor(b[1])
- ca = cfg.qgisCoreSCP.QgsRendererCategory(b[0], s, str(b[0]) + ' - ' + b[2])
- c.append(ca)
- f = 'DN'
- r = cfg.qgisCoreSCP.QgsCategorizedSymbolRenderer(f, c)
- layer.setRenderer(r)
- # logger
- cfg.utls.logCondition(str(__name__) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode())
-
- # Define class symbology
- def rasterSymbol(self, classLayer, signatureList, macroclassCheck):
- # The band of classLayer
- cLB = 1
- # Color list for ramp
- cL = []
- n = []
- # class count
- mc = []
- v = signatureList
- if cfg.unclassValue is not None:
- cL.append(cfg.qgisCoreSCP.QgsPalettedRasterRenderer.Class(cfg.unclassValue, cfg.QtGuiSCP.QColor("#4d4d4d"), cfg.overlap))
- cL.append(cfg.qgisCoreSCP.QgsPalettedRasterRenderer.Class(0, cfg.QtGuiSCP.QColor("#000000"), "0 - " + cfg.uncls))
- for i in range(0, len(v)):
- if macroclassCheck == 'Yes':
- if int(v[i][0]) not in mc and int(v[i][0]) != 0:
- mc.append(int(v[i][0]))
- n.append([int(v[i][0]), cfg.QtGuiSCP.QColor(v[i][6]), str(v[i][1])])
- else:
- if int(v[i][2]) != 0:
- n.append([int(v[i][2]), v[i][6], str(v[i][3])])
- for b in sorted(n, key=lambda c: c[0]):
- cL.append(cfg.qgisCoreSCP.QgsPalettedRasterRenderer.Class(b[0], b[1], str(b[0]) + " - " + b[2]))
- # Create the renderer
- lR = cfg.qgisCoreSCP.QgsPalettedRasterRenderer(classLayer.dataProvider(), cLB, cL)
- # Apply the renderer to classLayer
- classLayer.setRenderer(lR)
- # refresh legend
- if hasattr(classLayer, "setCacheImage"):
- classLayer.setCacheImage(None)
- classLayer.triggerRepaint()
- cfg.utls.refreshLayerSymbology(classLayer)
- ql = cfg.utls.layerSource(classLayer)
- # logger
- cfg.utls.logCondition(str(__name__) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), "" + str(ql))
-
- # Define class symbology
- def rasterSymbolLCSAlgorithmRaster(self, classLayer):
- # The band of classLayer
- cLB = 1
- # Color list for ramp
- cL = []
- if cfg.unclassValue is not None:
- cL.append(cfg.qgisCoreSCP.QgsPalettedRasterRenderer.Class(cfg.unclassValue, cfg.QtGuiSCP.QColor("#4d4d4d"), cfg.overlap))
- cL.append(cfg.qgisCoreSCP.QgsPalettedRasterRenderer.Class(0, cfg.QtGuiSCP.QColor("#000000"), "0 " + cfg.uncls))
- cL.append(cfg.qgisCoreSCP.QgsPalettedRasterRenderer.Class(1, cfg.QtGuiSCP.QColor("#ffffff"), "1 " + cfg.clasfd))
- # Create the renderer
- lR = cfg.qgisCoreSCP.QgsPalettedRasterRenderer(classLayer.dataProvider(), cLB, cL)
- # Apply the renderer to classLayer
- classLayer.setRenderer(lR)
- # refresh legend
- if hasattr(classLayer, "setCacheImage"):
- classLayer.setCacheImage(None)
- classLayer.triggerRepaint()
- cfg.utls.refreshLayerSymbology(classLayer)
- ql = cfg.utls.layerSource(classLayer)
- # logger
- cfg.utls.logCondition(str(__name__) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), "" + str(ql))
-
- # Define class symbology
- def rasterPreviewSymbol(self, previewLayer, algorithmName):
- if cfg.ui.LC_signature_checkBox.isChecked():
- cfg.utls.rasterSymbolLCSAlgorithmRaster(previewLayer)
- elif algorithmName == cfg.algMinDist or algorithmName == cfg.algSAM:
- cfg.utls.rasterSymbolPseudoColor(previewLayer)
- elif algorithmName == cfg.algML:
- cfg.utls.rasterSymbolSingleBandGray(previewLayer)
-
- # Define class symbology pseudo color
- def rasterSymbolPseudoColor(self, layer):
- # Band statistics
- bndStat = layer.dataProvider().bandStatistics(1)
- max = bndStat.maximumValue
- min = bndStat.minimumValue
- # The band of layer
- cLB = 1
- # Color list for ramp
- cL = []
- colorMin = cfg.QtGuiSCP.QColor("#ffffff")
- colorMax = cfg.QtGuiSCP.QColor("#000000")
- cL.append(cfg.qgisCoreSCP.QgsColorRampShader.ColorRampItem(min, colorMin, str(min)))
- cL.append(cfg.qgisCoreSCP.QgsColorRampShader.ColorRampItem(max, colorMax, str(max)))
- # Create the shader
- lS = cfg.qgisCoreSCP.QgsRasterShader()
- # Create the color ramp function
- cR = cfg.qgisCoreSCP.QgsColorRampShader()
- cR.setColorRampType(cfg.qgisCoreSCP.QgsColorRampShader.Interpolated)
- cR.setColorRampItemList(cL)
- # Set the raster shader function
- lS.setRasterShaderFunction(cR)
- # Create the renderer
- lR = cfg.qgisCoreSCP.QgsSingleBandPseudoColorRenderer(layer.dataProvider(), cLB, lS)
- # Apply the renderer to layer
- layer.setRenderer(lR)
- # refresh legend
- if hasattr(layer, "setCacheImage"):
- layer.setCacheImage(None)
- layer.triggerRepaint()
- cfg.utls.refreshLayerSymbology(layer)
- ql = cfg.utls.layerSource(layer)
- # logger
- cfg.utls.logCondition(str(__name__) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), "" + str(ql))
-
- # Define class symbology single band grey
- def rasterSymbolSingleBandGray(self, layer):
- # QGIS3
- #layer.setDrawingStyle("SingleBandGray")
- try:
- layer.setContrastEnhancement(cfg.qgisCoreSCP.QgsContrastEnhancement.StretchToMinimumMaximum, cfg.qgisCoreSCP.QgsRasterMinMaxOrigin.CumulativeCut)
- # refresh legend
- if hasattr(layer, "setCacheImage"):
- layer.setCacheImage(None)
- layer.triggerRepaint()
- cfg.utls.refreshLayerSymbology(layer)
- ql = cfg.utls.layerSource(layer)
- # logger
- cfg.utls.logCondition(str(__name__) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), "" + str(ql))
- except Exception as err:
- list = 'No'
- # logger
- cfg.utls.logCondition(str(__name__) + '-' + (cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), ' ERROR exception: ' + str(err))
-
- # Define raster symbology
- def rasterSymbolGeneric(self, rasterLayer, zeroValue = 'Unchanged', rasterUniqueValueList = None):
- if rasterUniqueValueList is None:
- ql = cfg.utls.layerSource(rasterLayer)
- cfg.parallelArrayDict = {}
- o = cfg.utls.multiProcessRaster(rasterPath = ql, functionBand = 'No', functionRaster = cfg.utls.rasterUniqueValuesWithSum, progressMessage = 'UniqueVal ', deleteArray = 'No')
- # calculate unique values
- values = cfg.np.array([])
- for x in sorted(cfg.parallelArrayDict):
- try:
- for ar in cfg.parallelArrayDict[x]:
- values = cfg.np.append(values, ar[0][0, ::])
- except:
- pass
- rasterBandUniqueVal = cfg.np.unique(values).tolist()
- refRasterBandUniqueVal = sorted(rasterBandUniqueVal)
- else:
- refRasterBandUniqueVal = rasterUniqueValueList
- try:
- maxV = max(refRasterBandUniqueVal)
- except:
- maxV = 1
- # Color list for ramp
- cL = [ cfg.qgisCoreSCP.QgsPalettedRasterRenderer.Class(0, cfg.QtGuiSCP.QColor(0,0,0), zeroValue)]
- for i in refRasterBandUniqueVal:
- if i > maxV/2:
- c = cfg.QtGuiSCP.QColor(int(255 * (i/maxV)),int(255 * (1- (i/maxV))),int(255 * (1 - (i/maxV))))
- cL.append(cfg.qgisCoreSCP.QgsPalettedRasterRenderer.Class(i, c, str(i)))
- elif i > 0:
- c = cfg.QtGuiSCP.QColor(int(255 * (i/maxV)),int(255 * (i/maxV)),int(255 * (1 - (i/maxV))))
- cL.append(cfg.qgisCoreSCP.QgsPalettedRasterRenderer.Class(i, c, str(i)))
- # The band of classLayer
- classLyrBnd = 1
- # Create the renderer
- try:
- lyrRndr = cfg.qgisCoreSCP.QgsPalettedRasterRenderer(rasterLayer.dataProvider(), classLyrBnd, cL)
- except Exception as err:
- # logger
- cfg.utls.logCondition(str(__name__) + '-' + (cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), ' ERROR exception: ' + str(err))
- return 'No'
- # Apply the renderer to rasterLayer
- rasterLayer.setRenderer(lyrRndr)
- # refresh legend
- if hasattr(rasterLayer, 'setCacheImage'):
- rasterLayer.setCacheImage(None)
- rasterLayer.triggerRepaint()
- cfg.utls.refreshLayerSymbology(rasterLayer)
- # logger
- cfg.utls.logCondition(str(__name__) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), 'symbology')
-
- # Define scatter raster symbology
- def rasterScatterSymbol(self, valueColorList):
- # Color list for ramp
- cL = []
- for i in valueColorList:
- cL.append(cfg.qgisCoreSCP.QgsPalettedRasterRenderer.Class(i[0], cfg.QtGuiSCP.QColor(i[1]), str(i[0])))
- return cL
-
- # set scatter raster symbology
- def setRasterScatterSymbol(self, classLayer, shader):
- # The band of classLayer
- cLB = 1
- # Create the renderer
- lR = cfg.qgisCoreSCP.QgsPalettedRasterRenderer(classLayer.dataProvider(), cLB, shader)
- # Apply the renderer to classLayer
- classLayer.setRenderer(lR)
- # refresh legend
- if hasattr(classLayer, "setCacheImage"):
- classLayer.setCacheImage(None)
- classLayer.triggerRepaint()
- cfg.utls.refreshLayerSymbology(classLayer)
- ql = cfg.utls.layerSource(classLayer)
- # logger
- cfg.utls.logCondition(str(__name__) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), "" + str(ql))
-
- # copy renderer
- def copyRenderer(self, inputRaster, outputRaster):
- try:
- r = inputRaster.renderer().clone()
- # Apply the renderer to rasterLayer
- outputRaster.setRenderer(r)
- outputRaster.triggerRepaint()
- cfg.utls.refreshLayerSymbology(outputRaster)
- # logger
- cfg.utls.logCondition(str(__name__) + "-" + str(cfg.inspectSCP.stack()[0][3])+ " " + cfg.utls.lineOfCode())
- except Exception as err:
- list = 'No'
- # logger
- cfg.utls.logCondition(str(__name__) + '-' + (cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), ' ERROR exception: ' + str(err))
-
-##################################
- ''' Classification functions '''
-##################################
-
- # calculate covariance matrix from array list
- def calculateCovMatrix(self, arrayList):
- matrix = cfg.np.stack(arrayList)
- # covariance matrix (degree of freedom = 1 for unbiased estimate)
- CovMatrix = cfg.np.ma.cov(cfg.np.ma.masked_invalid(matrix), ddof=1)
- try:
- try:
- inv = cfg.np.linalg.inv(CovMatrix)
- if cfg.np.isnan(inv[0,0]):
- CovMatrix = 'No'
- except:
- cfg.utls.logCondition(str(__name__) + '-' + (cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), 'TEST matrix: ' + str(CovMatrix))
- CovMatrix = 'No'
- except Exception as err:
- CovMatrix = 'No'
- # logger
- cfg.utls.logCondition(str(__name__) + '-' + (cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), ' ERROR exception: ' + str(err))
- # logger
- cfg.utls.logCondition(str(__name__) + '-' + (cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), 'cov matrix: ' + str(CovMatrix))
- return CovMatrix
-
- # convert list to covariance array
- def listToCovarianceMatrix(self, list):
- try:
- covMat = cfg.np.zeros((len(list), len(list)), dtype=cfg.np.float32)
- i = 0
- for x in list:
- covMat[i, :] = x
- i = i + 1
- return covMat
- except Exception as err:
- list = 'No'
- # logger
- cfg.utls.logCondition(str(__name__) + '-' + (cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), ' ERROR exception: ' + str(err))
- return 'No'
-
- # convert covariance array to list
- def covarianceMatrixToList(self, covarianceArray):
- try:
- d = covarianceArray.shape
- list = []
- for i in range(0, d[0]):
- list.append(covarianceArray[i, :].tolist())
- except Exception as err:
- list = 'No'
- # logger
- cfg.utls.logCondition(str(__name__) + '-' + (cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), ' ERROR exception: ' + str(err))
- return list
-
- # create one raster for each signature class
- def createSignatureClassRaster(self, signatureList, gdalRasterRef, outputDirectory, nodataValue = None, outputName = None, previewSize = 0, previewPoint = None, compress = 'No', compressFormat = 'DEFLATE21'):
- dT = cfg.utls.getTime()
- outputRasterList = []
- for s in range(0, len(signatureList)):
- if outputName is None:
- o = outputDirectory + '/' + cfg.sigRasterNm + '_' + str(signatureList[s][0]) + '_' + str(signatureList[s][2]) + '_' + dT + '.tif'
- else:
- o = outputDirectory + '/' + outputName + '_' + str(signatureList[s][0]) + '_' + str(signatureList[s][2]) + '.tif'
- outputRasterList.append(o)
- oRL = cfg.utls.createRasterFromReference(gdalRasterRef, 1, outputRasterList, nodataValue, 'GTiff', cfg.rasterDataType, previewSize, previewPoint, compress, compressFormat)
- # logger
- cfg.utls.logToFile(str(__name__) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), 'end createSignatureClassRaster')
- return oRL, outputRasterList
-
- # perform classification
- def classificationMultiprocess(self, bandListNumber, signatureList, algorithmName, rasterArray, landCoverSignature, LCSClassAlgorithm,LCSLeaveUnclassified, algBandWeigths, outputGdalRasterList, outputAlgorithmRaster, outputClassificationRaster, nodataValue, macroclassCheck, algThrshld, nodataMask):
- sigArrayList = self.createArrayFromSignature(bandListNumber, signatureList)
- # logger
- cfg.utls.logToFile(str(__name__) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), 'sigArrayList ' + str(sigArrayList))
- cfg.utls.logToFile(str(__name__) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), 'outputGdalRasterList ' + str(outputGdalRasterList))
- LCSminMaxL = cfg.utls.LCSminMaxList(signatureList)
- minArray = None
- maxArray = None
- classArray = None
- classArrayAlg = None
- classArrayLCS = None
- equalArray = None
- cfg.unclassValue = None
- cfg.algThrshld = algThrshld
- n = 0
- # max and min values
- tr = self.thresholdList(signatureList)
- # if maximum likelihood
- covMatrList = self.covarianceMatrixList(signatureList)
- # open input with GDAL
- rDC = cfg.gdalSCP.Open(outputClassificationRaster, cfg.gdalSCP.GA_Update)
- rDA = cfg.gdalSCP.Open(outputAlgorithmRaster, cfg.gdalSCP.GA_Update)
- if landCoverSignature == 'Yes':
- cfg.utls.logToFile(str(__name__) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), 'landCoverSignature ' + str(landCoverSignature))
- for s in sigArrayList:
- # algorithm
- rasterArrayx = cfg.np.copy(rasterArray)
- # threshold
- multFactor = float(1)
- # second classification
- if LCSClassAlgorithm == 'Yes':
- secondClassification = algorithmName
- else:
- secondClassification = 'No'
- if secondClassification == 'No':
- dataValue = -100
- cfg.unclassValue = -1000
- elif secondClassification == cfg.algMinDist:
- dataValue = -100
- cfg.unclassValue = -1000
- elif secondClassification == cfg.algSAM:
- dataValue = -100
- cfg.unclassValue = -1000
- elif secondClassification == cfg.algML:
- dataValue = cfg.maxValDt
- cfg.unclassValue = -1000
- # logger
- cfg.utls.logToFile(str(__name__) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), 'algBandWeigths' + str(algBandWeigths))
- # calculate LCS array
- LCSarray = cfg.utls.algorithmLCS(rasterArrayx, s, LCSminMaxL[n][0], LCSminMaxL[n][1] , multFactor, algBandWeigths, dataValue, nodataValue)
- if type(LCSarray) is not int:
- # open input with GDAL
- oR = cfg.gdalSCP.Open(outputGdalRasterList[n], cfg.gdalSCP.GA_Update)
- # binary classification
- LCSarrayWrite = cfg.np.where(LCSarray==dataValue,1,0)
- # algorithm raster
- cfg.utls.writeArrayBlock(oR, 1, LCSarrayWrite, 0, 0, nodataValue)
- oR = None
- LCSarrayWrite = None
- # find equal array for overlapping classes
- if equalArray is None:
- equalArray = LCSarray
- else:
- equalArray = cfg.utls.findEqualArray(LCSarray, equalArray, dataValue, nodataValue, cfg.unclassValue)
- if classArray is None:
- classArray = nodataValue
- if macroclassCheck == 'Yes':
- classArray = cfg.utls.classifyClassesLCSSimple(LCSarray, equalArray, classArray, dataValue, cfg.unclassValue, nodataValue, signatureList[n][0])
- else:
- classArray = cfg.utls.classifyClassesLCSSimple(LCSarray, equalArray, classArray, dataValue, cfg.unclassValue, nodataValue, signatureList[n][2])
- # in case of same class overlapping
- equalArray = cfg.np.where( (equalArray ==cfg.unclassValue) & (classArray !=cfg.unclassValue), dataValue, equalArray)
- # refine class output
- classArrayLCS = cfg.np.where(classArray == nodataValue, 0, classArray)
- algArrayWrite = cfg.np.where(classArrayLCS == 0, 0, cfg.np.where(classArrayLCS == cfg.unclassValue, cfg.unclassValue, 1))
- # algorithm raster
- cfg.utls.writeArrayBlock(rDA, 1, algArrayWrite, 0, 0, nodataValue)
- algArrayWrite = None
- if secondClassification == 'No':
- pass
- elif secondClassification == cfg.algMinDist:
- # algorithm
- rasterArrayx = cfg.np.copy(rasterArray)
- c = cfg.utls.algorithmMinimumDistance(rasterArrayx, s, cfg.algBandWeigths)
- # threshold
- algThrshld = float(tr[n])
- if algThrshld > 0:
- c = cfg.utls.minimumDistanceThreshold(c, algThrshld, nodataValue)
- if type(c) is not int:
- if minArray is None:
- minArray = c
- else:
- minArray = cfg.utls.findMinimumArray(c, minArray, nodataValue)
- # signature classification raster
- if macroclassCheck == 'Yes':
- clA = cfg.utls.classifyClasses(c, minArray, signatureList[n][0])
- else:
- clA = cfg.utls.classifyClasses(c, minArray, signatureList[n][2])
- # classification raster
- if classArrayAlg is None:
- classArrayAlg = clA
- else:
- e = cfg.np.ma.masked_equal(clA, 0)
- classArrayAlg = e.mask * classArrayAlg + clA
- e = None
- clA = None
- classArrayAlg[classArrayAlg == cfg.unclassifiedVal] = 0
- classArrayLCS = cfg.np.where(classArray == cfg.unclassValue, classArrayAlg, classArray)
- if LCSLeaveUnclassified == 'Yes':
- pass
- else:
- classArrayLCS = cfg.np.where(classArray == nodataValue, classArrayAlg, classArrayLCS)
- else:
- return 'No'
- elif secondClassification == cfg.algSAM:
- # algorithm
- rasterArrayx = cfg.np.copy(rasterArray)
- c = cfg.utls.algorithmSAM(rasterArrayx, s, cfg.algBandWeigths)
- # threshold
- algThrshld = float(tr[n])
- if algThrshld > 0:
- if algThrshld > 90:
- algThrshld = 90
- c = cfg.utls.minimumDistanceThreshold(c, algThrshld, nodataValue)
- if type(c) is not int:
- if minArray is None:
- minArray = c
- else:
- minArray = cfg.utls.findMinimumArray(c, minArray, nodataValue)
- # signature classification raster
- if macroclassCheck == 'Yes':
- clA = cfg.utls.classifyClasses(c, minArray, signatureList[n][0])
- else:
- clA = cfg.utls.classifyClasses(c, minArray, signatureList[n][2])
- # classification raster
- if classArrayAlg is None:
- classArrayAlg = clA
- else:
- e = cfg.np.ma.masked_equal(clA, 0)
- classArrayAlg = e.mask * classArrayAlg + clA
- e = None
- clA = None
- classArrayAlg[classArrayAlg == cfg.unclassifiedVal] = 0
- classArrayLCS = cfg.np.where(classArray == cfg.unclassValue, classArrayAlg, classArray)
- if LCSLeaveUnclassified == 'Yes':
- pass
- else:
- classArrayLCS = cfg.np.where(classArray == nodataValue, classArrayAlg, classArrayLCS)
- else:
- return 'No'
- elif secondClassification == cfg.algML:
- # algorithm
- rasterArrayx = cfg.np.copy(rasterArray)
- # threshold
- algThrshld = float(tr[n])
- if algThrshld > 100:
- algThrshld = 100
- c = cfg.utls.algorithmMaximumLikelihood(rasterArrayx, s, covMatrList[n], cfg.algBandWeigths, algThrshld, nodataValue)
- if type(c) is not int:
- if maxArray is None:
- maxArray = c
- else:
- maxArray = cfg.utls.findMaximumArray(c, maxArray, nodataValue)
- # signature classification raster
- if macroclassCheck == 'Yes':
- clA = cfg.utls.classifyClasses(c, maxArray, signatureList[n][0])
- else:
- clA = cfg.utls.classifyClasses(c, maxArray, signatureList[n][2])
- # classification raster
- if classArrayAlg is None:
- classArrayAlg = clA
- else:
- e = cfg.np.ma.masked_equal(clA, 0)
- classArrayAlg = e.mask * classArrayAlg + clA
- e = None
- clA = None
- classArrayAlg[classArrayAlg == cfg.unclassifiedVal] = 0
- classArrayLCS = cfg.np.where(classArray == cfg.unclassValue, classArrayAlg, classArray)
- if LCSLeaveUnclassified == 'Yes':
- pass
- else:
- classArrayLCS = cfg.np.where(classArray == nodataValue, classArrayAlg, classArrayLCS)
- else:
- return 'No'
- classArrayWrite = cfg.np.where(classArrayLCS == nodataValue, 0, classArrayLCS)
- if nodataMask is not None:
- classArray[::, ::][nodataMask[::, ::] != 0] = nodataMask[::, ::][nodataMask[::, ::] != 0]
- # classification raster
- cfg.utls.writeArrayBlock(rDC, 1, classArrayWrite, 0, 0, nodataValue)
- n = n + 1
- else:
- return 'No'
- elif algorithmName == cfg.algMinDist:
- for s in sigArrayList:
- cfg.utls.logToFile(str(__name__) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), 'n ' + str(n))
- # algorithm
- rasterArrayx = cfg.np.copy(rasterArray)
- c = self.algorithmMinimumDistance(rasterArrayx, s, cfg.algBandWeigths)
- # logger
- cfg.utls.logToFile(str(__name__) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), 'algorithmMinimumDistance signature' + str(c))
- # threshold
- algThrshld = float(tr[n])
- if algThrshld > 0:
- c = self.minimumDistanceThreshold(c, algThrshld, nodataValue)
- if type(c) is not int:
- # open input with GDAL
- oR = cfg.gdalSCP.Open(outputGdalRasterList[n], cfg.gdalSCP.GA_Update)
- # logger
- cfg.utls.logToFile(str(__name__) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), 'outputGdalRasterList[n] ' + str(outputGdalRasterList[n]))
- # logger
- cfg.utls.logToFile(str(__name__) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), 'oR ' + str(oR))
- # algorithm raster
- cfg.utls.writeArrayBlock(oR, 1, c, 0, 0, nodataValue)
- oR = None
- if minArray is None:
- minArray = c
- else:
- minArray = self.findMinimumArray(c, minArray, nodataValue)
- # logger
- cfg.utls.logToFile(str(__name__) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), 'findMinimumArray signature' + str(minArray[0,0]))
- # minimum raster
- self.writeArrayBlock(rDA, 1, minArray, 0, 0, nodataValue)
- # signature classification raster
- if macroclassCheck == 'Yes':
- clA = self.classifyClasses(c, minArray, signatureList[n][0])
- else:
- clA = self.classifyClasses(c, minArray, signatureList[n][2])
- # classification raster
- if classArray is None:
- classArray = clA
- else:
- e = cfg.np.ma.masked_equal(clA, 0)
- classArray = e.mask * classArray + clA
- e = None
- clA = None
- classArray[classArray == cfg.unclassifiedVal] = 0
- if nodataMask is not None:
- classArray[::, ::][nodataMask[::, ::] != 0] = nodataMask[::, ::][nodataMask[::, ::] != 0]
- # classification raster
- self.writeArrayBlock(rDC, 1, classArray, 0, 0, nodataValue)
- n = n + 1
- else:
- return 'No'
- elif algorithmName == cfg.algSAM:
- for s in sigArrayList:
- # algorithm
- rasterArrayx = cfg.np.copy(rasterArray)
- c = self.algorithmSAM(rasterArrayx, s, cfg.algBandWeigths)
- # threshold
- algThrshld = float(tr[n])
- if algThrshld > 0:
- if algThrshld > 90:
- algThrshld = 90
- c = self.minimumDistanceThreshold(c, algThrshld, nodataValue)
- if type(c) is not int:
- # open input with GDAL
- oR = cfg.gdalSCP.Open(outputGdalRasterList[n], cfg.gdalSCP.GA_Update)
- # algorithm raster
- self.writeArrayBlock(oR, 1, c, 0, 0, nodataValue)
- oR = None
- if minArray is None:
- minArray = c
- else:
- minArray = self.findMinimumArray(c, minArray, nodataValue)
- # minimum raster
- self.writeArrayBlock(rDA, 1, minArray, 0, 0, nodataValue)
- # signature classification raster
- if macroclassCheck == 'Yes':
- clA = self.classifyClasses(c, minArray, signatureList[n][0])
- else:
- clA = self.classifyClasses(c, minArray, signatureList[n][2])
- # classification raster
- if classArray is None:
- classArray = clA
- else:
- e = cfg.np.ma.masked_equal(clA, 0)
- classArray = e.mask * classArray + clA
- e = None
- clA = None
- classArray[classArray == cfg.unclassifiedVal] = 0
- if nodataMask is not None:
- classArray[::, ::][nodataMask[::, ::] != 0] = nodataMask[::, ::][nodataMask[::, ::] != 0]
- # classification raster
- self.writeArrayBlock(rDC, 1, classArray, 0, 0, nodataValue)
- n = n + 1
- else:
- return 'No'
- elif algorithmName == cfg.algML:
- for s in sigArrayList:
- # algorithm
- rasterArrayx = cfg.np.copy(rasterArray)
- # threshold
- algThrshld = float(tr[n])
- if algThrshld > 100:
- algThrshld = 100
- c = self.algorithmMaximumLikelihood(rasterArrayx, s, covMatrList[n], cfg.algBandWeigths, algThrshld, nodataValue)
- if type(c) is not int:
- # open input with GDAL
- oR = cfg.gdalSCP.Open(outputGdalRasterList[n], cfg.gdalSCP.GA_Update)
- # algorithm raster
- self.writeArrayBlock(oR, 1, c, 0, 0, nodataValue)
- oR = None
- if maxArray is None:
- maxArray = c
- else:
- maxArray = self.findMaximumArray(c, maxArray, nodataValue)
- # maximum raster
- self.writeArrayBlock(rDA, 1, maxArray, 0, 0, nodataValue)
- # signature classification raster
- if macroclassCheck == 'Yes':
- clA = self.classifyClasses(c, maxArray, signatureList[n][0])
- else:
- clA = self.classifyClasses(c, maxArray, signatureList[n][2])
- # classification raster
- if classArray is None:
- classArray = clA
- else:
- e = cfg.np.ma.masked_equal(clA, 0)
- classArray = e.mask * classArray + clA
- e = None
- clA = None
- classArray[classArray == cfg.unclassifiedVal] = 0
- if nodataMask is not None:
- classArray[::, ::][nodataMask[::, ::] != 0] = nodataMask[::, ::][nodataMask[::, ::] != 0]
- # classification raster
- self.writeArrayBlock(rDC, 1, classArray, 0, 0, nodataValue)
- n = n + 1
- else:
- return 'No'
- classArray = None
- rasterArrayx = None
- c = None
- try:
- minArray = None
- except:
- pass
- try:
- maxArray = None
- except:
- pass
- rDC = None
- rDA = None
-
- # classify classes
- def classifyClasses(self, algorithmArray, minimumArray, classID, nodataValue = -999):
- if int(classID) == 0:
- classID = cfg.unclassifiedVal
- cB = cfg.np.equal(algorithmArray, minimumArray) * int(classID)
- cA = cfg.np.where(minimumArray != nodataValue, cB, cfg.unclassifiedVal)
- return cA
-
- # classify classes
- def classifyClassesLCSSimple(self, LCSarray, equalArray, classArrayLCS, dataValue, unclassValue, nodataValue, classID):
- cA = cfg.np.where( (LCSarray == dataValue) & (equalArray == dataValue), int(classID), cfg.np.where( (equalArray == unclassValue) & (classArrayLCS != int(classID) ), unclassValue,classArrayLCS ) )
- return cA
-
- # find minimum array
- def findMinimumArray(self, firstArray, secondArray, nodataValue = -999):
- f = cfg.np.where(firstArray == nodataValue, cfg.maxValDt, firstArray)
- s = cfg.np.where(secondArray == nodataValue, cfg.maxValDt, secondArray)
- n = cfg.np.minimum(f, s)
- m = cfg.np.where(n == cfg.maxValDt, nodataValue, n)
- return m
-
- # find equal array
- def findEqualArray(self, firstArray, secondArray, dataValue = -1, nodataValue = -999, unclassifiedValue = -1000):
- f = cfg.np.where( (firstArray == dataValue) & (secondArray == dataValue), unclassifiedValue, cfg.np.where(firstArray == unclassifiedValue, unclassifiedValue, cfg.np.where(secondArray == unclassifiedValue, unclassifiedValue, cfg.np.where(firstArray == nodataValue, secondArray, firstArray) ) ) )
- return f
-
- # find maximum array
- def findMaximumArray(self, firstArray, secondArray, nodataValue = -999):
- m = cfg.np.maximum(firstArray, secondArray)
- # logger
- cfg.utls.logCondition(str(__name__) + "-" + str(cfg.inspectSCP.stack()[0][3])+ " " + cfg.utls.lineOfCode())
- return m
-
- # set threshold
- def maximumLikelihoodThreshold(self, array, nodataValue = 0):
- outArray = cfg.np.where(array > cfg.maxLikeNoDataVal, array, nodataValue)
- # logger
- cfg.utls.logCondition(str(__name__) + "-" + str(cfg.inspectSCP.stack()[0][3])+ " " + cfg.utls.lineOfCode())
- return outArray
-
- # set threshold
- def minimumDistanceThreshold(self, array, threshold, nodataValue = 0):
- outArray = cfg.np.where(array < threshold, array, nodataValue)
- # logger
- cfg.utls.logCondition(str(__name__) + "-" + str(cfg.inspectSCP.stack()[0][3])+ " " + cfg.utls.lineOfCode())
- return outArray
-
- # create array from signature list
- def createArrayFromSignature(self, bandListNumber, signatureList):
- arrayList = []
- for s in signatureList:
- val = s[4]
- array = cfg.np.zeros((bandListNumber), dtype=cfg.np.float32)
- max = bandListNumber * 2
- i = 0
- for b in range(0, max, 2):
- array[i] = val[b]
- i = i + 1
- arrayList.append(array)
- return arrayList
-
- # minimum Euclidean distance algorithm [ sqrt( sum( (r_i - s_i)^2 ) ) ]
- def algorithmMinimumDistance(self, rasterArray, signatureArray, weightList = None):
- try:
- if weightList is not None:
- c = 0
- for w in weightList:
- rasterArray[:,:,c] *= w
- signatureArray[c] *= w
- c = c + 1
- algArray = cfg.np.sqrt(((rasterArray - signatureArray)**2).sum(axis = 2))
- return algArray
- except Exception as err:
- return 0
-
- # create covariance matrix list from signature list
- def covarianceMatrixList(self, signatureList):
- c = []
- for s in signatureList:
- cov = s[7]
- c.append(cov)
- return c
-
- # create LCSmin LCSmax list from signature list
- def LCSminMaxList(self, signatureList):
- arrayList = []
- for s in signatureList:
- arrayList.append([s[8], s[9]])
- return arrayList
-
- # create threshold list from signature list
- def thresholdList(self, signatureList):
- c = []
- if cfg.algThrshld > 0:
- for s in signatureList:
- c.append(cfg.algThrshld)
- else:
- for s in signatureList:
- t = s[10]
- c.append(t)
- return c
-
- # calculate critical chi square and threshold
- def chisquare(self, algThrshld, bands):
- p = (algThrshld / 100)
- chi = cfg.statdistrSCP.chi2.isf(p, bands)
- return chi
-
- # Maximum Likelihood algorithm
- def algorithmMaximumLikelihood(self, rasterArray, signatureArray, covarianceMatrix, weightList = None, algThrshld = 0, nodataValue = 0):
- try:
- if weightList is not None:
- c = 0
- for w in weightList:
- rasterArray[:,:,c] *= w
- signatureArray[c] *= w
- c = c + 1
- (sign, logdet) = cfg.np.linalg.slogdet(covarianceMatrix)
- invC = cfg.np.linalg.inv(covarianceMatrix)
- d = rasterArray - signatureArray
- algArray = - logdet - (cfg.np.dot(d, invC) * d).sum(axis = 2)
- cfg.utls.logToFile(str(__name__) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), ' logdet: ' + str(logdet))
- if algThrshld > 0:
- chi = self.chisquare(algThrshld, covarianceMatrix.shape[0])
- threshold = - 2 * chi - logdet
- cfg.utls.logToFile(str(__name__) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), ' threshold: ' + str(threshold) + ' algThrshld: ' + str(algThrshld))
- algArray[algArray < threshold] = nodataValue
- return algArray
- except Exception as err:
- # logger
- cfg.utls.logToFile(str(__name__) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), ' ERROR exception: ' + str(err))
- return 0
-
- # spectral angle mapping algorithm [ arccos( sum(r_i * s_i) / ( sum(r_i**2) * sum(s_i**2) ) ) ]
- def algorithmSAM(self, rasterArray, signatureArray, weightList = None):
- try:
- if weightList is not None:
- c = 0
- for w in weightList:
- rasterArray[:,:,c] *= w
- signatureArray[c] *= w
- c = c + 1
- algArray = cfg.np.arccos((rasterArray * signatureArray).sum(axis = 2) / cfg.np.sqrt((rasterArray**2).sum(axis = 2) * (signatureArray**2).sum())) * 180 / cfg.np.pi
- # logger
- cfg.utls.logCondition(str(__name__) + "-" + str(cfg.inspectSCP.stack()[0][3])+ " " + cfg.utls.lineOfCode())
- return algArray
- except Exception as err:
- # logger
- cfg.utls.logCondition(str(__name__) + '-' + (cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), ' ERROR exception: ' + str(err))
- return 0
-
- # land cover signature
- def algorithmLCS(self, rasterArray, signatureArray, LCSmin, LCSmax, multFactor, weightList = None, dataValue = 0, nodataValue = -999):
- try:
- if weightList is not None:
- c = 0
- for w in weightList:
- rasterArray[:,:,c] *= w
- signatureArray[c] *= w
- LCSmin[c] *= w
- LCSmax[c] *= w
- c = c + 1
- condit1 = "cfg.np.where( "
- for i in range(len(signatureArray)):
- condit1 = condit1 + "(cfg.np.around(rasterArray[:,:," + str(i) + "], 11) >= cfg.np.around(" + repr(LCSmin[i] * multFactor) + ", 11)) & (cfg.np.around(rasterArray[:,:," + str(i) + "], 11) <= cfg.np.around(" + repr(LCSmax[i] * multFactor) + ", 11)) & "
- condit1 = condit1[:-4] + "), " +repr(dataValue) +", " + repr(nodataValue) + ")"
- algArray = eval(condit1)
- # logger
- cfg.utls.logCondition(str(__name__) + "-" + str(cfg.inspectSCP.stack()[0][3])+ " " + cfg.utls.lineOfCode())
- return algArray
- except Exception as err:
- # logger
- cfg.utls.logCondition(str(__name__) + '-' + (cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), ' ERROR exception: ' + str(err))
- return 0
-
-##################################
- ''' Signature spectral distance functions '''
-##################################
-
- # calculate Jeffries-Matusita distance Jij = 2[1 − e^(−B)] from Richards, J. A. & Jia, X. 2006. Remote Sensing Digital Image Analysis: An Introduction, Springer.
- def jeffriesMatusitaDistance(self, signatureArrayI, signatureArrayJ, covarianceMatrixI, covarianceMatrixJ, weightList = None):
- try:
- I = cfg.np.array(signatureArrayI)
- J = cfg.np.array(signatureArrayJ)
- cI = cfg.np.copy(covarianceMatrixI)
- cJ = cfg.np.copy(covarianceMatrixJ)
- if weightList is not None:
- c = 0
- for w in weightList:
- I[c] *= w
- J[c] *= w
- c = c + 1
- d = (I - J)
- C = (cI + cJ)/2
- invC = cfg.np.linalg.inv(C)
- dInvC = cfg.np.dot(d.T, invC)
- f = cfg.np.dot(dInvC, d) / 8.0
- (signC, logdetC) = cfg.np.linalg.slogdet(C)
- (signcI, logdetcI) = cfg.np.linalg.slogdet(cI)
- (signcJ, logdetcJ) = cfg.np.linalg.slogdet(cJ)
- s = cfg.np.log(signC * cfg.np.exp(logdetC) / (cfg.np.sqrt(signcI * cfg.np.exp(logdetcI)) * cfg.np.sqrt(signcJ * cfg.np.exp(logdetcJ)))) / 2.0
- B = f + s
- JM = 2 * (1 - cfg.np.exp(-B))
- except Exception as err:
- # logger
- cfg.utls.logCondition(str(__name__) + '-' + (cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), ' ERROR exception: ' + str(err))
- JM = cfg.notAvailable
- return JM
-
- # calculate transformed divergence dij = 2[1 − e^(−dij/8)] from Richards, J. A. & Jia, X. 2006. Remote Sensing Digital Image Analysis: An Introduction, Springer.
- def transformedDivergence(self, signatureArrayI, signatureArrayJ, covarianceMatrixI, covarianceMatrixJ):
- try:
- I = cfg.np.array(signatureArrayI)
- J = cfg.np.array(signatureArrayJ)
- d = (I - J)
- cI = covarianceMatrixI
- cJ = covarianceMatrixJ
- invCI = cfg.np.linalg.inv(cI)
- invCJ = cfg.np.linalg.inv(cJ)
- p1 = (cI - cJ) * (invCI - invCJ)
- t1 = 0.5 * cfg.np.trace(p1)
- p2 = (invCI + invCJ) * d
- p3 = p2 * d.T
- t2 = 0.5 * cfg.np.trace(p3)
- div = t1 + t2
- TD = 2 * (1 - cfg.np.exp(-div/8.0))
- except Exception as err:
- # logger
- cfg.utls.logCondition(str(__name__) + '-' + (cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), ' ERROR exception: ' + str(err))
- TD = cfg.notAvailable
- return TD
-
- # Bray-Curtis similarity (100 - 100 * sum(abs(x[ki]-x[kj]) / (sum(x[ki] + x[kj])))
- def brayCurtisSimilarity(self, signatureArrayI, signatureArrayJ):
- try:
- I = cfg.np.array(signatureArrayI)
- J = cfg.np.array(signatureArrayJ)
- sumIJ = I.sum() + J.sum()
- d = cfg.np.sqrt((I - J)**2)
- sim = 100 - d.sum() / sumIJ * 100
- except Exception as err:
- # logger
- cfg.utls.logCondition(str(__name__) + '-' + (cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), ' ERROR exception: ' + str(err))
- sim = cfg.notAvailable
- return sim
-
- # Euclidean distance sqrt(sum((x[ki] - x[kj])^2))
- def euclideanDistance(self, signatureArrayI, signatureArrayJ, weightList = None):
- try:
- I = cfg.np.array(signatureArrayI)
- J = cfg.np.array(signatureArrayJ)
- if weightList is not None:
- c = 0
- for w in weightList:
- I[c] *= w
- J[c] *= w
- c = c + 1
- d = (I - J)**2
- dist = cfg.np.sqrt(d.sum())
- except Exception as err:
- # logger
- cfg.utls.logCondition(str(__name__) + '-' + (cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), ' ERROR exception: ' + str(err))
- dist = cfg.notAvailable
- return dist
-
- # Spectral angle algorithm [ arccos( sum(r_i * s_i) / sqrt( sum(r_i**2) * sum(s_i**2) ) ) ]
- def spectralAngle(self, signatureArrayI, signatureArrayJ, weightList = None):
- try:
- I = cfg.np.array(signatureArrayI)
- J = cfg.np.array(signatureArrayJ)
- if weightList is not None:
- c = 0
- for w in weightList:
- I[c] *= w
- J[c] *= w
- c = c + 1
- angle = cfg.np.arccos((I * J).sum() / cfg.np.sqrt((I**2).sum() * (J**2).sum())) * 180 / cfg.np.pi
- except Exception as err:
- # logger
- cfg.utls.logCondition(str(__name__) + '-' + (cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), ' ERROR exception: ' + str(err))
- angle = cfg.notAvailable
- return angle
-
-##################################
- ''' Signature functions '''
-##################################
-
- # calculate ROI signature (one signature for ROIs that have the same macroclass ID and class ID)
- def calculateSignature(self, lyr, rasterName, featureIDList, macroclassID, macroclassInfo, classID, classInfo, progress = None, progresStep = None, plot = 'No', tempROI = 'No', SCP_UID = None, bandSetNumber = None):
- if bandSetNumber is None:
- bandSetNumber = cfg.bndSetNumber
- if progress is not None:
- cfg.uiUtls.updateBar(progress + int((1 / 4) * progresStep))
- # disable map canvas render for speed
- cfg.cnvs.setRenderFlag(False)
- # temporary layer
- tSD = cfg.utls.createTempRasterPath('tif')
- tLP = cfg.utls.createTempRasterPath('gpkg')
- # get layer crs
- crs = cfg.utls.getCrs(lyr)
- # create a temp shapefile with a field
- cfg.utls.createEmptyShapefile(crs, tLP, format = 'GPKG')
- mL = cfg.utls.addVectorLayer(tLP)
- rD = None
- for x in featureIDList:
- # copy ROI to temp shapefile
- cfg.utls.copyFeatureToLayer(lyr, x, mL)
- tRxs = cfg.utls.createTempRasterPath('tif')
- if progress is not None:
- cfg.uiUtls.updateBar(progress + int((2 / 4) * progresStep))
- cfg.tblOut = {}
- cfg.parallelArrayDict = {}
- ROIArray = []
- ROIsize = None
- # band set
- if cfg.bandSetsList[bandSetNumber][0] == 'Yes':
- cfg.utls.checkBandSet(bandSetNumber)
- check = cfg.utls.vectorToRaster(None, tLP, None, tRxs, cfg.bndSetLst[0], None, 'GTiff', 1)
- if check == 'No':
- return 'No'
- outList = cfg.utls.clipRasterByRaster(cfg.bndSetLst, tRxs, progressMessage = cfg.QtWidgetsSCP.QApplication.translate('semiautomaticclassificationplugin', 'Calculating signature'), stats = 'Yes')
- else:
- rS = cfg.utls.selectLayerbyName(rasterName, 'Yes')
- check = cfg.utls.vectorToRaster(None, tLP, None, tRxs, rS.source(), None, 'GTiff', 1)
- if check == 'No':
- return 'No'
- # calculate ROI center, height and width
- rCX, rCY, rW, rH = cfg.utls.getShapefileRectangleBox(tLP)
- # subset
- tLX, tLY, pS = cfg.utls.imageInformation(rasterName)
- tS = cfg.utls.createTempRasterPath('tif')
- # reduce band size
- pr = cfg.utls.subsetImage(rasterName, rCX, rCY, int(round(rW/pS + 3)), int(round(rH/pS + 3)), str(tS), virtual = 'Yes')
- if pr == 'Yes':
- # logger
- cfg.utls.logCondition(str(__name__) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), ' Error edge')
- # enable map canvas render
- cfg.cnvs.setRenderFlag(True)
- return pr
- oList = cfg.utls.rasterToBands(tS, cfg.tmpDir, None, 'No', cfg.bandSetsList[bandSetNumber][6])
- outList = cfg.utls.clipRasterByRaster(oList, tRxs, progressMessage = cfg.QtWidgetsSCP.QApplication.translate('semiautomaticclassificationplugin', 'Calculating signature'), stats = 'Yes')
- # calculate signatures
- b = 0
- ROIsizes = []
- for x in sorted(cfg.parallelArrayDict):
- try:
- for dic in cfg.parallelArrayDict[x]:
- rStat, ar, ROIsize = dic[1]
- ROIsizes.append(ROIsize)
- except:
- pass
- rStatStr = str(rStat)
- rStatStr = rStatStr.replace('nan', '0')
- rStat = eval(rStatStr)
- ROIArray.append(ar)
- cfg.tblOut['BAND_' + str(b+1)] = rStat
- cfg.tblOut['WAVELENGTH_' + str(b + 1)] = cfg.bandSetsList[bandSetNumber][4][b]
- b = b + 1
- if progress is not None:
- cfg.uiUtls.updateBar(progress + int((3 / 4) * progresStep))
- # if not temporary ROI min max
- if tempROI != 'MinMax':
- try:
- covMat = cfg.utls.calculateCovMatrix(ROIArray)
- if covMat == 'No':
- cfg.mx.msgWar12(macroclassID, classID)
- except Exception as err:
- # logger
- cfg.utls.logCondition(str(__name__) + '-' + (cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), ' ERROR exception: ' + str(err))
- covMat = 'No'
- cfg.mx.msgWar12(macroclassID, classID)
- # remove temp layers
- cfg.utls.removeLayer(cfg.utls.fileName(tLP))
- try:
- cfg.osSCP.remove(tRxs)
- except:
- pass
- try:
- cfg.tblOut['ROI_SIZE'] = min(ROIsizes)
- except:
- pass
- # if not temporary ROI min max
- if tempROI != 'MinMax':
- cfg.utls.ROIStatisticsToSignature(covMat, macroclassID, macroclassInfo, classID, classInfo, bandSetNumber, cfg.bandSetsList[bandSetNumber][5], plot, tempROI, SCP_UID)
- # enable map canvas render
- cfg.cnvs.setRenderFlag(True)
- if progress is not None:
- cfg.uiUtls.updateBar(progress + int((4 / 4) * progresStep))
- # logger
- cfg.utls.logCondition(str(__name__) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), "roi signature calculated")
-
- # calculate pixel signature
- def calculatePixelSignature(self, point, rasterName, bandSetNumber = None, plot = 'No', showPlot = 'Yes'):
- if bandSetNumber is None:
- bandSetNumber = cfg.bndSetNumber
- cfg.tblOut = {}
- cfg.tblOut["ROI_SIZE"] = 1
- rStat = []
- # band set
- if cfg.bandSetsList[bandSetNumber][0] == 'Yes':
- for b in range(0, len(cfg.bandSetsList[bandSetNumber][3])):
- rast = cfg.utls.selectLayerbyName(cfg.bandSetsList[bandSetNumber][3][b], 'Yes')
- # open input with GDAL
- try:
- ql = cfg.utls.layerSource(rast)
- Or = cfg.gdalSCP.Open(ql, cfg.gdalSCP.GA_ReadOnly)
- except Exception as err:
- # logger
- cfg.utls.logCondition(str(__name__) + '-' + (cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), ' ERROR exception: ' + str(err))
- cfg.mx.msgErr4()
- return 'No'
- OrB = Or.GetRasterBand(1)
- geoT = Or.GetGeoTransform()
- tLX = geoT[0]
- tLY = geoT[3]
- pSX = geoT[1]
- pSY = geoT[5]
- # start and end pixels
- pixelStartColumn = (int((point.x() - tLX) / pSX))
- pixelStartRow = -(int((tLY - point.y()) / pSY))
- try:
- bVal = float(cfg.utls.readArrayBlock(OrB, pixelStartColumn, pixelStartRow, 1, 1)) * cfg.bandSetsList[bandSetNumber][6][0][b] + cfg.bandSetsList[bandSetNumber][6][1][b]
- except Exception as err:
- # logger
- cfg.utls.logCondition(str(__name__) + '-' + (cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), ' ERROR exception: ' + str(err))
- cfg.mx.msgErr4()
- return 'No'
- rStat = [bVal, bVal, bVal, 0]
- cfg.tblOut["BAND_" + str(b + 1)] = rStat
- cfg.tblOut["WAVELENGTH_" + str(b + 1)] = cfg.bandSetsList[bandSetNumber][4][b]
- else:
- rL = cfg.utls.selectLayerbyName(rasterName, 'Yes')
- # open input with GDAL
- try:
- qll = cfg.utls.layerSource(rL)
- Or = cfg.gdalSCP.Open(qll, cfg.gdalSCP.GA_ReadOnly)
- except Exception as err:
- # logger
- cfg.utls.logCondition(str(__name__) + '-' + (cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), ' ERROR exception: ' + str(err))
- cfg.mx.msgErr4()
- return 'No'
- bCount = rL.bandCount()
- for b in range(1, bCount + 1):
- OrB = Or.GetRasterBand(b)
- geoT = Or.GetGeoTransform()
- tLX = geoT[0]
- tLY = geoT[3]
- pSX = geoT[1]
- pSY = geoT[5]
- # start and end pixels
- pixelStartColumn = (int((point.x() - tLX) / pSX))
- pixelStartRow = -(int((tLY - point.y()) / pSY))
- try:
- bVal = float(cfg.utls.readArrayBlock(OrB, pixelStartColumn, pixelStartRow, 1, 1)) * cfg.bandSetsList[bandSetNumber][6][0][b-1] + cfg.bandSetsList[bandSetNumber][6][1][b-1]
- except Exception as err:
- # logger
- cfg.utls.logCondition(str(__name__) + '-' + (cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), ' ERROR exception: ' + str(err))
- cfg.mx.msgErr4()
- return 'No'
- rStat = [bVal, bVal, bVal, 0]
- cfg.tblOut["BAND_" + str(b)] = rStat
- cfg.tblOut["WAVELENGTH_" + str(b)] = cfg.bandSetsList[bandSetNumber][4][b-1]
- macroclassID = 0
- classID = 0
- macroclassInfo = cfg.pixelNm + " " + cfg.bandSetName + str(bandSetNumber + 1)
- classInfo = cfg.pixelCoords + " " + str(point)
- covMat = 'No'
- val = cfg.utls.ROIStatisticsToSignature(covMat, macroclassID, macroclassInfo, classID, classInfo, bandSetNumber, cfg.bandSetsList[bandSetNumber][5], plot, 'No')
- if showPlot == 'Yes':
- cfg.spSigPlot.showSignaturePlotT()
- return val
-
- # Get values for ROI signature
- def ROIStatisticsToSignature(self, covarianceMatrix, macroclassID, macroclassInfo, classID, classInfo, bandSetNumber = None, unit = None, plot = 'No', tempROI = 'No', SCP_UID = None):
- if bandSetNumber is None:
- bandSetNumber = cfg.bndSetNumber
- # band set
- if cfg.bandSetsList[bandSetNumber][0] == 'Yes':
- iB = len(cfg.bandSetsList[bandSetNumber][3])
- else:
- iR = cfg.utls.selectLayerbyName(cfg.bandSetsList[bandSetNumber][8], 'Yes')
- iB = iR.bandCount()
- wvl = []
- val = []
- valM = []
- min = []
- max = []
- vMin = []
- vMax = []
- try:
- ROISize = cfg.tblOut['ROI_SIZE']
- for b in range(1, iB + 1):
- stats = cfg.tblOut['BAND_' + str(b)]
- w = cfg.tblOut['WAVELENGTH_' + str(b)]
- wvl.append(w)
- vMin.append(stats[0])
- vMax.append(stats[1])
- # values for mean and standard deviation
- vM = stats[2]
- vS = stats[3]
- val.append(vM)
- valM.append(vM)
- val.append(vS)
- #min.append(vM - vS)
- #max.append(vM + vS)
- min = vMin
- max = vMax
- c, cc = cfg.utls.randomColor()
- if plot == 'No':
- if SCP_UID is None:
- i = cfg.utls.signatureID()
- else:
- i = SCP_UID
- cfg.signList['CHECKBOX_' + str(i)] = cfg.QtSCP.Checked
- cfg.signList['MACROCLASSID_' + str(i)] = macroclassID
- cfg.signList['MACROCLASSINFO_' + str(i)] = macroclassInfo
- cfg.signList['CLASSID_' + str(i)] = classID
- cfg.signList['CLASSINFO_' + str(i)] = classInfo
- cfg.signList['WAVELENGTH_' + str(i)] = wvl
- cfg.signList['VALUES_' + str(i)] = val
- cfg.signList['MIN_VALUE_' + str(i)] = vMin
- cfg.signList['MAX_VALUE_' + str(i)] = vMax
- cfg.signList['ROI_SIZE_' + str(i)] = ROISize
- cfg.signList['LCS_MIN_' + str(i)] = min
- cfg.signList['LCS_MAX_' + str(i)] = max
- cfg.signList['COVMATRIX_' + str(i)] = covarianceMatrix
- cfg.signList['MD_THRESHOLD_' + str(i)] = cfg.algThrshld
- cfg.signList['ML_THRESHOLD_' + str(i)] = cfg.algThrshld
- cfg.signList['SAM_THRESHOLD_' + str(i)] = cfg.algThrshld
- # counter
- n = 0
- m = []
- sdL = []
- for wi in wvl:
- m.append(val[n * 2])
- sdL.append(val[n * 2 +1])
- n = n + 1
- cfg.signList['MEAN_VALUE_' + str(i)] = m
- cfg.signList['SD_' + str(i)] = sdL
- if unit is None:
- unit = cfg.bandSetsList[bandSetNumber][5]
- cfg.signList['UNIT_' + str(i)] = unit
- cfg.signList['COLOR_' + str(i)] = c
- #cfg.signList['COMPL_COLOR_' + str(i)] = cc
- cfg.signIDs['ID_' + str(i)] = i
- # calculation for plot
- elif plot == 'Yes':
- if SCP_UID is None:
- i = cfg.utls.signatureID()
- else:
- i = SCP_UID
- cfg.spectrPlotList['CHECKBOX_' + str(i)] = cfg.QtSCP.Checked
- cfg.spectrPlotList['MACROCLASSID_' + str(i)] = macroclassID
- cfg.spectrPlotList['MACROCLASSINFO_' + str(i)] = macroclassInfo
- cfg.spectrPlotList['CLASSID_' + str(i)] = classID
- cfg.spectrPlotList['CLASSINFO_' + str(i)] = classInfo
- cfg.spectrPlotList['WAVELENGTH_' + str(i)] = wvl
- cfg.spectrPlotList['VALUES_' + str(i)] = val
- cfg.spectrPlotList['LCS_MIN_' + str(i)] = vMin
- cfg.spectrPlotList['LCS_MAX_' + str(i)] = vMax
- cfg.spectrPlotList['MIN_VALUE_' + str(i)] = vMin
- cfg.spectrPlotList['MAX_VALUE_' + str(i)] = vMax
- cfg.spectrPlotList['ROI_SIZE_' + str(i)] = ROISize
- cfg.spectrPlotList['COVMATRIX_' + str(i)] = covarianceMatrix
- cfg.spectrPlotList['MD_THRESHOLD_' + str(i)] = cfg.algThrshld
- cfg.spectrPlotList['ML_THRESHOLD_' + str(i)] = cfg.algThrshld
- cfg.spectrPlotList['SAM_THRESHOLD_' + str(i)] = cfg.algThrshld
- # counter
- n = 0
- m = []
- sdL = []
- for wi in wvl:
- m.append(val[n * 2])
- sdL.append(val[n * 2 +1])
- n = n + 1
- cfg.spectrPlotList['MEAN_VALUE_' + str(i)] = m
- cfg.spectrPlotList['SD_' + str(i)] = sdL
- if unit is None:
- unit = cfg.bandSetsList[bandSetNumber][5]
- cfg.spectrPlotList['UNIT_' + str(i)] = unit
- cfg.spectrPlotList['COLOR_' + str(i)] = c
- #cfg.spectrPlotList['COMPL_COLOR_' + str(i)] = cc
- cfg.signPlotIDs['ID_' + str(i)] = i
- if tempROI == 'Yes':
- try:
- cfg.tmpROIColor = cfg.spectrPlotList['COLOR_' + str(cfg.tmpROIID)]
- if cfg.spectrPlotList['MACROCLASSINFO_' + str(cfg.tmpROIID)] == cfg.tmpROINm:
- cfg.spSigPlot.removeSignatureByID(cfg.tmpROIID)
- cfg.tmpROIID = i
- cfg.spectrPlotList['COLOR_' + str(i)] = cfg.tmpROIColor
- else:
- cfg.tmpROIID = i
- cfg.spectrPlotList['COLOR_' + str(i)] = cfg.QtGuiSCP.QColor(cfg.ROIClrVal)
- except:
- cfg.tmpROIID = i
- cfg.spectrPlotList['COLOR_' + str(i)] = cfg.QtGuiSCP.QColor(cfg.ROIClrVal)
- #cfg.spSigPlot.signatureListPlotTable(cfg.uisp.signature_list_plot_tableWidget)
- # logger
- cfg.utls.logCondition(str(__name__) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), ' values to shape concluded, plot: ' + str(plot))
- elif plot == 'Pixel':
- return valM
- except Exception as err:
- # logger
- cfg.utls.logCondition(str(__name__) + '-' + (cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), ' ERROR exception: ' + str(err))
- return []
-
- # import a shapefile
- def importShapefile(self):
- shpFile = cfg.ui.select_shapefile_label.text()
- if cfg.shpLay is None:
- cfg.mx.msg3()
- return 'No'
- if len(shpFile) > 0:
- cfg.uiUtls.addProgressBar()
- cfg.uiUtls.updateBar(10)
- shpName = cfg.utls.fileName(shpFile)
- tSS = cfg.utls.addVectorLayer(shpFile, shpName, 'ogr')
- # create memory layer
- provider = tSS.dataProvider()
- fields = provider.fields()
- tCrs = cfg.utls.getCrs(cfg.shpLay)
- pCrs = cfg.utls.getCrs(tSS)
- f = cfg.qgisCoreSCP.QgsFeature()
- mcIdF = self.fieldID(tSS, cfg.ui.MC_ID_combo.currentText())
- mcInfoF = self.fieldID(tSS, cfg.ui.MC_Info_combo.currentText())
- cIdF = self.fieldID(tSS, cfg.ui.C_ID_combo.currentText())
- cInfoF = self.fieldID(tSS, cfg.ui.C_Info_combo.currentText())
- for f in tSS.getFeatures():
- oFid = cfg.shpLay.fields().indexFromName('fid')
- mFid = cfg.shpLay.maximumValue(oFid) + 1
- if mFid < 1:
- mFid = 1
- cfg.shpLay.startEditing()
- aF = f.geometry()
- if pCrs != tCrs:
- # transform coordinates
- trs = cfg.qgisCoreSCP.QgsCoordinateTransform(pCrs, tCrs)
- aF.transform(trs)
- oF = cfg.qgisCoreSCP.QgsFeature()
- oF.setGeometry(aF)
- mcIdV = f.attributes()[mcIdF]
- try:
- mcId = int(mcIdV)
- except:
- mcId = cfg.ROIMacroID
- mcInfo = f.attributes()[mcInfoF]
- cIdV = f.attributes()[cIdF]
- try:
- cId = int(cIdV)
- except:
- cId = cfg.ROIID
- cInfo = f.attributes()[cInfoF]
- i = cfg.utls.signatureID()
- attributeList = [mFid, mcId, mcInfo, cId, cInfo, i]
- oF.setAttributes(attributeList)
- cfg.shpLay.addFeature(oF)
- cfg.shpLay.commitChanges()
- cfg.shpLay.dataProvider().createSpatialIndex()
- cfg.shpLay.updateExtents()
- cfg.uiUtls.updateBar(40)
- # calculate signature if checkbox is yes
- if cfg.ui.signature_checkBox_2.isChecked() is True:
- rId = cfg.utls.getIDByAttributes(cfg.shpLay, cfg.fldSCP_UID, str(i))
- cfg.utls.calculateSignature(cfg.shpLay, cfg.bandSetsList[cfg.bndSetNumber][8], rId, mcId, mcInfo, cId, cInfo, None, None, 'No', 'No', i)
- cfg.uiUtls.updateBar(90)
- cfg.SCPD.ROIListTableTree(cfg.shpLay, cfg.uidc.signature_list_treeWidget)
- cfg.uiUtls.updateBar(100)
- cfg.uiUtls.removeProgressBar()
-
-##################################
- ''' Process functions '''
-##################################
-
- # create value list from text
- def textToValueList(self, text):
- vList = []
- if "," in text:
- c = text.split(",")
- elif "-" in text:
- v = text.split("-")
- for z in range(int(v[0]), int(v[-1]) + 1):
- vList.append(int(z))
- c = []
- else:
- vList.append(int(text))
- c = []
- for b in c:
- if "-" in b:
- v = b.split("-")
- for z in range(int(v[0]), int(v[-1]) + 1):
- vList.append(int(z))
- else:
- vList.append(int(b))
- uList = cfg.np.unique(vList).tolist()
- return uList
-
- # create 3x3 window
- def create3x3Window(self, connection = '8'):
- size = 3
- B = cfg.np.ones((size,size))
- if connection != '8':
- # 4 cells
- B[0,0] = 0
- B[0,2] = 0
- B[2,0] = 0
- B[2,2] = 0
- return B
-
- # scatter plot raster
- def createScatterPlotRasterCondition(self, rangeList, weightList = None, nodataValue = -999):
- if weightList is not None:
- c = 0
- for w in weightList:
- #bandX *= w
- #bandY *= w
- c = c + 1
- condit1 = ''
- condit2 = ''
- bandX = cfg.np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]])
- bandY = cfg.np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]])
- for list in rangeList:
- for range in list[0]:
- Xmin = range[0][0]
- Xmax = range[0][1]
- Ymin = range[1][0]
- Ymax = range[1][1]
- condit1 = condit1 + 'cfg.np.where( (bandX >= ' + str(Xmin) + ') & (bandX <= ' + str(Xmax) + ') & (bandY >= ' + str(Ymin) + ') & (bandY <= ' + str(Ymax) + '), ' + str(list[1]) + ', '
- condit2 = condit2 + ')'
- condit1 = condit1[:-2] + ', ' + str(nodataValue) + condit2
- try:
- algArray = eval(condit1)
- except Exception as err:
- # logger
- cfg.utls.logCondition(str(__name__) + '-' + (cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), ' ERROR exception: ' + str(err))
- return 0
- # logger
- cfg.utls.logCondition(str(__name__) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode())
- return condit1
-
- # scatter plot raster
- def singleScatterPlotRasterCondition(self, rangeList, weightList = None, nodataValue = -999):
- if weightList is not None:
- c = 0
- for w in weightList:
- #bandX *= w
- #bandY *= w
- c = c + 1
- conditions = []
- for list in rangeList:
- for range in list[0]:
- Xmin = range[0][0]
- Xmax = range[0][1]
- Ymin = range[1][0]
- Ymax = range[1][1]
- condit1 = 'cfg.np.where( (bandX >= ' + str(Xmin) + ') & (bandX <= ' + str(Xmax) + ') & (bandY >= ' + str(Ymin) + ') & (bandY <= ' + str(Ymax) + '), ' + str(list[1]) + ', ' + str(nodataValue) + ')'
- conditions.append(condit1)
- # logger
- cfg.utls.logCondition(str(__name__) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode())
- return conditions
-
- # get UID
- def signatureID(self):
- dT = cfg.utls.getTime()
- r = cfg.randomSCP.randint(100,999)
- i = dT + "_" + str(r)
- # logger
- cfg.utls.logCondition(str(__name__) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), " ID" + str(i))
- return i
-
- # calculate unique CID and MCID list
- def calculateUnique_CID_MCID(self):
- unique = []
- try:
- if len(list(cfg.signIDs.values())) > 0:
- for i in list(cfg.signIDs.values()):
- unique.append(str(cfg.signList["CLASSID_" + str(i)]) + "-" + str(cfg.signList["MACROCLASSID_" + str(i)]))
- l = set(unique)
- listA = cfg.utls.uniqueToOrderedList(l)
- # logger
- cfg.utls.logCondition(str(__name__) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), " unique" + str(list))
- return listA
- else:
- return 'No'
- except Exception as err:
- # logger
- cfg.utls.logCondition(str(__name__) + '-' + (cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), ' ERROR exception: ' + str(err))
- return 'No'
-
- # find DNmin in raster for DOS1
- def findDNmin(self, inputRaster, noDataVal = None):
- cfg.parallelArrayDict = {}
- o = cfg.utls.multiProcessRaster(rasterPath = inputRaster, functionBand = 'No', functionRaster = cfg.utls.rasterUniqueValuesWithSum, nodataValue = noDataVal, progressMessage = cfg.QtWidgetsSCP.QApplication.translate('semiautomaticclassificationplugin', 'DOS1 calculation'), deleteArray = 'No', parallel = cfg.parallelArray)
- DNlist = []
- for x in sorted(cfg.parallelArrayDict):
- rasterBandUniqueVal = {}
- DNm = 0
- try:
- for ar in cfg.parallelArrayDict[x]:
- values = ar[0][0, ::]
- count = ar[0][1, ::]
- val = zip(values, count)
- uniqueVal = cfg.counterSCP(dict(val))
- oldUniqueVal = cfg.counterSCP(rasterBandUniqueVal)
- rasterBandUniqueVal = uniqueVal + oldUniqueVal
- rasterBandUniqueVal.pop(noDataVal, None)
- except:
- return 'No'
- sumTot = sum(rasterBandUniqueVal.values())
- mina = min(rasterBandUniqueVal.keys())
- pT1pc = sumTot * 0.0001
- newSum = 0
- for i in sorted(rasterBandUniqueVal):
- DNm = i
- newSum = newSum + rasterBandUniqueVal[i]
- if newSum >= pT1pc:
- DNm = i
- break
- DNlist.append(DNm)
- # logger
- cfg.utls.logCondition(str(__name__) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), ' DNlist ' + str(DNlist))
- return DNlist
-
- # unique CID and MCID list to ordered list
- def uniqueToOrderedList(self, uniqueList):
- list = []
- for i in uniqueList:
- v = i.split('-')
- list.append([int(v[0]), int(v[1])])
- sortedList = sorted(list, key=lambda list: (list[0], list[1]))
- return sortedList
-
- # check band set and create band set list
- def checkBandSet(self, bandSetNumber = None):
- if bandSetNumber is None:
- bandSetNumber = cfg.bndSetNumber
- ck = 'Yes'
- # list of bands for algorithm
- cfg.bndSetLst = []
- for x in range(0, len(cfg.bandSetsList[bandSetNumber][3])):
- b = cfg.utls.selectLayerbyName(cfg.bandSetsList[bandSetNumber][3][x], 'Yes')
- if b is not None:
- ql = cfg.utls.layerSource(b)
- cfg.bndSetLst.append(ql)
- else:
- ck = 'No'
- # logger
- cfg.utls.logCondition(str(__name__) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), ' raster is not loaded: ' + str(cfg.bandSetsList[bandSetNumber][3][x]))
- return ck
- return ck
-
- # check image Band set and create band set list
- def checkImageBandSet(self, bandSetNumber = None):
- if bandSetNumber is None:
- bandSetNumber = cfg.bndSetNumber
- ck = 'Yes'
- # list of bands for algorithm
- cfg.bndSetLst = []
- b = cfg.utls.selectLayerbyName(cfg.bandSetsList[bandSetNumber][8], 'Yes')
- for x in range(0, len(cfg.bandSetsList[bandSetNumber][3])):
- if b is not None:
- ql = cfg.utls.layerSource(b)
- cfg.bndSetLst.append(ql)
- else:
- ck = 'No'
- # logger
- cfg.utls.logCondition(str(__name__) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), " raster is not loaded: " + str(cfg.bandSetsList[bandSetNumber][3][x]))
- return ck
- return ck
-
- # check if the clicked point is inside the image
- def checkPointImage(self, imageName, point, quiet = 'No', bandSetNumber = None, pointCoordinates = None):
- if bandSetNumber is None:
- bandSetNumber = cfg.bndSetNumber
- # band set
- if cfg.bandSetsList[bandSetNumber][0] == 'Yes':
- try:
- imageName = cfg.bandSetsList[bandSetNumber][3][0]
- except:
- cfg.mx.msgWar25(str(bandSetNumber + 1))
- return 'No'
- # image CRS
- bN0 = cfg.utls.selectLayerbyName(imageName, 'Yes')
- iCrs = self.getCrs(bN0)
- if iCrs is None:
- if pointCoordinates is not None:
- iCrs = pointCoordinates
- pCrs = iCrs
- else:
- iCrs = cfg.utls.getQGISCrs()
- pCrs = iCrs
- else:
- if pointCoordinates is not None:
- pCrs = pointCoordinates
- else:
- # projection of input point from project's crs to raster's crs
- pCrs = cfg.utls.getQGISCrs()
- if pCrs != iCrs:
- try:
- point = cfg.utls.projectPointCoordinates(point, pCrs, iCrs)
- if point is False:
- cfg.pntCheck = 'No'
- cfg.utls.setQGISCrs(iCrs)
- return 'No'
- # Error latitude or longitude exceeded limits
- except Exception as err:
- # logger
- cfg.utls.logCondition(str(__name__) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), ' ERROR exception: ' + str(err))
- crs = None
- # logger
- cfg.utls.logCondition(str(__name__) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), cfg.QtWidgetsSCP.QApplication.translate('semiautomaticclassificationplugin', 'Error') + ': latitude or longitude exceeded limits' + 'project crs: ' + str(pCrs.toProj4()) + ' - raster ' + str(imageName) + ' crs: ' + str(iCrs.toProj4()))
- cfg.pntCheck = 'No'
- return 'No'
- # workaround coordinates issue
- cfg.lstPnt = cfg.qgisCoreSCP.QgsPointXY(point.x() / float(1), point.y() / float(1))
- pX = point.x()
- pY = point.y()
- i = cfg.utls.selectLayerbyName(imageName, 'Yes')
- if i is not None:
- # Point Check
- cfg.pntCheck = None
- if pX > i.extent().xMaximum() or pX < i.extent().xMinimum() or pY > i.extent().yMaximum() or pY < i.extent().yMinimum() :
- if quiet == 'No':
- # logger
- cfg.utls.logCondition(str(__name__) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), 'point outside the image area')
- cfg.mx.msg6()
- cfg.pntCheck = 'No'
- else :
- cfg.pntCheck = 'Yes'
- return cfg.lstPnt
- else:
- # logger
- cfg.utls.logCondition(str(__name__) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), ' image missing')
- if quiet == 'No':
- cfg.mx.msg4()
- cfg.pntCheck = 'No'
- else:
- if cfg.utls.selectLayerbyName(imageName, 'Yes') is None:
- if quiet == 'No':
- cfg.mx.msg4()
- self.pntROI = None
- cfg.pntCheck = 'No'
- else:
- # image CRS
- bN0 = cfg.utls.selectLayerbyName(imageName, 'Yes')
- iCrs = self.getCrs(bN0)
- if iCrs is None:
- iCrs = None
- else:
- if pointCoordinates is not None:
- pCrs = pointCoordinates
- else:
- # projection of input point from project's crs to raster's crs
- pCrs = cfg.utls.getQGISCrs()
- if pCrs != iCrs:
- try:
- point = cfg.utls.projectPointCoordinates(point, pCrs, iCrs)
- if point is False:
- cfg.pntCheck = 'No'
- cfg.utls.setQGISCrs(iCrs)
- return 'No'
- # Error latitude or longitude exceeded limits
- except Exception as err:
- # logger
- cfg.utls.logCondition(str(__name__) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), ' ERROR exception: ' + str(err))
- crs = None
- # logger
- cfg.utls.logCondition(str(__name__) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), cfg.QtWidgetsSCP.QApplication.translate('semiautomaticclassificationplugin', 'Error') + ': latitude or longitude exceeded limits')
- cfg.pntCheck = 'No'
- return 'No'
- # workaround coordinates issue
- if quiet == 'No':
- # logger
- cfg.utls.logCondition(str(__name__) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), 'project crs: ' + str(pCrs.toProj4()) + ' - raster ' + str(imageName) + ' crs: ' + str(iCrs.toProj4()))
- cfg.lstPnt = cfg.qgisCoreSCP.QgsPointXY(point.x() / float(1), point.y() / float(1))
- pX = point.x()
- pY = point.y()
- i = cfg.utls.selectLayerbyName(imageName, 'Yes')
- # Point Check
- cfg.pntCheck = None
- if pX > i.extent().xMaximum() or pX < i.extent().xMinimum() or pY > i.extent().yMaximum() or pY < i.extent().yMinimum() :
- if quiet == 'No':
- cfg.mx.msg6()
- # logger
- cfg.utls.logCondition(str(__name__) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), "point outside the image area")
- cfg.pntCheck = 'No'
- else :
- cfg.pntCheck = 'Yes'
- return cfg.lstPnt
-
- # create temporary raster list
- def createTempRasterList(self, rasterNumber):
- oM = []
- dT = cfg.utls.getTime()
- r = cfg.randomSCP.randint(0,1000)
- for t in range(0, rasterNumber):
- # date time for temp name
- tPMD = cfg.osSCP.path.join(cfg.tmpDir, dT + str(r) + str(t) + '_temp.tif')
- oM.append(tPMD)
- return oM
-
- # create temporary raster path
- def createTempRasterPath(self, extension, name = '_temp'):
- r = cfg.randomSCP.randint(0,1000)
- dT = cfg.utls.getTime()
- tPMD = cfg.tmpDir + '/' + dT + str(r) + name + '.' + extension
- return tPMD
-
- # create temporary raster path
- def createTempRasterPathBatch(self, name, extension):
- tPMD = cfg.tmpDir + '/' + name + '.' + extension
- return tPMD
-
- # create temporary virtual raster
- def createTempVirtualRaster(self, inputRasterList, bandNumberList = 'No', quiet = 'No', NoDataVal = 'No', relativeToVRT = 0, projection = 'No', intersection = 'Yes', boxCoordList = None, xyResList = None, aster = 'No'):
- r = cfg.randomSCP.randint(0,1000)
- # date time for temp name
- dT = cfg.utls.getTime()
- tPMN1 = cfg.tmpVrtNm + '.vrt'
- tPMD1 = cfg.tmpDir + '/' + dT + str(r) + tPMN1
- # create virtual raster
- output = cfg.utls.createVirtualRaster(inputRasterList, tPMD1, bandNumberList, quiet, NoDataVal, relativeToVRT, projection, intersection, boxCoordList, xyResList, aster)
- return output
-
- # create virtual raster with Python
- def createVirtualRaster(self, inputRasterList, output, bandNumberList = 'No', quiet = 'No', NoDataVal = 'No', relativeToVRT = 0, projection = 'No', intersection = 'Yes', boxCoordList = None, xyResList = None, aster = 'No', dataType = None):
- # create virtual raster
- drv = cfg.gdalSCP.GetDriverByName('vrt')
- rXList = []
- rYList = []
- topList = []
- leftList = []
- rightList = []
- bottomList = []
- pXSizeList = []
- pYSizeList = []
- epsgList = []
- for b in inputRasterList:
- gdalRaster = cfg.gdalSCP.Open(b, cfg.gdalSCP.GA_ReadOnly)
- try:
- gt = gdalRaster.GetGeoTransform()
- if projection != 'No':
- rP = projection
- else:
- rP = gdalRaster.GetProjection()
- if rP == '':
- cfg.mx.msgErr47()
- return 'Yes'
- except Exception as err:
- # logger
- cfg.utls.logCondition(str(__name__) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), ' ERROR exception: ' + str(err))
- return 'Yes'
- # check projections
- try:
- if rP is not None:
- epsgList.append(rP)
- else:
- # logger
- cfg.utls.logCondition(str(__name__) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), 'rP is None ' + str(rP))
- except Exception as err:
- # logger
- cfg.utls.logCondition(str(__name__) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), ' ERROR exception: ' + str(err))
- pXSizeList.append(abs(gt[1]))
- pYSizeList.append(abs(gt[5]))
- leftList.append(gt[0])
- topList.append(gt[3])
- rightList.append(gt[0] + gt[1] * gdalRaster.RasterXSize)
- bottomList.append(gt[3] + gt[5] * gdalRaster.RasterYSize)
- # number of x pixels
- rXList.append(float(gdalRaster.RasterXSize))
- # number of y pixels
- rYList.append(float(gdalRaster.RasterYSize))
- gdalRaster = None
- # check projections
- epsgListI = list(set(epsgList))
- rEPSG = cfg.osrSCP.SpatialReference()
- rEPSG.ImportFromWkt(epsgListI[0])
- for epsg in epsgListI:
- vEPSG = cfg.osrSCP.SpatialReference()
- vEPSG.ImportFromWkt(epsg)
- if vEPSG.IsSame(rEPSG) != 1:
- cfg.mx.msgErr60()
- # find raster box
- iLeft = min(leftList)
- iTop= max(topList)
- iRight= max(rightList)
- iBottom= min(bottomList)
- # find intersection box
- xLeft = max(leftList)
- xTop= min(topList)
- xRight= min(rightList)
- xBottom= max(bottomList)
- # highest resolution
- pXSize = min(pXSizeList)
- pYSize = min(pYSizeList)
- if xyResList is not None:
- pXSize = xyResList[0]
- pYSize = xyResList[1]
- if boxCoordList is not None:
- try:
- override = boxCoordList[4]
- if override == 'Yes':
- # find raster box
- if iLeft < boxCoordList[0]:
- iLeft = iLeft +abs(int(round((iLeft - boxCoordList[0]) / pXSize))) * pXSize
- else:
- iLeft = iLeft - abs(int(round((iLeft - boxCoordList[0]) / pXSize))) * pXSize
- if iTop > boxCoordList[1]:
- iTop= iTop - abs(int(round((iTop -boxCoordList[1]) / pYSize))) * pYSize
- else:
- iTop= iTop + abs(int(round((iTop -boxCoordList[1]) / pYSize))) * pYSize
- if iRight > boxCoordList[2]:
- iRight = iRight - abs(int(round((iRight - boxCoordList[2]) / pXSize))) * pXSize
- else:
- iRight = iRight + abs(int(round((iRight - boxCoordList[2]) / pXSize))) * pXSize
- if iBottom < boxCoordList[3]:
- iBottom = iBottom + abs(int(round((iBottom - boxCoordList[3]) / pYSize))) * pYSize
- else:
- iBottom = iBottom - abs(int(round((iBottom - boxCoordList[3]) / pYSize))) * pYSize
- except:
- # find raster box
- if iLeft < boxCoordList[0]:
- iLeft = iLeft +abs(int(round((iLeft - boxCoordList[0]) / pXSize))) * pXSize
- if iTop > boxCoordList[1]:
- iTop= iTop - abs(int(round((iTop -boxCoordList[1]) / pYSize))) * pYSize
- if iRight > boxCoordList[2]:
- iRight = iRight - abs(int(round((iRight - boxCoordList[2]) / pXSize))) * pXSize
- if iBottom < boxCoordList[3]:
- iBottom = iBottom + abs(int(round((iBottom - boxCoordList[3]) / pYSize))) * pYSize
- # find intersection box
- if xLeft < boxCoordList[0]:
- xLeft = xLeft +abs(int(round((xLeft - boxCoordList[0]) / pXSize))) * pXSize
- if xTop > boxCoordList[1]:
- xTop= xTop - abs(int(round((xTop -boxCoordList[1]) / pYSize))) * pYSize
- if xRight > boxCoordList[2]:
- xRight= xRight - abs(int(round((xRight - boxCoordList[2]) / pXSize))) * pXSize
- if xBottom < boxCoordList[3]:
- xBottom = xBottom + abs(int(round((xBottom - boxCoordList[3]) / pYSize))) * pYSize
- if xyResList is not None:
- iLeft = xyResList[2]
- iTop = xyResList[3]
- iRight = xyResList[4]
- iBottom = xyResList[5]
- # number of x pixels
- if intersection == 'Yes':
- rX = abs(int(round((xRight - xLeft) / pXSize)))
- rY = abs(int(round((xTop - xBottom) / pYSize)))
- else:
- rX = abs(int(round((iRight - iLeft) / pXSize)))
- rY = abs(int(round((iTop - iBottom) / pYSize)))
- # create virtual raster
- vRast = drv.Create(output, rX, rY, 0)
- # set raster projection from reference intersection
- if intersection == 'Yes':
- vRast.SetGeoTransform((xLeft, pXSize, 0, xTop, 0, -pYSize))
- else:
- vRast.SetGeoTransform((iLeft, pXSize, 0, iTop, 0, -pYSize))
- vRast.SetProjection(rP)
- if len(inputRasterList) == 1 and bandNumberList != 'No':
- x = 0
- gdalRaster2 = cfg.gdalSCP.Open(b, cfg.gdalSCP.GA_ReadOnly)
- try:
- for b in bandNumberList:
- gBand2 = gdalRaster2.GetRasterBand(int(b))
- offs = gBand2.GetOffset()
- scl = gBand2.GetScale()
- noData = gBand2.GetNoDataValue()
- if noData is None or str(noData) == 'nan':
- noData = cfg.NoDataVal
-
- gFormat = gBand2.DataType
- if gFormat == cfg.gdalSCP.GDT_Float64:
- gDataType = 'Float64'
- elif gFormat == cfg.gdalSCP.GDT_Float32:
- gDataType = 'Float32'
- elif gFormat == cfg.gdalSCP.GDT_Int32:
- gDataType = 'Int32'
- elif gFormat == cfg.gdalSCP.GDT_UInt32:
- gDataType = 'UInt32'
- elif gFormat == cfg.gdalSCP.GDT_Int16:
- gDataType = 'Int16'
- elif gFormat == cfg.gdalSCP.GDT_UInt16:
- gDataType = 'UInt16'
- elif gFormat == cfg.gdalSCP.GDT_Byte:
- gDataType = 'Byte'
- if dataType is not None:
- try:
- format = eval('cfg.gdalSCP.GDT_' + dataType)
- except:
- format = gFormat
- else:
- format = gFormat
-
- gt = gdalRaster2.GetGeoTransform()
- pX = abs(gt[1])
- pY = abs(gt[5])
- left = gt[0]
- top = gt[3]
- bsize2 = gBand2.GetBlockSize()
- x_block = bsize2[0]
- y_block = bsize2[1]
- # number of x pixels
- rX2 = int(round(gdalRaster2.RasterXSize * pX / pXSize))
- # number of y pixels
- rY2 = int(round(gdalRaster2.RasterYSize * pY / pYSize))
- # offset
- if intersection == 'Yes':
- xoffX = abs(int(round((left - xLeft) / pX)))
- xoffY = abs(int(round((xTop - top) / pY)))
- offX = 0
- offY = 0
- else:
- offX = abs(int(round((left - iLeft) / pXSize)))
- offY = int(round((iTop - top) / pYSize))
- xoffX = 0
- xoffY = 0
- try:
- override = boxCoordList[4]
- if override == 'Yes':
- if iLeft < left:
- xoffX = 0
- offX = abs(int(round((left - iLeft) / pXSize)))
- else:
- xoffX = abs(int(round((left - iLeft) / pX)))
- offX = 0
- if iTop > top:
- xoffY = 0
- offY = abs(int(round((iTop - top) / pYSize)))
- else:
- xoffY = abs(int(round((iTop - top) / pY)))
- offY = 0
- except:
- pass
- vRast.AddBand(gBand2.DataType)
- bandNumber = bandNumberList[x]
- band = vRast.GetRasterBand(x + 1)
- bsize = band.GetBlockSize()
- x_block = bsize[0]
- y_block = bsize[1]
- # check path
- source_path = inputRasterList[0]
- try:
- source_path = source_path
- except:
- pass
- if relativeToVRT == 1:
- source_path = cfg.utls.fileName(source_path)
- # set metadata xml
- xml = '''
- 404
' in html:
+ second_request = QNetworkRequest(QUrl(cfg.second_url))
+ cfg.second_reply = QgsNetworkAccessManager.instance().get(
+ second_request
+ )
+ cfg.second_reply.finished.connect(reply_in_text_browser_second_request)
+ if len(html) > 0:
+ cfg.dock_class_dlg.ui.main_textBrowser.clear()
+ cfg.dock_class_dlg.ui.main_textBrowser.setHtml(html)
+ cfg.first_reply.finished.disconnect()
+ cfg.first_reply.abort()
+ cfg.first_reply.close()
+
+
+# load reply in text browser
+# noinspection PyUnresolvedReferences
+def reply_in_text_browser_second_request():
+ cfg.second_reply.deleteLater()
+ html_data = cfg.second_reply.readAll().data()
+ html = bytes.decode(html_data)
+ if len(html) > 0:
+ cfg.dock_class_dlg.ui.main_textBrowser.clear()
+ cfg.dock_class_dlg.ui.main_textBrowser.setHtml(html)
+ else:
+ html_text_f = open('%s/ui/welcome.html' % cfg.plugin_dir, 'r')
+ html_text = html_text_f.read()
+ cfg.dock_class_dlg.ui.main_textBrowser.clear()
+ cfg.dock_class_dlg.ui.main_textBrowser.setHtml(html_text)
+ html_text_f.close()
+ cfg.second_reply.finished.disconnect()
+ cfg.second_reply.abort()
+ cfg.second_reply.close()
+
+
+""" encrypt functions """
+
+
+# encrypt password
+def encrypt_password(password):
+ e = base64.b64encode(bytes(password, 'utf-8'))
+ return str(e)
+
+
+# decrypt password
+def decrypt_password(password):
+ if password is not None:
+ d = base64.b64decode(password)
+ return d
+ else:
+ return ''
+
+
+""" time functions """
+
+
+# get time
+def get_time():
+ return datetime.datetime.now().strftime('%Y%m%d_%H%M%S%f')
+
+
+# get date
+def get_date():
+ return datetime.datetime.now().strftime('%Y_%m_%d')
+
+
+""" QGIS map and symbology functions """
+
+
+# refresh extent combo
+def refresh_raster_extent_combo():
+ layers = cfg.util_qgis.get_qgis_project().mapLayers().values()
+ cfg.dialog.ui.raster_extent_combo.clear()
+ cfg.dialog.raster_extent_combo(cfg.union_extent)
+ cfg.dialog.raster_extent_combo(cfg.map_extent)
+ cfg.dialog.raster_extent_combo(cfg.intersection_extent)
+ cfg.dialog.raster_extent_combo(cfg.custom_extent)
+ for layer in sorted(layers, key=lambda c: c.name()):
+ if layer.type() == cfg.util_qgis.get_qgis_map_raster():
+ cfg.dialog.raster_extent_combo(layer.name())
+
+
+# refresh raster align combo
+def refresh_raster_align_combo():
+ layers = cfg.util_qgis.get_qgis_project().mapLayers().values()
+ cfg.dialog.ui.raster_extent_combo_2.clear()
+ cfg.dialog.raster_extent_combo_2(cfg.default_align)
+ for layer in sorted(layers, key=lambda c: c.name()):
+ if layer.type() == cfg.util_qgis.get_qgis_map_raster():
+ cfg.dialog.raster_extent_combo_2(layer.name())
+
+
+# refresh classification combo
+def refresh_raster_layer():
+ ls = cfg.util_qgis.get_qgis_project().mapLayers().values()
+ cfg.dialog.ui.classification_name_combo.clear()
+ cfg.dialog.ui.classification_name_combo_2.clear()
+ cfg.dialog.ui.classification_report_name_combo.clear()
+ cfg.dialog.ui.classification_vector_name_combo.clear()
+ cfg.dialog.ui.reclassification_name_combo.clear()
+ cfg.dialog.ui.classification_name_combo_4.clear()
+ cfg.dialog.ui.reference_raster_name_combo.clear()
+ cfg.dialog.ui.raster_align_comboBox.clear()
+ for layer in sorted(ls, key=lambda c: c.name()):
+ if layer.type() == cfg.util_qgis.get_qgis_map_raster():
+ if layer.bandCount() == 1:
+ cfg.dialog.classification_layer_combo(layer.name())
+ cfg.dialog.classification_layer_combo_2(layer.name())
+ cfg.dialog.classification_report_combo(layer.name())
+ cfg.dialog.classification_to_vector_combo(layer.name())
+ cfg.dialog.reclassification_combo(layer.name())
+ cfg.dialog.cloud_mask_raster_combo(layer.name())
+ cfg.dialog.reference_raster_combo(layer.name())
+ cfg.dialog.project_raster_combo(layer.name())
+
+
+# refresh vector combo
+def refresh_vector_layer():
+ cfg.dialog.ui.vector_name_combo.blockSignals(True)
+ ls = cfg.util_qgis.get_qgis_project().mapLayers().values()
+ cfg.dialog.ui.shapefile_comboBox.clear()
+ cfg.dialog.ui.vector_name_combo.clear()
+ for layer in sorted(ls, key=lambda c: c.name()):
+ if layer.type() == cfg.util_qgis.get_qgis_map_vector():
+ if ((layer.wkbType() == cfg.util_qgis.get_qgis_wkb_types().Polygon)
+ or (layer.wkbType() ==
+ cfg.util_qgis.get_qgis_wkb_types().MultiPolygon)):
+ cfg.dialog.shape_clip_combo(layer.name())
+ cfg.dialog.vector_to_raster_combo(layer.name())
+ cfg.dialog.ui.vector_name_combo.blockSignals(False)
+ refresh_vector_fields()
+
+
+# reference layer name
+def refresh_vector_fields():
+ reference_layer = cfg.dialog.ui.vector_name_combo.currentText()
+ cfg.dialog.ui.field_comboBox.clear()
+ cfg.dialog.ui.select_shapefile_label.setText('')
+ cfg.dialog.ui.MC_ID_combo.clear()
+ cfg.dialog.ui.MC_Info_combo.clear()
+ cfg.dialog.ui.C_ID_combo.clear()
+ cfg.dialog.ui.C_Info_combo.clear()
+ layer = cfg.util_qgis.select_layer_by_name(reference_layer)
+ try:
+ if layer.type() == cfg.util_qgis.get_qgis_map_vector():
+ f = layer.dataProvider().fields()
+ for i in f:
+ if str(i.typeName()).lower() != 'string':
+ cfg.dialog.reference_field_combo(str(i.name()))
+ except Exception as err:
+ return str(err)
+
+
+# set vector symbology
+def vector_symbol(layer, value_name_dictionary, value_color_dictionary):
+ symbol = QgsSymbol.defaultSymbol(layer.geometryType())
+ symbol.setColor(QColor('#000000'))
+ classes = [
+ QgsRendererCategory(0, symbol, '0 - ' + cfg.translate('Unclassified'))]
+ for value in value_name_dictionary:
+ symbol = QgsSymbol.defaultSymbol(layer.geometryType())
+ symbol.setColor(QColor(value_color_dictionary[value]))
+ renderer = QgsRendererCategory(
+ value, symbol, '%s - %s' % (
+ str(value), value_name_dictionary[value]
+ )
+ )
+ classes.append(renderer)
+ raster = QgsCategorizedSymbolRenderer('DN', classes)
+ layer.setRenderer(raster)
+
+
+# set classification symbology
+def classification_raster_symbol(
+ classification_layer, value_name_dictionary, value_color_dictionary
+):
+ # class list value, color, name for ramp
+ class_list = [QgsPalettedRasterRenderer.Class(
+ 0, QColor('#000000'), '0 - ' + cfg.translate('Unclassified')
+ )]
+ for value in value_name_dictionary:
+ class_list.append(
+ QgsPalettedRasterRenderer.Class(
+ value, QColor(value_color_dictionary[value]),
+ '%s - %s' % (str(value), value_name_dictionary[value])
+ )
+ )
+ # create the renderer
+ renderer = QgsPalettedRasterRenderer(
+ classification_layer.dataProvider(), 1, class_list
+ )
+ # apply the renderer to classLayer
+ classification_layer.setRenderer(renderer)
+ # refresh legend
+ if hasattr(classification_layer, 'setCacheImage'):
+ classification_layer.setCacheImage(None)
+ classification_layer.triggerRepaint()
+ cfg.util_qgis.refresh_layer_symbology(classification_layer)
+
+
+# Define raster symbology
+def raster_symbol_generic(
+ raster_layer, nodata_tag='0', raster_unique_value_list=None
+):
+ if raster_unique_value_list is None:
+ unique_value_list = raster_unique_value_list
+ else:
+ unique_value_list = raster_unique_value_list
+ try:
+ max_value = max(unique_value_list)
+ except Exception as err:
+ str(err)
+ max_value = 1
+ # Color list for ramp
+ color_list = [QgsPalettedRasterRenderer.Class(
+ 0, QColor(0, 0, 0), nodata_tag
+ )]
+ for i in unique_value_list:
+ if i > max_value / 2:
+ c = QColor(
+ int(255 * (i / max_value)),
+ int(255 * (1 - (i / max_value))),
+ int(255 * (1 - (i / max_value)))
+ )
+ color_list.append(
+ QgsPalettedRasterRenderer.Class(i, c, str(i))
+ )
+ elif i > 0:
+ c = QColor(
+ int(255 * (i / max_value)),
+ int(255 * (i / max_value)),
+ int(255 * (1 - (i / max_value)))
+ )
+ color_list.append(
+ QgsPalettedRasterRenderer.Class(i, c, str(i))
+ )
+ # create the renderer
+ try:
+ renderer = QgsPalettedRasterRenderer(
+ raster_layer.dataProvider(), 1, color_list
+ )
+ except Exception as err:
+ str(err)
+ renderer = None
+ # Apply the renderer to rasterLayer
+ raster_layer.setRenderer(renderer)
+ # refresh legend
+ if hasattr(raster_layer, 'setCacheImage'):
+ raster_layer.setCacheImage(None)
+ raster_layer.triggerRepaint()
+ cfg.util_qgis.refresh_layer_symbology(raster_layer)
+
+
+""" process functions """
+
+
+# create value list from text
+def text_to_value_list(text):
+ values = []
+ if ',' in text:
+ commas = text.split(',')
+ elif '-' in text:
+ dashes = text.split('-')
+ for val in range(int(dashes[0]), int(dashes[-1]) + 1):
+ values.append(int(val))
+ commas = []
+ else:
+ values.append(int(text))
+ commas = []
+ for part in commas:
+ if '-' in part:
+ dashes = part.split('-')
+ for val in range(int(dashes[0]), int(dashes[-1]) + 1):
+ values.append(int(val))
+ else:
+ values.append(int(part))
+ return np.unique(values).tolist()
+
+
+# check if the clicked point is inside the image
+def check_point_in_image(
+ point, bandset_number=None, point_crs=None,
+ output_crs=None
+):
+ if bandset_number is None:
+ bandset_number = cfg.project_registry[cfg.reg_active_bandset_number]
+ bandset_x = cfg.bandset_catalog.get(bandset_number)
+ band_count = bandset_x.get_band_count()
+ if band_count == 0:
+ return False
+ cfg.logger.log.debug(
+ 'point: %s; bandset_number: %s' % (str(point), str(bandset_number))
+ )
+ band_crs = str(
+ cfg.bandset_catalog.get_bandset(bandset_number).bands[0].crs
+ )
+ band_left = cfg.bandset_catalog.get_bandset(bandset_number).bands[0].left
+ band_top = cfg.bandset_catalog.get_bandset(bandset_number).bands[0].top
+ band_right = cfg.bandset_catalog.get_bandset(bandset_number).bands[0].right
+ band_bottom = cfg.bandset_catalog.get_bandset(bandset_number).bands[
+ 0].bottom
+ if point_crs is None:
+ point_crs = cfg.util_qgis.get_qgis_crs().toWkt()
+ cfg.logger.log.debug(
+ 'point_crs: %s; band_crs: %s' % (str(point_crs), str(band_crs))
+ )
+ if band_crs is not None and point_crs is not None:
+ if cfg.util_gdal.compare_crs(point_crs, band_crs) is False:
+ try:
+ # noinspection PyTypeChecker
+ point = project_qgis_point_coordinates(
+ point, point_crs, band_crs
+ )
+ point_crs = band_crs
+ if point is False:
+ cfg.util_qgis.set_qgis_crs(band_crs)
+ cfg.logger.log.error('unable to project point')
+ return False
+ # Error latitude or longitude exceeded limits
+ except Exception as err:
+ cfg.logger.log.error(str(err))
+ return False
+ if (point.x() > band_right or point.x() < band_left
+ or point.y() > band_top or point.y() < band_bottom):
+ cfg.logger.log.debug('point check failed')
+ return False
+ if output_crs is not None:
+ if cfg.util_gdal.compare_crs(point_crs, output_crs) is False:
+ try:
+ point = project_qgis_point_coordinates(
+ point, point_crs, output_crs
+ )
+ if point is False:
+ cfg.logger.log.error('unable to project point')
+ return False
+ # Error latitude or longitude exceeded limits
+ except Exception as err:
+ cfg.logger.log.error(str(err))
+ return False
+ cfg.logger.log.debug('point check successful')
+ return point
+
+
+# Project point coordinates
+def project_qgis_point_coordinates(
+ point, input_coordinates, output_coordinates
+):
+ try:
+ # spatial reference
+ input_sr = osr.SpatialReference()
+ try:
+ input_sr.ImportFromWkt(input_coordinates.toWkt())
+ except Exception as err:
+ input_sr.ImportFromWkt(input_coordinates)
+ str(err)
+ output_sr = osr.SpatialReference()
+ try:
+ output_sr.ImportFromWkt(output_coordinates.toWkt())
+ except Exception as err:
+ output_sr.ImportFromWkt(output_coordinates)
+ str(err)
+ # required by GDAL 3 coordinate order
+ try:
+ input_sr.SetAxisMappingStrategy(osr.OAMS_TRADITIONAL_GIS_ORDER)
+ output_sr.SetAxisMappingStrategy(osr.OAMS_TRADITIONAL_GIS_ORDER)
+ except Exception as err:
+ str(err)
+ # Coordinate Transformation
+ transformation = osr.CoordinateTransformation(input_sr, output_sr)
+ point_proj = ogr.Geometry(ogr.wkbPoint)
+ point_proj.AddPoint(point.x(), point.y())
+ point_proj.Transform(transformation)
+ point_qgis = cfg.util_qgis.create_qgis_point(
+ point_proj.GetX(), point_proj.GetY()
+ )
+ return point_qgis
+ except Exception as err:
+ str(err)
+ return False
+
+
+# calculate the distance between points in array
+def pair_point_distance(numpy_array):
+ return cdist(numpy_array, numpy_array)
+
+
+# calculate random points in grid
+def random_points_in_grid(point_number, x_min, x_max, y_min, y_max):
+ x_coordinates = np.random.uniform(x_min, x_max, point_number)
+ y_coordinates = np.random.uniform(y_min, y_max, point_number)
+ points = list(zip(x_coordinates, y_coordinates))
+ return points
+
+
+# calculate random points with condition
+def random_points_with_condition(
+ raster_path, point_number, condition, x_min, y_top
+):
+ # get pixel size
+ x_size, y_size = cfg.util_gdal.get_pixel_size(raster_path)
+ points = []
+ # band array
+ _array = cfg.util_gdal.read_raster(raster_path)
+ condition = condition.replace(
+ cfg.qgis_registry[cfg.reg_raster_variable_name], '_array'
+ )
+ arr = np.argwhere(eval(condition))
+ rng = np.random.default_rng()
+ try:
+ pixels = rng.choice(arr, size=point_number)
+ except Exception as err:
+ cfg.logger.log.error(str(err))
+ return None
+ for pixel in pixels.tolist():
+ points.append(
+ [x_min + pixel[1] * x_size + x_size / 2,
+ y_top - pixel[0] * y_size - y_size / 2]
+ )
+ return points
+
+
+# create KML from map
+# noinspection SpellCheckingInspection
+def create_kml_from_map():
+ cfg.ui_utils.add_progress_bar()
+ cfg.ui_utils.update_bar(10)
+ ext1 = cfg.map_canvas.extent()
+ qgis_crs = cfg.util_qgis.get_qgis_crs()
+ crs_wgs_84 = QgsCoordinateReferenceSystem(4326)
+ cfg.util_qgis.set_qgis_crs(crs_wgs_84)
+ cfg.map_canvas.refreshAllLayers()
+ qApp.processEvents()
+ cfg.ui_utils.update_bar(30)
+ time.sleep(1)
+ qApp.processEvents()
+ ext = cfg.map_canvas.extent()
+ # date time for temp name
+ _time = get_time()
+ png = '%s/%sSCP_kml.png' % (cfg.temp_dir, _time)
+ kml = '%s/SCP_kml.kml' % cfg.temp_dir
+ cfg.map_canvas.setCanvasColor(Qt.transparent)
+ cfg.map_canvas.saveAsImage(png)
+ xml = '''
+ '
+ test_numpy_a = test_numpy()
+ if test_numpy_a:
+ message += '
'
+ cfg.dialog.ui.test_textBrowser.clear()
+ cfg.dialog.ui.test_textBrowser.setHtml(message)
+ try:
+ cfg.logger.log.debug('tests: %s' % message)
+ except Exception as err:
+ str(err)
+
+
+# test Remotior Sensus
+def test_remotior_sensus():
+ test = True
+ try:
+ import remotior_sensus
+ remotior_sensus.Session(n_processes=2, available_ram=10)
+ except Exception as err:
+ str(err)
+ test = False
+ return test
+
+
+# test multiprocess
+def test_multiprocess():
+ test = True
+ try:
+ import remotior_sensus
+ from remotior_sensus.core.processor_functions import (
+ raster_unique_values_with_sum
+ )
+ rs = remotior_sensus.Session(n_processes=2, available_ram=10)
+ raster_path = '%s/debug/raster.tif' % cfg.plugin_dir
+ rs.configurations.multiprocess.run(
+ raster_path=raster_path, function=raster_unique_values_with_sum,
+ n_processes=2, available_ram=100, keep_output_argument=True
+ )
+ except Exception as err:
+ str(err)
+ test = False
+ return test
+
+
+# test GDAL
+def test_gdal():
+ test = True
+ try:
+ from osgeo import gdal, ogr, osr
+ assert gdal.Translate
+ except Exception as err:
+ str(err)
+ test = False
+ return test
+
+
+# test GDAL
+def test_pytorch():
+ test = True
+ try:
+ # noinspection PyUnresolvedReferences
+ import torch
+ except Exception as err:
+ str(err)
+ test = False
+ return test
+
+
+# test scikit-learn
+def test_sklearn():
+ test = True
+ try:
+ from sklearn import svm
+ except Exception as err:
+ str(err)
+ test = False
+ return test
+
+
+# test internet connection
+def test_internet_connection():
+ test = True
+ try:
+ from remotior_sensus.util import download_tools
+ url = 'https://www.python.org'
+ temp = cfg.rs.configurations.temp.temporary_file_path(
+ name_suffix='.html'
+ )
+ download_tools.download_file(url=url, output_path=temp)
+ except Exception as err:
+ str(err)
+ test = False
+ return test
+
+
+# test Numpy
+def test_numpy():
+ test = True
+ try:
+ import numpy
+ numpy.count_nonzero([1, 1, 0])
+ except Exception as err:
+ str(err)
+ test = False
+ return test
+
+
+# test Scipy
+def test_scipy():
+ test = True
+ try:
+ import scipy
+ except Exception as err:
+ str(err)
+ test = False
+ return test
+
+
+# test Matplotlib
+def test_matplotlib():
+ test = True
+ try:
+ from matplotlib.ticker import MaxNLocator
+ except Exception as err:
+ str(err)
+ test = False
+ return test
diff --git a/interface/signature_threshold_tab.py b/interface/signature_threshold_tab.py
new file mode 100755
index 0000000..aa47887
--- /dev/null
+++ b/interface/signature_threshold_tab.py
@@ -0,0 +1,229 @@
+# SemiAutomaticClassificationPlugin
+# The Semi-Automatic Classification Plugin for QGIS allows for the supervised
+# classification of remote sensing images, providing tools for the download,
+# the preprocessing and postprocessing of images.
+# begin: 2012-12-29
+# Copyright (C) 2012-2023 by Luca Congedo.
+# Author: Luca Congedo
+# Email: ing.congedoluca@gmail.com
+#
+# This file is part of SemiAutomaticClassificationPlugin.
+# SemiAutomaticClassificationPlugin is free software: you can redistribute it
+# and/or modify 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.
+# SemiAutomaticClassificationPlugin 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 SemiAutomaticClassificationPlugin.
+# If not, see '
+ ''
+ ' '.format(color)
+ )
+ text += (
+ '{}; {}={} {} '.format(
+ len(values), name, QApplication.translate(
+ 'semiautomaticclassificationplugin', 'Pixel count'
+ ), pixel_count, QApplication.translate(
+ 'semiautomaticclassificationplugin', 'Wavelength'
+ )
+ )
+ )
+ for w in wavelengths:
+ text += '{} '.format(
+ int(100 / len(wavelengths)), str(w)
+ )
+ text += '%s ' % QApplication.translate(
+ 'semiautomaticclassificationplugin', 'Values'
+ )
+ for v in values:
+ text += '{} '.format(
+ int(100 / len(wavelengths)), str(round(v, 5))
+ )
+ text += '%s ' % QApplication.translate(
+ 'semiautomaticclassificationplugin', 'Standard deviation'
+ )
+ for s in standard_deviations:
+ text += '{} '.format(
+ int(100 / len(wavelengths)), str(round(s, 5))
+ )
+ text += '
'
+ cfg.spectral_plot_dlg.ui.value_textBrowser.append(text)
+
+ # calculate spectral distances
+ def calculate_spectral_distances(self):
+ cfg.logger.log.debug('calculate_spectral_distances')
+ try:
+ # clear distance values
+ cfg.spectral_plot_dlg.ui.distance_textBrowser.clear()
+ table = cfg.spectral_plot_dlg.ui.signature_list_plot_tableWidget
+ selected = []
+ for i in table.selectedIndexes():
+ selected.append(i.row())
+ selected = list(set(selected))
+ if len(selected) == 0:
+ count = table.rowCount()
+ selected = list(range(0, count))
+ signature_id_list = []
+ for row in selected:
+ signature_id = table.item(row, 6).text()
+ signature = self.plot_catalog.get_signature(
+ signature_id=signature_id
+ )
+ if signature.selected == 1:
+ signature_id_list.append(signature_id)
+ # calculate distances
+ combinations = list(iter_combinations(signature_id_list, 2))
+ for combination in combinations:
+ signature_x = self.plot_catalog.get_signature(
+ signature_id=combination[0]
+ )
+ signature_y = self.plot_catalog.get_signature(
+ signature_id=combination[1]
+ )
+ values_x = signature_x.value
+ values_y = signature_y.value
+ spectral_angle = cfg.rs.shared_tools.calculate_spectral_angle(
+ values_x=values_x, values_y=values_y
+ )
+ euclidean = cfg.rs.shared_tools.calculate_euclidean_distance(
+ values_x=values_x, values_y=values_y
+ )
+ (
+ bray_curtis
+ ) = cfg.rs.shared_tools.calculate_bray_curtis_similarity(
+ values_x=values_x, values_y=values_y
+ )
+ self.output_signature_distances(
+ signature_x.macroclass_id, signature_x.macroclass_name,
+ signature_x.class_id, signature_x.class_name,
+ signature_x.color, signature_y.macroclass_id,
+ signature_y.macroclass_name, signature_y.class_id,
+ signature_y.class_name, signature_y.color, spectral_angle,
+ euclidean, bray_curtis
+ )
+ cfg.input_interface.select_spectral_plot_settings_tab(2)
+ except Exception as err:
+ cfg.logger.log.error(str(err))
+ cfg.mx.msg_err_6()
+
+ # output signature distances
+ # noinspection PyTypeChecker
+ @staticmethod
+ def output_signature_distances(
+ macroclass_x, macroclass_name_x, class_x, class_name_x, color_x,
+ macroclass_y, macroclass_name_y, class_y, class_name_y, color_y,
+ spectral_angle, euclidean_distance, bray_curtis_similarity
+ ):
+ # distance names
+ euclidean_distance_name = QApplication.translate(
+ 'semiautomaticclassificationplugin', 'Euclidean distance'
+ )
+ bray_curtis_similarity_name = QApplication.translate(
+ 'semiautomaticclassificationplugin', 'Bray-Curtis similarity [%]'
+ )
+ spectral_angle_name = QApplication.translate(
+ 'semiautomaticclassificationplugin', 'Spectral angle'
+ )
+ highlight_color = 'red'
+ default_color = 'black'
+ if float(spectral_angle) < 10:
+ spectra_angle_color = highlight_color
+ else:
+ spectra_angle_color = default_color
+ if float(bray_curtis_similarity) > 90:
+ bray_curtis_color = highlight_color
+ else:
+ bray_curtis_color = default_color
+ if float(euclidean_distance) < 0.1:
+ euclidean_distance_color = highlight_color
+ else:
+ euclidean_distance_color = default_color
+ tbl = (
+ ' '.format(
+ color_x, macroclass_x, macroclass_name_x, class_x, class_name_x
+ )
+ )
+ tbl += (
+ ''
+ ' {}#{}; {}#{} '.format(
+ color_y, macroclass_y, macroclass_name_y, class_y, class_name_y
+ )
+ )
+ tbl += (
+ ''
+ ' {}#{}; {}#{} '.format(
+ spectral_angle_name, spectra_angle_color, spectral_angle
+ )
+ )
+ tbl += (
+ '{} '
+ '{} '.format(
+ euclidean_distance_name, euclidean_distance_color,
+ euclidean_distance
+ )
+ )
+ tbl += (
+ '{} '
+ '{} '.format(
+ bray_curtis_similarity_name, bray_curtis_color,
+ bray_curtis_similarity
+ )
+ )
+ tbl += '{} '
+ '{}
'
+ cfg.spectral_plot_dlg.ui.distance_textBrowser.append(tbl)
+
+ # signature list double click
+ def signature_list_double_click(self, index):
+ table = cfg.spectral_plot_dlg.ui.signature_list_plot_tableWidget
+ if index.column() == 5:
+ color = cfg.util_qt.select_color()
+ if color is not None:
+ selected = []
+ for i in table.selectedIndexes():
+ selected.append(i.row())
+ selected = list(set(selected))
+ for row in selected:
+ signature_id = table.item(row, 6).text()
+ self.plot_catalog.catalog[signature_id].color = (
+ color.toRgb().name()
+ )
+ table.item(row, 5).setBackground(color)
+ elif index.column() == 0:
+ self.select_all_signatures()
+ self.signature_plot()
+
+ # edited cell
+ def edited_cell(self, row, column):
+ table = cfg.spectral_plot_dlg.ui.signature_list_plot_tableWidget
+ signature_id = table.item(row, 6).text()
+ if column == 0:
+ if table.item(row, column).checkState() == 2:
+ self.plot_catalog.catalog[signature_id].selected = 1
+ else:
+ self.plot_catalog.catalog[signature_id].selected = 0
+ elif column == 1:
+ self.plot_catalog.catalog[signature_id].macroclass_id = int(
+ table.item(row, column).text()
+ )
+ elif column == 2:
+ self.plot_catalog.catalog[signature_id].macroclass_name = str(
+ table.item(row, column).text()
+ )
+ elif column == 3:
+ self.plot_catalog.catalog[signature_id].class_id = int(
+ table.item(row, column).text()
+ )
+ elif column == 4:
+ self.plot_catalog.catalog[signature_id].class_name = str(
+ table.item(row, column).text()
+ )
+ self.signature_plot()
+
+ # select all signatures
+ def select_all_signatures(self):
+ # select all
+ if self.select_all is True:
+ cfg.util_qt.all_items_set_state(
+ cfg.spectral_plot_dlg.ui.signature_list_plot_tableWidget, 2
+ )
+ for signature in self.plot_catalog.catalog:
+ self.plot_catalog.catalog[signature].selected = 1
+ # set check all plot
+ self.select_all = False
+ # unselect all if previously selected all
+ else:
+ cfg.util_qt.all_items_set_state(
+ cfg.spectral_plot_dlg.ui.signature_list_plot_tableWidget, 0
+ )
+ # set check all plot
+ self.select_all = True
+ for signature in self.plot_catalog.catalog:
+ self.plot_catalog.catalog[signature].selected = 0
+
+ # show signature plot
+ def show_signature_plot_t(self):
+ self.signature_list_plot_table()
+ cfg.spectral_plot_dlg.close()
+ cfg.spectral_plot_dlg.show()
+
+ # set plot legend max length
+ def set_plot_legend_length(self):
+ self.legend_max_chars = (
+ cfg.spectral_plot_dlg.ui.plot_text_spinBox.value()
+ )
+
+ # sigma checkbox
+ def sigma_checkbox(self):
+ if cfg.spectral_plot_dlg.ui.sigma_checkBox.isChecked():
+ self.sigma_check = True
+ else:
+ self.sigma_check = False
+ # Create plot
+ self.signature_plot()
+
+ # grid checkbox
+ def grid_checkbox(self):
+ if cfg.spectral_plot_dlg.ui.grid_checkBox.isChecked():
+ self.ax.grid(True)
+ else:
+ self.ax.grid(False)
+ # Create plot
+ self.signature_plot()
+
+ # refresh plot
+ def refresh_plot(self):
+ self.signature_plot()
diff --git a/spectralsignature/__init__.py b/spectral_signature/usgs_spectral_library/__init__.py
old mode 100644
new mode 100755
similarity index 100%
rename from spectralsignature/__init__.py
rename to spectral_signature/usgs_spectral_library/__init__.py
diff --git a/spectralsignature/usgs_spectral_library/artificial.csv b/spectral_signature/usgs_spectral_library/artificial.csv
old mode 100644
new mode 100755
similarity index 100%
rename from spectralsignature/usgs_spectral_library/artificial.csv
rename to spectral_signature/usgs_spectral_library/artificial.csv
diff --git a/spectralsignature/usgs_spectral_library/coatings.csv b/spectral_signature/usgs_spectral_library/coatings.csv
old mode 100644
new mode 100755
similarity index 100%
rename from spectralsignature/usgs_spectral_library/coatings.csv
rename to spectral_signature/usgs_spectral_library/coatings.csv
diff --git a/spectralsignature/usgs_spectral_library/liquids.csv b/spectral_signature/usgs_spectral_library/liquids.csv
old mode 100644
new mode 100755
similarity index 100%
rename from spectralsignature/usgs_spectral_library/liquids.csv
rename to spectral_signature/usgs_spectral_library/liquids.csv
diff --git a/spectralsignature/usgs_spectral_library/minerals.csv b/spectral_signature/usgs_spectral_library/minerals.csv
old mode 100644
new mode 100755
similarity index 100%
rename from spectralsignature/usgs_spectral_library/minerals.csv
rename to spectral_signature/usgs_spectral_library/minerals.csv
diff --git a/spectralsignature/usgs_spectral_library/organics.csv b/spectral_signature/usgs_spectral_library/organics.csv
old mode 100644
new mode 100755
similarity index 100%
rename from spectralsignature/usgs_spectral_library/organics.csv
rename to spectral_signature/usgs_spectral_library/organics.csv
diff --git a/spectralsignature/usgs_spectral_library/soils.csv b/spectral_signature/usgs_spectral_library/soils.csv
old mode 100644
new mode 100755
similarity index 100%
rename from spectralsignature/usgs_spectral_library/soils.csv
rename to spectral_signature/usgs_spectral_library/soils.csv
diff --git a/spectralsignature/usgs_spectral_library/vegetation.csv b/spectral_signature/usgs_spectral_library/vegetation.csv
old mode 100644
new mode 100755
similarity index 100%
rename from spectralsignature/usgs_spectral_library/vegetation.csv
rename to spectral_signature/usgs_spectral_library/vegetation.csv
diff --git a/spectralsignature/scatter_plot.py b/spectralsignature/scatter_plot.py
deleted file mode 100644
index 045efe8..0000000
--- a/spectralsignature/scatter_plot.py
+++ /dev/null
@@ -1,996 +0,0 @@
-# -*- coding: utf-8 -*-
-'''
-/**************************************************************************************************************************
- SemiAutomaticClassificationPlugin
-
- The Semi-Automatic Classification Plugin for QGIS allows for the supervised classification of remote sensing images,
- The Semi-Automatic Classification Plugin for QGIS allows for the supervised classification of remote sensing images,
- providing tools for the download, the preprocessing and postprocessing of images.
-
- -------------------
- begin : 2012-12-29
- copyright : (C) 2012-2021 by Luca Congedo
- email : ing.congedoluca@gmail.com
-**************************************************************************************************************************/
-
-/**************************************************************************************************************************
- *
- * This file is part of Semi-Automatic Classification Plugin
- *
- * Semi-Automatic Classification Plugin is free software: you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software Foundation,
- * version 3 of the License.
- *
- * Semi-Automatic Classification Plugin 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
- * Semi-Automatic Classification Plugin. If not, see
"
- cfg.uisp.value_textBrowser.append(tbl)
- cfg.uisp.value_textBrowser.append("" + str(cfg.fldMacroID_class) + " = " + str(macroclassID) + " " + str(cfg.fldROIMC_info) + " = " + str(macroclassInfo) + " " + str(cfg.fldID_class) + " = " + str(classID) + " " + str(cfg.fldROI_info) + " = " + str(classInfo) + " " + str(cfg.ROI_Size_info) + " = " + str(ROISize) + " pixels " + cfg.wavelenNm + " [" + str(wavelength_unit) + "] "
- for w in wavelengths:
- tbl = tbl + "" + str(w) + " "
- tbl = tbl + "" + cfg.valNm + " "
- for v in values:
- tbl = tbl + "" + str(round(v, 5)) + " "
- tbl = tbl + "" + cfg.standDevNm + " "
- for s in standardDeviation:
- tbl = tbl + "" + str(round(s, 5)) + " "
- tbl = tbl + "
")
-
- # signature distances
- def signatureDistances(self, macroclassID1, macroclassInfo1, classID1, classInfo1, color1, macroclassID2, macroclassInfo2, classID2, classInfo2, color2, jeffriesMatusitaDistance, spectralAngle, euclideanDistance, brayCurtisSimilarity, transformedDivergence = 'No'):
- highlightColor = "red"
- jMColor = "black"
- try:
- if float(jeffriesMatusitaDistance) < 1.5:
- jMColor = highlightColor
- except:
- pass
- tDColor = "black"
- if transformedDivergence != 'No':
- if float(transformedDivergence) < 1.5:
- tDColor = highlightColor
- sAColor = "black"
- if float(spectralAngle) < 10:
- sAColor = highlightColor
- bCColor = "black"
- if float(brayCurtisSimilarity) > 90:
- bCColor = highlightColor
- mDColor = "black"
- if float(euclideanDistance) < 0.1:
- mDColor = highlightColor
- tbl = "
"
- cfg.uisp.distance_textBrowser.append(tbl)
- cfg.uisp.distance_textBrowser.append("" + str(cfg.fldMacroID_class) + " = " + str(macroclassID1) + " " + str(cfg.fldROIMC_info) + " = " + str(macroclassInfo1) + " " + str(cfg.fldID_class) + " = " + str(classID1) + " " + str(cfg.fldROI_info) + " = " + str(classInfo1) + " " + str(cfg.fldMacroID_class) + " = " + str(macroclassID2) + " " + str(cfg.fldROIMC_info) + " = " + str(macroclassInfo2) + " " + str(cfg.fldID_class) + " = " + str(classID2) + " " + str(cfg.fldROI_info) + " = " + str(classInfo2)
- tbl = tbl + " "
- tbl = tbl + "" + cfg.jeffriesMatusitaDistNm + " " + str(jeffriesMatusitaDistance) + " "
- tbl = tbl + "" + cfg.spectralAngleNm + " " + str(spectralAngle) + " "
- tbl = tbl + "" + cfg.euclideanDistNm + " " + str(euclideanDistance) + " "
- if transformedDivergence != 'No':
- tbl = tbl + "" + cfg.brayCurtisSimNm + " " + str(brayCurtisSimilarity) + " "
- tbl = tbl + "" + cfg.transformedDivergenceNm + " " + str(transformedDivergence) + "
")
-
- # signature list double click
- def signatureListDoubleClick(self, index):
- if index.column() == 5:
- c = cfg.utls.selectColor()
- if c is not None:
- tW = cfg.uisp.signature_list_plot_tableWidget
- vx = cfg.bandSetsList[cfg.bndSetNumber][2] * 2 + 6
- r = []
- for i in tW.selectedIndexes():
- r.append(i.row())
- v = list(set(r))
- for x in v:
- k = cfg.uisp.signature_list_plot_tableWidget.item(x, vx).text()
- cfg.spectrPlotList["COLOR_" + str(k)] = c
- cfg.uisp.signature_list_plot_tableWidget.item(x, 5).setBackground(c)
- elif index.column() == 0:
- for k in list(cfg.signPlotIDs.values()):
- if cfg.allSignCheck2 == 'Yes':
- v = 2
- else:
- v = 0
- cfg.spectrPlotList["CHECKBOX_" + str(k)] = v
- self.selectAllSignatures()
- # logger
- cfg.utls.logCondition(str(cfg.inspectSCP.stack()[0][3])+ " " + cfg.utls.lineOfCode(), " signatures index: " + str(index))
-
- # select all signatures
- def selectAllSignatures(self):
- try:
- cfg.uiUtls.addProgressBar()
- # select all
- if cfg.allSignCheck2 == 'Yes':
- cfg.utls.allItemsSetState(cfg.uisp.signature_list_plot_tableWidget, 2)
- # set check all plot
- cfg.allSignCheck2 = 'No'
- # unselect all if previously selected all
- elif cfg.allSignCheck2 == 'No':
- cfg.utls.allItemsSetState(cfg.uisp.signature_list_plot_tableWidget, 0)
- # set check all plot
- cfg.allSignCheck2 = 'Yes'
- cfg.uiUtls.removeProgressBar()
- # logger
- cfg.utls.logCondition(str(__name__) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), " all signatures")
- except Exception as err:
- # logger
- cfg.utls.logCondition(str(__name__) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), " ERROR exception: " + str(err))
- cfg.uiUtls.removeProgressBar()
-
- # show signature plot
- def showSignaturePlotT(self):
- cfg.spSigPlot.signatureListPlotTable(cfg.uisp.signature_list_plot_tableWidget)
- cfg.spectralplotdlg.close()
- cfg.spectralplotdlg.show()
-
- # include Checkbox
- def includeCheckbox(self):
- cfg.uisp.LCS_cut_checkBox_2.blockSignals(True)
- cfg.ui.LCS_include_checkBox.blockSignals(True)
- cfg.ui.LCS_cut_checkBox.blockSignals(True)
- if cfg.uisp.LCS_include_checkBox_2.isChecked():
- cfg.ui.LCS_cut_checkBox.setCheckState(0)
- cfg.ui.LCS_include_checkBox.setCheckState(2)
- cfg.uisp.LCS_cut_checkBox_2.setCheckState(0)
- else:
- cfg.ui.LCS_cut_checkBox.setCheckState(2)
- cfg.ui.LCS_include_checkBox.setCheckState(0)
- cfg.uisp.LCS_cut_checkBox_2.setCheckState(2)
- cfg.ui.LCS_cut_checkBox.blockSignals(False)
- cfg.ui.LCS_include_checkBox.blockSignals(False)
- cfg.uisp.LCS_cut_checkBox_2.blockSignals(False)
-
- # cut Checkbox
- def cutCheckbox(self):
- cfg.uisp.LCS_include_checkBox_2.blockSignals(True)
- cfg.ui.LCS_include_checkBox.blockSignals(True)
- cfg.ui.LCS_cut_checkBox.blockSignals(True)
- if cfg.uisp.LCS_cut_checkBox_2.isChecked():
- cfg.ui.LCS_include_checkBox.setCheckState(0)
- cfg.uisp.LCS_include_checkBox_2.setCheckState(0)
- cfg.ui.LCS_cut_checkBox.setCheckState(2)
- else:
- cfg.ui.LCS_include_checkBox.setCheckState(2)
- cfg.uisp.LCS_include_checkBox_2.setCheckState(2)
- cfg.ui.LCS_cut_checkBox.setCheckState(0)
- cfg.ui.LCS_include_checkBox.blockSignals(False)
- cfg.uisp.LCS_include_checkBox_2.blockSignals(False)
- cfg.ui.LCS_cut_checkBox.blockSignals(False)
-
- # Activate pointer for pixel threshold
- def pointerActive(self):
- # connect to click
- t = cfg.LCSPixel2
- cfg.cnvs.setMapTool(t)
- px = cfg.QtGuiSCP.QPixmap(":/pointer/icons/pointer/LCS_pointer.svg")
- c = cfg.QtGuiSCP.QCursor(px)
- cfg.cnvs.setCursor(c)
- # logger
- cfg.utls.logCondition(str(__name__) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), "pointer active: LCS pixel")
-
- # left click ROI pointer for pixel signature
- def pointerLeftClick(self, point):
- tW = cfg.uisp.signature_list_plot_tableWidget
- iR = []
- for i in tW.selectedIndexes():
- iR.append(i.row())
- v = list(set(iR))
- point = cfg.utls.checkPointImage(cfg.bandSetsList[cfg.bndSetNumber][8], point)
- if cfg.pntCheck == 'Yes':
- sig = cfg.utls.calculatePixelSignature(point, cfg.bandSetsList[cfg.bndSetNumber][8], cfg.bndSetNumber, "Pixel")
- if len(v) == 0:
- count = tW.rowCount()
- v = list(range(0, count))
- if len(v) > 1:
- # ask for confirm
- a = cfg.utls.questionBox(cfg.QtWidgetsSCP.QApplication.translate("semiautomaticclassificationplugin", "Set thresholds"), cfg.QtWidgetsSCP.QApplication.translate("semiautomaticclassificationplugin", "Are you sure you want to set thresholds for several signatures?"))
- if a == 'Yes':
- pass
- else:
- return 'No'
- cfg.uiUtls.addProgressBar()
- self.tableEdited = 'No'
- tW.blockSignals(True)
- tW.setSortingEnabled(False)
- progrStep = 0
- cfg.undoIDList = {}
- cfg.undoSpectrPlotList = {}
- for x in reversed(v):
- progrStep = progrStep + 100/(len(v))
- cfg.uiUtls.updateBar(int(progrStep))
- idCol = cfg.bandSetsList[cfg.bndSetNumber][2] * 2 + 6
- id = tW.item(x, idCol).text()
- # undo list
- cfg.undoIDList["ID_" + str(id)] = str(id)
- cfg.undoSpectrPlotList["LCS_MIN_" + str(id)] = cfg.spectrPlotList["LCS_MIN_" + str(id)]
- cfg.undoSpectrPlotList["LCS_MAX_" + str(id)] = cfg.spectrPlotList["LCS_MAX_" + str(id)]
- cfg.uisp.undo_threshold_Button.setEnabled(True)
- # values
- val = cfg.spectrPlotList["VALUES_" + str(id)]
- vb = 6
- for b in range(0, cfg.bandSetsList[cfg.bndSetNumber][2]):
- sigVal = sig[b]
- valMax = float(cfg.spectrPlotList["LCS_MAX_" + str(id)][b])
- valMin = float(cfg.spectrPlotList["LCS_MIN_" + str(id)][b])
- if sigVal >= val[b * 2]:
- if cfg.uisp.LCS_include_checkBox_2.isChecked():
- if sigVal >= valMax:
- max = sigVal + 1e-12
- else:
- max = valMax
- else:
- if sigVal >= valMax:
- max = valMax
- else:
- max = sigVal - 1e-12
- min = valMin
- else:
- if cfg.uisp.LCS_include_checkBox_2.isChecked():
- if sigVal <= valMin:
- min = sigVal - 1e-12
- else:
- min = valMin
- else:
- if sigVal <= valMin:
- min = valMin
- else:
- min = sigVal + 1e-12
- max = valMax
- cfg.utls.setTableItem(tW, x, vb, str(min))
- vb = vb + 1
- cfg.utls.setTableItem(tW, x, vb, str(max))
- vb = vb + 1
- tW.blockSignals(False)
- tW.setSortingEnabled(True)
- self.tableEdited = 'Yes'
- self.readThresholdTable()
- cfg.LCSignT.LCSignatureThresholdListTable()
- cfg.spSigPlot.refreshPlot()
- cfg.utls.selectRowsInTable(tW, v)
- cfg.uiUtls.removeProgressBar()
-
- # ordered table
- def orderedTable(self, column):
- self.orderColumn = column
- tW = cfg.uisp.signature_list_plot_tableWidget
- count = tW.rowCount()
- v = list(range(0, count))
- vx = cfg.bandSetsList[cfg.bndSetNumber][2] * 2 + 6
- for x in v:
- id = tW.item(x, vx).text()
- cfg.spectrPlotList["ROW_" + str(id)] = x
-
- # set minimum and maximum
- def setMinimumMaximum(self):
- tW = cfg.uisp.signature_list_plot_tableWidget
- iR = []
- for i in tW.selectedIndexes():
- iR.append(i.row())
- v = list(set(iR))
- if len(v) == 0:
- count = tW.rowCount()
- v = list(range(0, count))
- if len(v) > 1:
- # ask for confirm
- a = cfg.utls.questionBox(cfg.QtWidgetsSCP.QApplication.translate("semiautomaticclassificationplugin", "Set thresholds"), cfg.QtWidgetsSCP.QApplication.translate("semiautomaticclassificationplugin", "Are you sure you want to set thresholds for several signatures?"))
- if a == 'Yes':
- pass
- else:
- return 'No'
- cfg.uiUtls.addProgressBar()
- self.tableEdited = 'No'
- tW.setSortingEnabled(False)
- tW.blockSignals(True)
- progrStep = 0
- cfg.undoIDList = {}
- cfg.undoSpectrPlotList = {}
- for x in reversed(v):
- progrStep = progrStep + 100/(len(v))
- cfg.uiUtls.updateBar(int(progrStep))
- idCol = cfg.bandSetsList[cfg.bndSetNumber][2] * 2 + 6
- id = tW.item(x, idCol).text()
- # undo list
- cfg.undoIDList["ID_" + str(id)] = str(id)
- cfg.undoSpectrPlotList["LCS_MIN_" + str(id)] = cfg.spectrPlotList["LCS_MIN_" + str(id)]
- cfg.undoSpectrPlotList["LCS_MAX_" + str(id)] = cfg.spectrPlotList["LCS_MAX_" + str(id)]
- cfg.uisp.undo_threshold_Button.setEnabled(True)
- vb = 6
- for b in range(0, cfg.bandSetsList[cfg.bndSetNumber][2]):
- min = float(cfg.spectrPlotList["MIN_VALUE_" + str(id)][b])
- max = float(cfg.spectrPlotList["MAX_VALUE_" + str(id)][b])
- cfg.utls.addTableItem(tW, str(min), x, vb)
- vb = vb + 1
- cfg.utls.addTableItem(tW, str(max), x, vb)
- vb = vb + 1
- tW.blockSignals(False)
- tW.setSortingEnabled(True)
- self.tableEdited = 'Yes'
- self.readThresholdTable()
- cfg.LCSignT.LCSignatureThresholdListTable()
- cfg.spSigPlot.refreshPlot()
- cfg.utls.selectRowsInTable(tW, v)
- cfg.uiUtls.removeProgressBar()
- # logger
- cfg.utls.logCondition(str(__name__) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), "set")
-
- # undo threshold
- def undoThreshold(self):
- # ask for confirm
- a = cfg.utls.questionBox(cfg.QtWidgetsSCP.QApplication.translate("semiautomaticclassificationplugin", "Undo thresholds"), cfg.QtWidgetsSCP.QApplication.translate("semiautomaticclassificationplugin", "Are you sure you want to undo thresholds?"))
- if a == 'Yes':
- pass
- else:
- return 'No'
- tW = cfg.uisp.signature_list_plot_tableWidget
- cfg.uiUtls.addProgressBar()
- self.tableEdited = 'No'
- tW.blockSignals(True)
- tW.setSortingEnabled(False)
- progrStep = 20
- idCol = cfg.bandSetsList[cfg.bndSetNumber][2] * 2 + 6
- c = tW.rowCount()
- for x in range(0, c):
- idT = tW.item(x, idCol).text()
- if idT in list(cfg.undoIDList.values()):
- progrStep = progrStep +80/(len(list(cfg.undoIDList.values())))
- cfg.uiUtls.updateBar(int(progrStep))
- vb = 6
- for b in range(0, cfg.bandSetsList[cfg.bndSetNumber][2]):
- cfg.utls.addTableItem(tW, str(cfg.undoSpectrPlotList["LCS_MIN_" + str(idT)][b]), x, vb)
- vb = vb + 1
- cfg.utls.addTableItem(tW, str(cfg.undoSpectrPlotList["LCS_MAX_" + str(idT)][b]), x, vb)
- vb = vb + 1
- tW.blockSignals(False)
- tW.setSortingEnabled(True)
- self.tableEdited = 'Yes'
- cfg.uisp.undo_threshold_Button.setEnabled(False)
- cfg.undoIDList = {}
- cfg.undoSpectrPlotList = {}
- self.readThresholdTable()
- cfg.LCSignT.LCSignatureThresholdListTable()
- cfg.spSigPlot.refreshPlot()
- cfg.uiUtls.removeProgressBar()
- # logger
- cfg.utls.logCondition(str(__name__) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), "undo")
-
- # set threshold from ROI
- def ROIThreshold(self):
- if cfg.lstROI is not None:
- tW = cfg.uisp.signature_list_plot_tableWidget
- iR = []
- for i in tW.selectedIndexes():
- iR.append(i.row())
- v = list(set(iR))
- if len(v) == 0:
- count = tW.rowCount()
- v = list(range(0, count))
- if len(v) > 1:
- # ask for confirm
- a = cfg.utls.questionBox(cfg.QtWidgetsSCP.QApplication.translate("semiautomaticclassificationplugin", "Set thresholds"), cfg.QtWidgetsSCP.QApplication.translate("semiautomaticclassificationplugin", "Are you sure you want to set thresholds for several signatures?"))
- if a == 'Yes':
- pass
- else:
- return 'No'
- cfg.uiUtls.addProgressBar()
- self.tableEdited = 'No'
- tW.blockSignals(True)
- tW.setSortingEnabled(False)
- progrStep = 0
- # calculate ROI
- fID = cfg.utls.getLastFeatureID(cfg.lstROI)
- cfg.utls.calculateSignature(cfg.lstROI, cfg.bandSetsList[cfg.bndSetNumber][8], [fID], 0, cfg.tmpROINm, 0, 0, 0, 20, "MinMax", "MinMax", None)
- progrStep = 20
- cfg.undoIDList = {}
- cfg.undoSpectrPlotList = {}
- for x in reversed(v):
- progrStep = progrStep +80/(len(v))
- cfg.uiUtls.updateBar(int(progrStep))
- idCol = cfg.bandSetsList[cfg.bndSetNumber][2] * 2 + 6
- id = tW.item(x, idCol).text()
- # undo list
- cfg.undoIDList["ID_" + str(id)] = str(id)
- cfg.undoSpectrPlotList["LCS_MIN_" + str(id)] = cfg.spectrPlotList["LCS_MIN_" + str(id)]
- cfg.undoSpectrPlotList["LCS_MAX_" + str(id)] = cfg.spectrPlotList["LCS_MAX_" + str(id)]
- cfg.uisp.undo_threshold_Button.setEnabled(True)
- # values
- val = cfg.spectrPlotList["VALUES_" + str(id)]
- vb = 6
- for b in range(0, cfg.bandSetsList[cfg.bndSetNumber][2]):
- stats = cfg.tblOut["BAND_" + str(b + 1)]
- min = stats[0]
- max = stats[1]
- if cfg.uisp.LCS_include_checkBox_2.isChecked():
- if cfg.np.around(float(tW.item(x, vb).text()), 11) > cfg.np.around(min, 11):
- cfg.utls.addTableItem(tW, str(min - 1e-12), x, vb)
- else:
- if cfg.np.around(float(tW.item(x, vb).text()), 11) < cfg.np.around(min, 11):
- if min >= val[b * 2]:
- if min < cfg.np.around(float(tW.item(x, vb + 1).text()), 11):
- cfg.utls.addTableItem(tW, str(min + 1e-12), x, vb + 1)
- else:
- cfg.utls.addTableItem(tW, str(min + 1e-12), x, vb)
- vb = vb + 1
- if cfg.uisp.LCS_include_checkBox_2.isChecked():
- if cfg.np.around(float(tW.item(x, vb).text()), 11) < cfg.np.around(max, 11):
- cfg.utls.addTableItem(tW, str(max + 1e-12), x, vb)
- else:
- if cfg.np.around(float(tW.item(x, vb).text()), 11) > cfg.np.around(max, 11):
- if max <= val[b * 2]:
- if max > cfg.np.around(float(tW.item(x, vb - 1).text()), 11):
- cfg.utls.addTableItem(tW, str(max - 1e-12), x, vb - 1)
- else:
- cfg.utls.addTableItem(tW, str(max - 1e-12), x, vb)
- vb = vb + 1
- tW.blockSignals(False)
- tW.setSortingEnabled(True)
- self.tableEdited = 'Yes'
- self.readThresholdTable()
- cfg.LCSignT.LCSignatureThresholdListTable()
- cfg.spSigPlot.refreshPlot()
- cfg.utls.selectRowsInTable(tW, v)
- cfg.uiUtls.removeProgressBar()
- # logger
- cfg.utls.logCondition(str(__name__) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), "set")
-
- # set weights based on variance
- def setAllWeightsVariance(self):
- tW = cfg.uisp.signature_list_plot_tableWidget
- iR = []
- for i in tW.selectedIndexes():
- iR.append(i.row())
- v = list(set(iR))
- if len(v) == 0:
- count = tW.rowCount()
- v = list(range(0, count))
- if len(v) > 1:
- # ask for confirm
- a = cfg.utls.questionBox(cfg.QtWidgetsSCP.QApplication.translate("semiautomaticclassificationplugin", "Set thresholds"), cfg.QtWidgetsSCP.QApplication.translate("semiautomaticclassificationplugin", "Are you sure you want to set thresholds for several signatures?"))
- if a == 'Yes':
- pass
- else:
- return 'No'
- cfg.uiUtls.addProgressBar()
- self.tableEdited = 'No'
- tW.blockSignals(True)
- tW.setSortingEnabled(False)
- progrStep = 0
- cfg.undoIDList = {}
- cfg.undoSpectrPlotList = {}
- for x in reversed(v):
- progrStep = progrStep + 100/(len(v))
- cfg.uiUtls.updateBar(int(progrStep))
- cfg.QtWidgetsSCP.qApp.processEvents()
- idCol = cfg.bandSetsList[cfg.bndSetNumber][2] * 2 + 6
- id = tW.item(x, idCol).text()
- # undo list
- cfg.undoIDList["ID_" + str(id)] = str(id)
- cfg.undoSpectrPlotList["LCS_MIN_" + str(id)] = cfg.spectrPlotList["LCS_MIN_" + str(id)]
- cfg.undoSpectrPlotList["LCS_MAX_" + str(id)] = cfg.spectrPlotList["LCS_MAX_" + str(id)]
- cfg.uisp.undo_threshold_Button.setEnabled(True)
- # values
- val = cfg.spectrPlotList["VALUES_" + str(id)]
- vb = 6
- for b in range(0, cfg.bandSetsList[cfg.bndSetNumber][2]):
- sd = val[b * 2 +1]
- cfg.utls.addTableItem(tW, str(val[b * 2] - (sd * cfg.uisp.multiplicative_threshold_doubleSpinBox_2.value())), x, vb)
- vb = vb + 1
- cfg.utls.addTableItem(tW, str(val[b * 2] + (sd * cfg.uisp.multiplicative_threshold_doubleSpinBox_2.value())), x, vb)
- vb = vb + 1
- tW.blockSignals(False)
- tW.setSortingEnabled(True)
- self.tableEdited = 'Yes'
- self.readThresholdTable()
- cfg.LCSignT.LCSignatureThresholdListTable()
- cfg.spSigPlot.refreshPlot()
- cfg.utls.selectRowsInTable(tW, v)
- cfg.uiUtls.removeProgressBar()
- # logger
- cfg.utls.logCondition(str(__name__) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), "set")
-
- # set plot legend max lenght
- def setPlotLegendLenght(self):
- cfg.sigPLRoundCharList = cfg.uisp.plot_text_spinBox.value()
- # logger
- cfg.utls.logCondition(str(__name__) + '-' + str(cfg.inspectSCP.stack()[0][3])+ ' ' + cfg.utls.lineOfCode(), "plot legend max length value changed to: " + str(cfg.sigPLRoundCharList))
-
\ No newline at end of file
diff --git a/spectralsignature/usgs_spectral_lib.py b/spectralsignature/usgs_spectral_lib.py
deleted file mode 100644
index ae41c8c..0000000
--- a/spectralsignature/usgs_spectral_lib.py
+++ /dev/null
@@ -1,235 +0,0 @@
-# -*- coding: utf-8 -*-
-'''
-/**************************************************************************************************************************
- SemiAutomaticClassificationPlugin
-
- The Semi-Automatic Classification Plugin for QGIS allows for the supervised classification of remote sensing images,
- The Semi-Automatic Classification Plugin for QGIS allows for the supervised classification of remote sensing images,
- providing tools for the download, the preprocessing and postprocessing of images.
-
- -------------------
- begin : 2012-12-29
- copyright : (C) 2012-2021 by Luca Congedo
- email : ing.congedoluca@gmail.com
-**************************************************************************************************************************/
-
-/**************************************************************************************************************************
- *
- * This file is part of Semi-Automatic Classification Plugin
- *
- * Semi-Automatic Classification Plugin is free software: you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software Foundation,
- * version 3 of the License.
- *
- * Semi-Automatic Classification Plugin 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
- * Semi-Automatic Classification Plugin. If not, see
Export download links to a text file
")) + self.export_links_Button.setText(_translate("SemiAutomaticClassificationPlugin", "Import library")) + self.virtual_download_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, download as virtual file only the portion of the image defined by search coordinates (does not work for all the sources)
")) + self.virtual_download_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Virtual download")) + self.preprocess_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Preprocess images
")) + self.preprocess_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Preprocess images")) + self.download_images_Button.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Run
")) + self.download_images_Button.setText(_translate("SemiAutomaticClassificationPlugin", " RUN")) + self.checkBoxs_band_1.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Landsat / Sentinel
")) + self.checkBoxs_band_1.setText(_translate("SemiAutomaticClassificationPlugin", "1")) + self.checkBoxs_band_8A.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Sentinel
")) + self.checkBoxs_band_8A.setText(_translate("SemiAutomaticClassificationPlugin", "8A")) + self.checkBoxs_band_4.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Landsat / Sentinel
")) + self.checkBoxs_band_4.setText(_translate("SemiAutomaticClassificationPlugin", "4")) + self.checkBoxs_band_11.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Landsat / Sentinel
")) + self.checkBoxs_band_11.setText(_translate("SemiAutomaticClassificationPlugin", "11")) + self.checkBoxs_band_5.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Landsat / Sentinel
")) + self.checkBoxs_band_5.setText(_translate("SemiAutomaticClassificationPlugin", "5")) + self.checkBoxs_band_6.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Landsat / Sentinel
")) + self.checkBoxs_band_6.setText(_translate("SemiAutomaticClassificationPlugin", "6")) + self.checkBoxs_band_7.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Landsat / Sentinel
")) + self.checkBoxs_band_7.setText(_translate("SemiAutomaticClassificationPlugin", "7")) + self.checkBoxs_band_2.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Landsat / Sentinel
")) + self.checkBoxs_band_2.setText(_translate("SemiAutomaticClassificationPlugin", "2")) + self.checkBoxs_band_9.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Landsat / Sentinel
")) + self.checkBoxs_band_9.setText(_translate("SemiAutomaticClassificationPlugin", "9")) + self.check_toolButton_2.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Select all
")) + self.check_toolButton_2.setText(_translate("SemiAutomaticClassificationPlugin", "Plot")) + self.ancillary_data_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Ancillary data")) + self.checkBoxs_band_3.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Landsat / Sentinel
")) + self.checkBoxs_band_3.setText(_translate("SemiAutomaticClassificationPlugin", "3")) + self.checkBoxs_band_8.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Landsat / Sentinel
")) + self.checkBoxs_band_8.setText(_translate("SemiAutomaticClassificationPlugin", "8")) + self.checkBoxs_band_10.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Landsat / Sentinel
")) + self.checkBoxs_band_10.setText(_translate("SemiAutomaticClassificationPlugin", "10")) + self.checkBoxs_band_12.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Sentinel
")) + self.checkBoxs_band_12.setText(_translate("SemiAutomaticClassificationPlugin", "12")) + self.label_3.setText(_translate("SemiAutomaticClassificationPlugin", "Bands")) + self.SCP_tabs.setTabText(self.SCP_tabs.indexOf(self.tab_download_products), _translate("SemiAutomaticClassificationPlugin", "Download products")) + self.label_126.setText(_translate("SemiAutomaticClassificationPlugin", "RGB composite")) self.sort_by_name_toolButton_2.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Sort RGB automatically
")) self.sort_by_name_toolButton_2.setText(_translate("SemiAutomaticClassificationPlugin", "Import library")) self.move_down_toolButton_3.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Move highlighted RGB down
")) @@ -9465,42 +6648,7 @@ def retranslateUi(self, SemiAutomaticClassificationPlugin): self.label_192.setText(_translate("SemiAutomaticClassificationPlugin", "Band combinations")) self.all_RGB_list_toolButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Add all combinations of bands
")) self.all_RGB_list_toolButton.setText(_translate("SemiAutomaticClassificationPlugin", "Import library")) - self.tabWidget_5.setTabText(self.tabWidget_5.indexOf(self.tab_RGB), _translate("SemiAutomaticClassificationPlugin", "RGB list")) - self.label_208.setText(_translate("SemiAutomaticClassificationPlugin", "Band set list")) - self.band_set_filter_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Filter
")) - self.band_set_filter_lineEdit.setPlaceholderText(_translate("SemiAutomaticClassificationPlugin", "Filter")) - item = self.band_set_list_tableWidget.horizontalHeaderItem(0) - item.setText(_translate("SemiAutomaticClassificationPlugin", "Number")) - item = self.band_set_list_tableWidget.horizontalHeaderItem(1) - item.setText(_translate("SemiAutomaticClassificationPlugin", "Bands")) - item = self.band_set_list_tableWidget.horizontalHeaderItem(2) - item.setText(_translate("SemiAutomaticClassificationPlugin", "Date")) - self.move_down_toolButton_4.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Move highlighted Band sets down
")) - self.move_down_toolButton_4.setText(_translate("SemiAutomaticClassificationPlugin", "Import library")) - self.move_up_toolButton_4.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Move highlighted Band sets up
")) - self.move_up_toolButton_4.setText(_translate("SemiAutomaticClassificationPlugin", "Import library")) - self.rgb_toolButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Add row
")) - self.rgb_toolButton.setText(_translate("SemiAutomaticClassificationPlugin", "Plot")) - self.add_bandset_pushButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Add row
")) - self.add_bandset_pushButton.setText(_translate("SemiAutomaticClassificationPlugin", "Plot")) - self.export_bandset_List_toolButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Export Band set list to file
")) - self.export_bandset_List_toolButton.setText(_translate("SemiAutomaticClassificationPlugin", "Plot")) - self.import_bandset_List_toolButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Import Band set list from file
")) - self.import_bandset_List_toolButton.setText(_translate("SemiAutomaticClassificationPlugin", "Plot")) - self.remove_bandset_toolButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Delete row
")) - self.remove_bandset_toolButton.setText(_translate("SemiAutomaticClassificationPlugin", "Plot")) - self.sort_by_date.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Sort band sets by date
")) - self.sort_by_date.setText(_translate("SemiAutomaticClassificationPlugin", "Import library")) - self.tabWidget_5.setTabText(self.tabWidget_5.indexOf(self.tab_band_set_list), _translate("SemiAutomaticClassificationPlugin", "Band set list")) - self.label_79.setText(_translate("SemiAutomaticClassificationPlugin", "Algorithm band weight")) - self.reset_weights_pushButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Reset
\n" -"")) - self.set_weight_value_pushButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Set
\n" -"")) - self.label_131.setText(_translate("SemiAutomaticClassificationPlugin", "Set weight")) - self.weight_doubleSpinBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Set a value
")) - self.label_93.setText(_translate("SemiAutomaticClassificationPlugin", "Automatic weight")) - self.tabWidget_5.setTabText(self.tabWidget_5.indexOf(self.tab_algorithm_weight), _translate("SemiAutomaticClassificationPlugin", "Algorithm band weight")) + self.tabWidget_5.setTabText(self.tabWidget_5.indexOf(self.tab_RGB), _translate("SemiAutomaticClassificationPlugin", "RGB composite")) self.point_distance_spinBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Minimum distance between points
")) self.point_grid_spinBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Size of a grid cell within points are created randomly
")) self.label_48.setText(_translate("SemiAutomaticClassificationPlugin", " Create random points")) @@ -9563,14 +6711,11 @@ def retranslateUi(self, SemiAutomaticClassificationPlugin): self.USGS_library_textBrowser.setHtml(_translate("SemiAutomaticClassificationPlugin", "\n" "\n" +"\n" "USGS Spectral Library Version 7 downloaded from https://crustal.usgs.gov/speclab/QueryAll07a.php.
Reference: Kokaly, R.F., Clark, R.N., Swayze, G.A., Livo, K.E., Hoefen, T.M., Pearson, N.C., Wise, R.A., Benzel, W.M., Lowers, H.A., Driscoll, R.L., and Klein, A.J., 2017, USGS Spectral Library Version 7: U.S. Geological Survey Data Series 1035, 61 p., https://doi.org/10.3133/ds1035.
Select a file: SCP file (*.scp) ; USGS library (*.asc) ; ASTER library (*.txt) ; CSV (*.csv)
")) - self.open_library_pushButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Open a file
")) - self.toolBox_4.setItemText(self.toolBox_4.indexOf(self.page_6), _translate("SemiAutomaticClassificationPlugin", "Import library file")) self.open_shapefile_pushButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Open a file
")) self.label_120.setText(_translate("SemiAutomaticClassificationPlugin", "Select a vector (*.shp;*.gpkg)
")) self.C_ID_combo.setToolTip(_translate("SemiAutomaticClassificationPlugin", "C ID field
")) @@ -9582,580 +6727,204 @@ def retranslateUi(self, SemiAutomaticClassificationPlugin): self.MC_ID_combo_2.setText(_translate("SemiAutomaticClassificationPlugin", "C ID field")) self.label_121.setText(_translate("SemiAutomaticClassificationPlugin", "MC ID field")) self.label_122.setText(_translate("SemiAutomaticClassificationPlugin", "MC Name field")) - self.label_2.setText(_translate("SemiAutomaticClassificationPlugin", " Import vector")) - self.signature_checkBox_2.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Add ROI spectral signature to signature list
")) - self.signature_checkBox_2.setText(_translate("SemiAutomaticClassificationPlugin", "Calculate sig.")) - self.import_shapefile_pushButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Import vector
")) - self.import_shapefile_pushButton.setText(_translate("SemiAutomaticClassificationPlugin", "Import library")) - self.toolBox_4.setItemText(self.toolBox_4.indexOf(self.page_9), _translate("SemiAutomaticClassificationPlugin", "Import vector")) - self.tabWidget_5.setTabText(self.tabWidget_5.indexOf(self.tab_Import), _translate("SemiAutomaticClassificationPlugin", "Import signatures")) - self.label_97.setText(_translate("SemiAutomaticClassificationPlugin", "Export as SCP file (*.scp)
")) - self.export_SCP_pushButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Export highlighted spectral signatures
\n" -"")) - self.export_CSV_library_toolButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Select a directory where highlighted spectral signatures are saved as .csv
")) - self.export_CSV_library_toolButton.setText(_translate("SemiAutomaticClassificationPlugin", "Import library")) - self.label_96.setText(_translate("SemiAutomaticClassificationPlugin", "Export ")) - self.label_222.setText(_translate("SemiAutomaticClassificationPlugin", "Export as shapefile (*.shp) or geopackage (*.gpkg)
")) - self.label_20.setText(_translate("SemiAutomaticClassificationPlugin", "Export as CSV file (.csv)
")) - self.export_SHP_pushButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Export highlighted spectral signatures
\n" -"")) - self.tabWidget_5.setTabText(self.tabWidget_5.indexOf(self.tab_export), _translate("SemiAutomaticClassificationPlugin", "Export signatures")) - self.reset_threshold_pushButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Reset
\n" -"")) - self.signature_threshold_tableWidget.setSortingEnabled(True) - item = self.signature_threshold_tableWidget.horizontalHeaderItem(0) - item.setText(_translate("SemiAutomaticClassificationPlugin", "MC ID")) - item = self.signature_threshold_tableWidget.horizontalHeaderItem(1) - item.setText(_translate("SemiAutomaticClassificationPlugin", "MC Name")) - item = self.signature_threshold_tableWidget.horizontalHeaderItem(2) - item.setText(_translate("SemiAutomaticClassificationPlugin", "C ID")) - item = self.signature_threshold_tableWidget.horizontalHeaderItem(3) - item.setText(_translate("SemiAutomaticClassificationPlugin", "C Name")) - item = self.signature_threshold_tableWidget.horizontalHeaderItem(4) - item.setText(_translate("SemiAutomaticClassificationPlugin", "MD Threshold")) - item = self.signature_threshold_tableWidget.horizontalHeaderItem(5) - item.setText(_translate("SemiAutomaticClassificationPlugin", "ML Threshold")) - item = self.signature_threshold_tableWidget.horizontalHeaderItem(6) - item.setText(_translate("SemiAutomaticClassificationPlugin", "SAM Threshold")) - self.label_80.setText(_translate("SemiAutomaticClassificationPlugin", " Signature threshold")) - self.label_85.setText(_translate("SemiAutomaticClassificationPlugin", "Set threshold = σ *")) - self.multiplicative_threshold_doubleSpinBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Set a value that will be multiplied by standard deviation
")) - self.automatic_threshold_pushButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Set automatic threshold σ
")) - self.label_132.setText(_translate("SemiAutomaticClassificationPlugin", "Set threshold")) - self.threshold_doubleSpinBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Set a value
")) - self.set_threshold_value_pushButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Set
\n" -"")) - self.label_88.setText(_translate("SemiAutomaticClassificationPlugin", " Automatic thresholds")) - self.tabWidget_5.setTabText(self.tabWidget_5.indexOf(self.tab_threshold), _translate("SemiAutomaticClassificationPlugin", "Signature threshold")) - self.LCS_tableWidget.setSortingEnabled(True) - item = self.LCS_tableWidget.horizontalHeaderItem(0) - item.setText(_translate("SemiAutomaticClassificationPlugin", "MC ID")) - item = self.LCS_tableWidget.horizontalHeaderItem(1) - item.setText(_translate("SemiAutomaticClassificationPlugin", "MC Name")) - item = self.LCS_tableWidget.horizontalHeaderItem(2) - item.setText(_translate("SemiAutomaticClassificationPlugin", "C ID")) - item = self.LCS_tableWidget.horizontalHeaderItem(3) - item.setText(_translate("SemiAutomaticClassificationPlugin", "C Name")) - item = self.LCS_tableWidget.horizontalHeaderItem(4) - item.setText(_translate("SemiAutomaticClassificationPlugin", "Color [overlap MC_ID-C_ID]")) - self.label_86.setText(_translate("SemiAutomaticClassificationPlugin", " LC Signature threshold")) - self.signature_spectral_plot_toolButton_2.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Add highlighted signatures to spectral signature plot
")) - self.signature_spectral_plot_toolButton_2.setText(_translate("SemiAutomaticClassificationPlugin", "Plot")) - self.label_102.setText(_translate("SemiAutomaticClassificationPlugin", "Min Max")) - self.set_min_max_Button.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Set automatic threshold Min Max
")) - self.label_101.setText(_translate("SemiAutomaticClassificationPlugin", "σ *")) - self.multiplicative_threshold_doubleSpinBox_2.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Set a value that will be multiplied by standard deviation
")) - self.automatic_threshold_pushButton_2.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Set automatic threshold σ
")) - self.label_89.setText(_translate("SemiAutomaticClassificationPlugin", "From pixel")) - self.LCS_pointerButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Activate pointer for setting thresholds from pixel
")) - self.LCS_include_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, signature threshold is extended to include pixel signature
")) - self.LCS_cut_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, signature threshold is reduced to exclude pixel signature
")) - self.label_178.setText(_translate("SemiAutomaticClassificationPlugin", "From ROI")) - self.LCS_ROI_button.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Set thresholds from temporary ROI
")) - self.label_125.setText(_translate("SemiAutomaticClassificationPlugin", "Automatic thresholds")) - self.tabWidget_5.setTabText(self.tabWidget_5.indexOf(self.tab_LCS_threshold), _translate("SemiAutomaticClassificationPlugin", "LCS threshold")) - self.SCP_tabs.setTabText(self.SCP_tabs.indexOf(self.tab_basic_tools), _translate("SemiAutomaticClassificationPlugin", "Basic tools")) - self.remember_user_checkBox_2.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, remember user name and password locally in QGIS
")) - self.remember_user_checkBox_2.setText(_translate("SemiAutomaticClassificationPlugin", "remember")) - self.password_usgs_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Password
")) - self.password_scihub_label_3.setText(_translate("SemiAutomaticClassificationPlugin", "Password")) - self.label_180.setText(_translate("SemiAutomaticClassificationPlugin", "Login Landsat (https://ers.cr.usgs.gov)
")) - self.user_usgs_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "User name
")) - self.user_scihub_label_2.setText(_translate("SemiAutomaticClassificationPlugin", "User")) - self.remember_user_checkBox_3.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, remember user name and password locally in QGIS
")) - self.remember_user_checkBox_3.setText(_translate("SemiAutomaticClassificationPlugin", "remember")) - self.password_usgs_lineEdit_2.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Password
")) - self.password_scihub_label_4.setText(_translate("SemiAutomaticClassificationPlugin", "Password")) - self.label_191.setText(_translate("SemiAutomaticClassificationPlugin", "Login ASTER and MODIS (https://urs.earthdata.nasa.gov)
")) - self.user_usgs_lineEdit_2.setToolTip(_translate("SemiAutomaticClassificationPlugin", "User name
")) - self.user_scihub_label_3.setText(_translate("SemiAutomaticClassificationPlugin", "User")) - self.user_scihub_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "User name
")) - self.password_scihub_label.setText(_translate("SemiAutomaticClassificationPlugin", "Password")) - self.label_147.setText(_translate("SemiAutomaticClassificationPlugin", "Login Sentinels
")) - self.remember_user_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, remember user name and password locally in QGIS
")) - self.remember_user_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "remember")) - self.user_scihub_label.setText(_translate("SemiAutomaticClassificationPlugin", "User")) - self.password_scihub_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Password
")) - self.password_scihub_label_2.setText(_translate("SemiAutomaticClassificationPlugin", "Service")) - self.sentinel_service_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Service
")) - self.reset_sentinel_service_toolButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Reset
")) - self.reset_sentinel_service_toolButton.setText(_translate("SemiAutomaticClassificationPlugin", "Import library")) - self.sentinel2_alternative_search_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, use alternative search for Sentinel-2 (no authentication required)
")) - self.sentinel2_alternative_search_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Use alternative search for Sentinel-2 (no authentication required)")) - self.tabWidget_3.setTabText(self.tabWidget_3.indexOf(self.tab_login), _translate("SemiAutomaticClassificationPlugin", "Login data")) - self.remove_image_toolButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Delete row
")) - self.remove_image_toolButton.setText(_translate("SemiAutomaticClassificationPlugin", "Plot")) - self.toolButton_display.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Display preview of highlighted images in map
")) - self.toolButton_display.setText(_translate("SemiAutomaticClassificationPlugin", "Plot")) - self.clear_table_toolButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Reset
")) - self.clear_table_toolButton.setText(_translate("SemiAutomaticClassificationPlugin", "Import library")) - self.export_table_pushButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Export table to text file
")) - self.export_table_pushButton.setText(_translate("SemiAutomaticClassificationPlugin", "Plot")) - self.import_table_pushButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Import table from text file
")) - self.import_table_pushButton.setText(_translate("SemiAutomaticClassificationPlugin", "Plot")) - self.image_preview_label.setText(_translate("SemiAutomaticClassificationPlugin", "Preview")) - self.download_images_tableWidget.setSortingEnabled(True) - item = self.download_images_tableWidget.horizontalHeaderItem(0) - item.setText(_translate("SemiAutomaticClassificationPlugin", "Product")) - item = self.download_images_tableWidget.horizontalHeaderItem(1) - item.setText(_translate("SemiAutomaticClassificationPlugin", "ProductID")) - item = self.download_images_tableWidget.horizontalHeaderItem(2) - item.setText(_translate("SemiAutomaticClassificationPlugin", "AcquisitionDate")) - item = self.download_images_tableWidget.horizontalHeaderItem(3) - item.setText(_translate("SemiAutomaticClassificationPlugin", "CloudCover")) - item = self.download_images_tableWidget.horizontalHeaderItem(4) - item.setText(_translate("SemiAutomaticClassificationPlugin", "Zone/Path")) - item = self.download_images_tableWidget.horizontalHeaderItem(5) - item.setText(_translate("SemiAutomaticClassificationPlugin", "Row/DayNight")) - item = self.download_images_tableWidget.horizontalHeaderItem(6) - item.setText(_translate("SemiAutomaticClassificationPlugin", "min_lat")) - item = self.download_images_tableWidget.horizontalHeaderItem(7) - item.setText(_translate("SemiAutomaticClassificationPlugin", "min_lon")) - item = self.download_images_tableWidget.horizontalHeaderItem(8) - item.setText(_translate("SemiAutomaticClassificationPlugin", "max_lat")) - item = self.download_images_tableWidget.horizontalHeaderItem(9) - item.setText(_translate("SemiAutomaticClassificationPlugin", "max_lon")) - item = self.download_images_tableWidget.horizontalHeaderItem(10) - item.setText(_translate("SemiAutomaticClassificationPlugin", "Collection/Size")) - item = self.download_images_tableWidget.horizontalHeaderItem(11) - item.setText(_translate("SemiAutomaticClassificationPlugin", "Preview")) - item = self.download_images_tableWidget.horizontalHeaderItem(12) - item.setText(_translate("SemiAutomaticClassificationPlugin", "Collection/ID")) - item = self.download_images_tableWidget.horizontalHeaderItem(13) - item.setText(_translate("SemiAutomaticClassificationPlugin", "Collection/Image")) - self.label_100.setText(_translate("SemiAutomaticClassificationPlugin", " Product list")) - self.products_filter_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Filter
")) - self.products_filter_lineEdit.setPlaceholderText(_translate("SemiAutomaticClassificationPlugin", "Filter")) - self.toolButton_OSM.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Add OpenStreetMap to the map
")) - self.toolButton_OSM.setText(_translate("SemiAutomaticClassificationPlugin", "Plot")) - self.label_205.setText(_translate("SemiAutomaticClassificationPlugin", "Add OpenStreetMap to the map
")) - self.label_206.setText(_translate("SemiAutomaticClassificationPlugin", "(© OpenStreetMap contributors. The cartography is licensed as CC BY-SA. Tile Usage Policy)
")) - self.label_103.setText(_translate("SemiAutomaticClassificationPlugin", " Search parameters")) - self.selectUL_toolButton_3.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Set area in the map
")) - self.LX_lineEdit_3.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Lower right X
")) - self.LX_lineEdit_3.setPlaceholderText(_translate("SemiAutomaticClassificationPlugin", "X (Lon)")) - self.UX_lineEdit_3.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Upper left X
")) - self.UX_lineEdit_3.setPlaceholderText(_translate("SemiAutomaticClassificationPlugin", "X (Lon)")) - self.label_105.setText(_translate("SemiAutomaticClassificationPlugin", "LR")) - self.label_107.setText(_translate("SemiAutomaticClassificationPlugin", "UL")) - self.LY_lineEdit_3.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Lower right Y
")) - self.LY_lineEdit_3.setPlaceholderText(_translate("SemiAutomaticClassificationPlugin", "Y (Lat)")) - self.UY_lineEdit_3.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Upper left Y
")) - self.UY_lineEdit_3.setPlaceholderText(_translate("SemiAutomaticClassificationPlugin", "Y (Lat)")) - self.show_area_radioButton_2.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Show / hide area
")) - self.show_area_radioButton_2.setText(_translate("SemiAutomaticClassificationPlugin", "Show")) - self.find_images_toolButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Find images
")) - self.label_35.setText(_translate("SemiAutomaticClassificationPlugin", "Find")) - self.landsat_satellite_combo.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Select a product
")) - self.dateEdit_from.setDisplayFormat(_translate("SemiAutomaticClassificationPlugin", "yyyy-MM-dd")) - self.label_110.setText(_translate("SemiAutomaticClassificationPlugin", "Max cloud cover (%)")) - self.dateEdit_to.setDisplayFormat(_translate("SemiAutomaticClassificationPlugin", "yyyy-MM-dd")) - self.label_112.setText(_translate("SemiAutomaticClassificationPlugin", "to")) - self.label_111.setText(_translate("SemiAutomaticClassificationPlugin", "Date from")) - self.cloud_cover_spinBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Maximum cloud cover percentage
")) - self.label_114.setText(_translate("SemiAutomaticClassificationPlugin", "Products")) - self.label_194.setText(_translate("SemiAutomaticClassificationPlugin", "Results")) - self.label_113.setText(_translate("SemiAutomaticClassificationPlugin", "Advanced search")) - self.imageID_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Filter images
")) - self.result_number_spinBox_2.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Maximum number of results (images)
")) - self.tabWidget_3.setTabText(self.tabWidget_3.indexOf(self.tab_search), _translate("SemiAutomaticClassificationPlugin", "Search")) - self.checkBox_band_6.setText(_translate("SemiAutomaticClassificationPlugin", "6 (Landsat 1-8)")) - self.checkBox_band_4.setText(_translate("SemiAutomaticClassificationPlugin", "4 (Landsat 1-8)")) - self.checkBox_band_1.setText(_translate("SemiAutomaticClassificationPlugin", "1 (Landsat 4-8)")) - self.checkBox_band_3.setText(_translate("SemiAutomaticClassificationPlugin", "3 (Landsat 4-8)")) - self.checkBox_band_12.setText(_translate("SemiAutomaticClassificationPlugin", "Ancillary data")) - self.checkBox_band_2.setText(_translate("SemiAutomaticClassificationPlugin", "2 (Landsat 4-8)")) - self.checkBox_band_11.setText(_translate("SemiAutomaticClassificationPlugin", "11 (Landsat 8)")) - self.checkBox_band_5.setText(_translate("SemiAutomaticClassificationPlugin", "5 (Landsat 1-8)")) - self.check_toolButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Select all
")) - self.check_toolButton.setText(_translate("SemiAutomaticClassificationPlugin", "Plot")) - self.label_108.setText(_translate("SemiAutomaticClassificationPlugin", " Landsat bands")) - self.checkBoxs_band_9.setText(_translate("SemiAutomaticClassificationPlugin", "8A")) - self.checkBoxs_band_1.setText(_translate("SemiAutomaticClassificationPlugin", "1")) - self.check_toolButton_2.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Select all
")) - self.check_toolButton_2.setText(_translate("SemiAutomaticClassificationPlugin", "Plot")) - self.label_118.setText(_translate("SemiAutomaticClassificationPlugin", " Sentinel-2 bands")) - self.checkBoxs_band_2.setText(_translate("SemiAutomaticClassificationPlugin", "2")) - self.checkBoxs_band_3.setText(_translate("SemiAutomaticClassificationPlugin", "3")) - self.checkBoxs_band_4.setText(_translate("SemiAutomaticClassificationPlugin", "4")) - self.checkBoxs_band_5.setText(_translate("SemiAutomaticClassificationPlugin", "5")) - self.checkBoxs_band_6.setText(_translate("SemiAutomaticClassificationPlugin", "6")) - self.checkBoxs_band_7.setText(_translate("SemiAutomaticClassificationPlugin", "7")) - self.checkBoxs_band_12.setText(_translate("SemiAutomaticClassificationPlugin", "11")) - self.checkBoxs_band_8.setText(_translate("SemiAutomaticClassificationPlugin", "8")) - self.checkBoxs_band_10.setText(_translate("SemiAutomaticClassificationPlugin", "9")) - self.ancillary_data_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Ancillary data")) - self.checkBoxs_band_13.setText(_translate("SemiAutomaticClassificationPlugin", "12")) - self.checkBoxs_band_11.setText(_translate("SemiAutomaticClassificationPlugin", "10")) - self.checkBoxs3_band_6.setText(_translate("SemiAutomaticClassificationPlugin", "6")) - self.checkBoxs3_band_2.setText(_translate("SemiAutomaticClassificationPlugin", "2")) - self.checkBoxs3_band_5.setText(_translate("SemiAutomaticClassificationPlugin", "5")) - self.checkBoxs3_band_8.setText(_translate("SemiAutomaticClassificationPlugin", "8")) - self.checkBoxs3_band_1.setText(_translate("SemiAutomaticClassificationPlugin", "1")) - self.checkBoxs3_band_16.setText(_translate("SemiAutomaticClassificationPlugin", "16")) - self.checkBoxs3_band_10.setText(_translate("SemiAutomaticClassificationPlugin", "10")) - self.checkBoxs3_band_12.setText(_translate("SemiAutomaticClassificationPlugin", "12")) - self.s3_ancillary_data_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Ancillary data")) - self.checkBoxs3_band_3.setText(_translate("SemiAutomaticClassificationPlugin", "3")) - self.label_127.setText(_translate("SemiAutomaticClassificationPlugin", " Sentinel-3 bands")) - self.checkBoxs3_band_20.setText(_translate("SemiAutomaticClassificationPlugin", "20")) - self.checkBoxs3_band_17.setText(_translate("SemiAutomaticClassificationPlugin", "17")) - self.checkBoxs3_band_14.setText(_translate("SemiAutomaticClassificationPlugin", "14")) - self.checkBoxs3_band_9.setText(_translate("SemiAutomaticClassificationPlugin", "9")) - self.checkBoxs3_band_13.setText(_translate("SemiAutomaticClassificationPlugin", "13")) - self.checkBoxs3_band_19.setText(_translate("SemiAutomaticClassificationPlugin", "19")) - self.check_toolButton_3.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Select all
")) - self.check_toolButton_3.setText(_translate("SemiAutomaticClassificationPlugin", "Plot")) - self.checkBoxs3_band_7.setText(_translate("SemiAutomaticClassificationPlugin", "7")) - self.checkBoxs3_band_4.setText(_translate("SemiAutomaticClassificationPlugin", "4")) - self.checkBoxs3_band_11.setText(_translate("SemiAutomaticClassificationPlugin", "11")) - self.checkBoxs3_band_15.setText(_translate("SemiAutomaticClassificationPlugin", "15")) - self.checkBoxs3_band_21.setText(_translate("SemiAutomaticClassificationPlugin", "21")) - self.checkBoxs3_band_18.setText(_translate("SemiAutomaticClassificationPlugin", "18")) - self.checkBoxs_goes_band_1.setText(_translate("SemiAutomaticClassificationPlugin", "1")) - self.label_272.setText(_translate("SemiAutomaticClassificationPlugin", " GOES bands")) - self.checkBoxs_goes_band_5.setText(_translate("SemiAutomaticClassificationPlugin", "5")) - self.checkBoxs_goes_band_3.setText(_translate("SemiAutomaticClassificationPlugin", "3")) - self.checkBoxs_goes_band_4.setText(_translate("SemiAutomaticClassificationPlugin", "4")) - self.checkBoxs_goes_band_2.setText(_translate("SemiAutomaticClassificationPlugin", "2")) - self.checkBoxs_goes_band_6.setText(_translate("SemiAutomaticClassificationPlugin", "6")) - self.check_toolButton_4.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Select all
")) - self.check_toolButton_4.setText(_translate("SemiAutomaticClassificationPlugin", "Plot")) - self.checkBox_band_8.setText(_translate("SemiAutomaticClassificationPlugin", "8 (Landsat 7, 8)")) - self.checkBox_band_10.setText(_translate("SemiAutomaticClassificationPlugin", "10 (Landsat 8)")) - self.checkBox_band_9.setText(_translate("SemiAutomaticClassificationPlugin", "9 (Landsat 8)")) - self.checkBox_band_7.setText(_translate("SemiAutomaticClassificationPlugin", "7 (Landsat 1-8)")) - self.tabWidget_3.setTabText(self.tabWidget_3.indexOf(self.tab_options), _translate("SemiAutomaticClassificationPlugin", "Download options")) - self.label_258.setText(_translate("SemiAutomaticClassificationPlugin", "Download
")) - self.preprocess_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Preprocess images
")) - self.preprocess_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Preprocess images")) - self.load_in_QGIS_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Load images in QGIS after download
")) - self.load_in_QGIS_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Load bands in QGIS")) - self.download_if_preview_in_legend_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Download images from list only if the corresponding previews are loaded in QGIS
")) - self.download_if_preview_in_legend_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Only if preview in Layers")) - self.export_links_Button.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Export download links to a text file
")) - self.export_links_Button.setText(_translate("SemiAutomaticClassificationPlugin", "Import library")) - self.download_images_Button.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Run
")) - self.download_images_Button.setText(_translate("SemiAutomaticClassificationPlugin", " RUN")) - self.virtual_download_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, download as virtual file only the portion of the image defined by search coordinates (does not work for all the sources)
")) - self.virtual_download_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Virtual download")) - self.SCP_tabs.setTabText(self.SCP_tabs.indexOf(self.tab_download_products), _translate("SemiAutomaticClassificationPlugin", "Download products")) - self.label_36.setText(_translate("SemiAutomaticClassificationPlugin", "Directory containing Landsat bands")) - self.label_37.setText(_translate("SemiAutomaticClassificationPlugin", " Landsat conversion to TOA reflectance and brightness temperature")) - self.celsius_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Enable/Disable calculation of temperature in Celsius from thermal band
")) - self.celsius_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", " Brightness temperature in Celsius")) - self.DOS1_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Enable/Disable the DOS1 atmospheric correction (thermal band is not corrected)
")) - self.DOS1_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", " Apply DOS1 atmospheric correction")) - self.nodata_spinBox_3.setToolTip(_translate("SemiAutomaticClassificationPlugin", "No data value
")) - self.nodata_checkBox_2.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, pixels equal to NoData value will be excluded from the output raster
")) - self.nodata_checkBox_2.setText(_translate("SemiAutomaticClassificationPlugin", "Use value as NoData")) + self.label_2.setText(_translate("SemiAutomaticClassificationPlugin", " Import vector")) + self.signature_checkBox_2.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Add ROI spectral signature to signature list
")) + self.signature_checkBox_2.setText(_translate("SemiAutomaticClassificationPlugin", "Calculate sig.")) + self.import_shapefile_pushButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Import vector
")) + self.import_shapefile_pushButton.setText(_translate("SemiAutomaticClassificationPlugin", "Import library")) + self.toolBox_4.setItemText(self.toolBox_4.indexOf(self.page_9), _translate("SemiAutomaticClassificationPlugin", "Import vector")) + self.label_9.setText(_translate("SemiAutomaticClassificationPlugin", "Select a file: training file (*.scpx; *.scp) ; USGS library (*.zip) ; ASTER library (*.txt) ; CSV (*.csv)
")) + self.open_library_pushButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Open a file
")) + self.toolBox_4.setItemText(self.toolBox_4.indexOf(self.page_6), _translate("SemiAutomaticClassificationPlugin", "Import library file")) + self.tabWidget_5.setTabText(self.tabWidget_5.indexOf(self.tab_Import), _translate("SemiAutomaticClassificationPlugin", "Import signatures")) + self.label_97.setText(_translate("SemiAutomaticClassificationPlugin", "Export as training file (*.scpx)
")) + self.export_SCP_pushButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Export highlighted spectral signatures
\n" +"")) + self.export_CSV_library_toolButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Select a directory where highlighted spectral signatures are saved as .csv
")) + self.export_CSV_library_toolButton.setText(_translate("SemiAutomaticClassificationPlugin", "Import library")) + self.label_96.setText(_translate("SemiAutomaticClassificationPlugin", "Export ")) + self.label_222.setText(_translate("SemiAutomaticClassificationPlugin", "Export geometries as shapefile (*.shp) or geopackage (*.gpkg)
")) + self.label_20.setText(_translate("SemiAutomaticClassificationPlugin", "Export spectral signatures as CSV file (.csv)
")) + self.export_SHP_pushButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Export highlighted spectral signatures
\n" +"")) + self.tabWidget_5.setTabText(self.tabWidget_5.indexOf(self.tab_export), _translate("SemiAutomaticClassificationPlugin", "Export signatures")) + self.reset_threshold_pushButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Reset
\n" +"")) + self.signature_threshold_tableWidget.setSortingEnabled(True) + item = self.signature_threshold_tableWidget.horizontalHeaderItem(0) + item.setText(_translate("SemiAutomaticClassificationPlugin", "MC ID")) + item = self.signature_threshold_tableWidget.horizontalHeaderItem(1) + item.setText(_translate("SemiAutomaticClassificationPlugin", "MC Name")) + item = self.signature_threshold_tableWidget.horizontalHeaderItem(2) + item.setText(_translate("SemiAutomaticClassificationPlugin", "C ID")) + item = self.signature_threshold_tableWidget.horizontalHeaderItem(3) + item.setText(_translate("SemiAutomaticClassificationPlugin", "C Name")) + item = self.signature_threshold_tableWidget.horizontalHeaderItem(4) + item.setText(_translate("SemiAutomaticClassificationPlugin", "Minimum Distance")) + item = self.signature_threshold_tableWidget.horizontalHeaderItem(5) + item.setText(_translate("SemiAutomaticClassificationPlugin", "Maximum Likelihood")) + item = self.signature_threshold_tableWidget.horizontalHeaderItem(6) + item.setText(_translate("SemiAutomaticClassificationPlugin", "Spectral Angle Mapping")) + self.label_80.setText(_translate("SemiAutomaticClassificationPlugin", " Signature threshold")) + self.label_85.setText(_translate("SemiAutomaticClassificationPlugin", "Set threshold = σ *")) + self.multiplicative_threshold_doubleSpinBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Set a value that will be multiplied by standard deviation
")) + self.automatic_threshold_pushButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Set automatic threshold σ
")) + self.label_132.setText(_translate("SemiAutomaticClassificationPlugin", "Set threshold")) + self.threshold_doubleSpinBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Set a value
")) + self.set_threshold_value_pushButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Set
\n" +"")) + self.label_88.setText(_translate("SemiAutomaticClassificationPlugin", " Automatic thresholds")) + self.tabWidget_5.setTabText(self.tabWidget_5.indexOf(self.tab_threshold), _translate("SemiAutomaticClassificationPlugin", "Signature threshold")) + self.SCP_tabs.setTabText(self.SCP_tabs.indexOf(self.tab_basic_tools), _translate("SemiAutomaticClassificationPlugin", "Basic tools")) + self.label_36.setText(_translate("SemiAutomaticClassificationPlugin", "Directory containing bands")) + self.label_37.setText(_translate("SemiAutomaticClassificationPlugin", "Conversion to reflectance and temperature")) self.label_41.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Select MTL file (if not in Landsat directory)
")) - self.label_41.setText(_translate("SemiAutomaticClassificationPlugin", "Select MTL file")) + self.label_41.setText(_translate("SemiAutomaticClassificationPlugin", "Select metadata file (optional)")) self.toolButton_directoryInput.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Select a directory
")) self.toolButton_directoryInput.setText(_translate("SemiAutomaticClassificationPlugin", "Import library")) - self.pansharpening_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Perform pan-sharpening (Brovey Transform)
")) - self.pansharpening_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Perform pansharpening (Landsat 7 or 8)")) self.create_bandset_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Create the Band set automatically and use the checked Band set tools
")) self.create_bandset_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Create Band set and use Band set tools")) - self.add_new_bandset_checkBox_1.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Create a new band set where bands are added
")) - self.add_new_bandset_checkBox_1.setText(_translate("SemiAutomaticClassificationPlugin", "Add bands in a new Band set")) + self.DOS1_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Enable/Disable the DOS1 atmospheric correction (thermal band is not corrected)
")) + self.DOS1_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", " Apply DOS1 atmospheric correction")) + self.add_new_bandset_radioButton_1.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Create a new band set where bands are added
")) + self.add_new_bandset_radioButton_1.setText(_translate("SemiAutomaticClassificationPlugin", "Create a new Band set")) self.toolButton_directoryInput_MTL.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Open a file
")) - self.landsat_tableWidget.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Edit metadata
")) - item = self.landsat_tableWidget.horizontalHeaderItem(0) - item.setText(_translate("SemiAutomaticClassificationPlugin", "Band")) - item = self.landsat_tableWidget.horizontalHeaderItem(1) - item.setText(_translate("SemiAutomaticClassificationPlugin", "RADIANCE_MULT")) - item = self.landsat_tableWidget.horizontalHeaderItem(2) - item.setText(_translate("SemiAutomaticClassificationPlugin", "RADIANCE_ADD")) - item = self.landsat_tableWidget.horizontalHeaderItem(3) - item.setText(_translate("SemiAutomaticClassificationPlugin", "REFLECTANCE_MULT")) - item = self.landsat_tableWidget.horizontalHeaderItem(4) - item.setText(_translate("SemiAutomaticClassificationPlugin", "REFLECTANCE_ADD")) - item = self.landsat_tableWidget.horizontalHeaderItem(5) - item.setText(_translate("SemiAutomaticClassificationPlugin", "RADIANCE_MAXIMUM")) - item = self.landsat_tableWidget.horizontalHeaderItem(6) - item.setText(_translate("SemiAutomaticClassificationPlugin", "REFLECTANCE_MAXIMUM")) - item = self.landsat_tableWidget.horizontalHeaderItem(7) - item.setText(_translate("SemiAutomaticClassificationPlugin", "K1_CONSTANT")) - item = self.landsat_tableWidget.horizontalHeaderItem(8) - item.setText(_translate("SemiAutomaticClassificationPlugin", "K2_CONSTANT")) - item = self.landsat_tableWidget.horizontalHeaderItem(9) - item.setText(_translate("SemiAutomaticClassificationPlugin", "LMAX")) - item = self.landsat_tableWidget.horizontalHeaderItem(10) - item.setText(_translate("SemiAutomaticClassificationPlugin", "LMIN")) - item = self.landsat_tableWidget.horizontalHeaderItem(11) - item.setText(_translate("SemiAutomaticClassificationPlugin", "QCALMAX")) - item = self.landsat_tableWidget.horizontalHeaderItem(12) - item.setText(_translate("SemiAutomaticClassificationPlugin", "QCALMIN")) + self.nodata_spinBox_3.setToolTip(_translate("SemiAutomaticClassificationPlugin", "No data value
")) + self.nodata_checkBox_2.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, pixels equal to NoData value will be excluded from the output raster
")) + self.nodata_checkBox_2.setText(_translate("SemiAutomaticClassificationPlugin", "Use value as NoData")) + self.bands_tableWidget.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Edit metadata
")) + item = self.bands_tableWidget.horizontalHeaderItem(0) + item.setText(_translate("SemiAutomaticClassificationPlugin", "product")) + item = self.bands_tableWidget.horizontalHeaderItem(1) + item.setText(_translate("SemiAutomaticClassificationPlugin", "spacecraft")) + item = self.bands_tableWidget.horizontalHeaderItem(2) + item.setText(_translate("SemiAutomaticClassificationPlugin", "processing_level")) + item = self.bands_tableWidget.horizontalHeaderItem(3) + item.setText(_translate("SemiAutomaticClassificationPlugin", "band_name")) + item = self.bands_tableWidget.horizontalHeaderItem(4) + item.setText(_translate("SemiAutomaticClassificationPlugin", "product_path")) + item = self.bands_tableWidget.horizontalHeaderItem(5) + item.setText(_translate("SemiAutomaticClassificationPlugin", "scale")) + item = self.bands_tableWidget.horizontalHeaderItem(6) + item.setText(_translate("SemiAutomaticClassificationPlugin", "offset")) + item = self.bands_tableWidget.horizontalHeaderItem(7) + item.setText(_translate("SemiAutomaticClassificationPlugin", "nodata")) + item = self.bands_tableWidget.horizontalHeaderItem(8) + item.setText(_translate("SemiAutomaticClassificationPlugin", "date")) + item = self.bands_tableWidget.horizontalHeaderItem(9) + item.setText(_translate("SemiAutomaticClassificationPlugin", "k1")) + item = self.bands_tableWidget.horizontalHeaderItem(10) + item.setText(_translate("SemiAutomaticClassificationPlugin", "k2")) + item = self.bands_tableWidget.horizontalHeaderItem(11) + item.setText(_translate("SemiAutomaticClassificationPlugin", "band_number")) + item = self.bands_tableWidget.horizontalHeaderItem(12) + item.setText(_translate("SemiAutomaticClassificationPlugin", "e_sun")) + item = self.bands_tableWidget.horizontalHeaderItem(13) + item.setText(_translate("SemiAutomaticClassificationPlugin", "sun_elevation")) + item = self.bands_tableWidget.horizontalHeaderItem(14) + item.setText(_translate("SemiAutomaticClassificationPlugin", "earth_sun_distance")) self.pushButton_remove_band.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Delete row
")) self.pushButton_remove_band.setText(_translate("SemiAutomaticClassificationPlugin", "Plot")) - self.satellite_label.setText(_translate("SemiAutomaticClassificationPlugin", "Satellite")) - self.satellite_label_3.setText(_translate("SemiAutomaticClassificationPlugin", "Sun elevation")) - self.date_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "DATE ACQUIRED
")) - self.satellite_label_2.setText(_translate("SemiAutomaticClassificationPlugin", "Date (YYYY-MM-DD)")) - self.satellite_label_4.setText(_translate("SemiAutomaticClassificationPlugin", "Earth sun distance")) - self.sun_elev_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "SUN ELEVATION
")) - self.earth_sun_dist_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Earth sun distance
")) self.label_74.setText(_translate("SemiAutomaticClassificationPlugin", "Metadata")) - self.satellite_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Satellite (e.g. LANDSAT8)
")) self.label_161.setText(_translate("SemiAutomaticClassificationPlugin", " Run")) self.pushButton_Conversion.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Run
")) self.pushButton_Conversion.setText(_translate("SemiAutomaticClassificationPlugin", " RUN")) - self.landsat_conversion.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Function to Batch
")) - self.landsat_conversion.setText(_translate("SemiAutomaticClassificationPlugin", " BATCH")) - self.tabWidget_preprocessing.setTabText(self.tabWidget_preprocessing.indexOf(self.tab_Landsat), _translate("SemiAutomaticClassificationPlugin", "Landsat")) - self.S1_label_95.setText(_translate("SemiAutomaticClassificationPlugin", "Select SNAP xml graph (optional)")) - self.S1_toolButton_directoryInput_xml.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Open a file
")) - self.S1_label_97.setText(_translate("SemiAutomaticClassificationPlugin", "Polarization")) - self.VH_checkBox_S1.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Select VH polarization
")) - self.VH_checkBox_S1.setText(_translate("SemiAutomaticClassificationPlugin", "VH")) - self.VV_checkBox_S1.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Select VV polarization
")) - self.VV_checkBox_S1.setText(_translate("SemiAutomaticClassificationPlugin", "VV")) - self.label_209.setText(_translate("SemiAutomaticClassificationPlugin", " Sentinel-1 conversion (ESA SNAP software required)")) - self.S1_create_bandset_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Create the Band set automatically and use the checked Band set tools
")) - self.S1_create_bandset_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Create Band set and use Band set tools")) - self.add_new_bandset_checkBox_6.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Create a new band set where bands are added
")) - self.add_new_bandset_checkBox_6.setText(_translate("SemiAutomaticClassificationPlugin", "Add bands in a new Band set")) - self.S1_toolButton_fileInput.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Open a file
")) - self.label_207.setText(_translate("SemiAutomaticClassificationPlugin", "Sentinel-1 file")) - self.projection_checkBox_S1.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, project the output to the same projection as selected Band set
")) - self.projection_checkBox_S1.setText(_translate("SemiAutomaticClassificationPlugin", "Raster projection as Band set")) - self.band_set_comb_spinBox_11.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Band set number
")) - self.convert_to_db_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, convert to dB
")) - self.convert_to_db_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", " convert to dB")) - self.S1_nodata_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, pixels equal to NoData value will be excluded from the output raster
")) - self.S1_nodata_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Use value as NoData")) - self.S1_nodata_spinBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "No data value
")) - self.label_210.setText(_translate("SemiAutomaticClassificationPlugin", " Run")) - self.pushButton_Conversion_6.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Run
")) - self.pushButton_Conversion_6.setText(_translate("SemiAutomaticClassificationPlugin", " RUN")) - self.sentinel1_conversion.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Function to Batch
")) - self.sentinel1_conversion.setText(_translate("SemiAutomaticClassificationPlugin", " BATCH")) - self.tabWidget_preprocessing.setTabText(self.tabWidget_preprocessing.indexOf(self.tab_Sentinel1), _translate("SemiAutomaticClassificationPlugin", "Sentinel-1")) - self.label_90.setText(_translate("SemiAutomaticClassificationPlugin", "Directory containing Sentinel-2 bands")) - self.S2_toolButton_directoryInput.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Select a directory
")) - self.S2_toolButton_directoryInput.setText(_translate("SemiAutomaticClassificationPlugin", "Import library")) - self.DOS1_checkBox_S2.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Enable/Disable the DOS1 atmospheric correction
")) - self.DOS1_checkBox_S2.setText(_translate("SemiAutomaticClassificationPlugin", " Apply DOS1 atmospheric correction")) - self.S2_nodata_spinBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "No data value
")) - self.S2_nodata_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, pixels equal to NoData value will be excluded from the output raster
")) - self.S2_nodata_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Use value as NoData")) - self.label_91.setText(_translate("SemiAutomaticClassificationPlugin", " Sentinel-2 conversion")) - self.S2_label_93.setText(_translate("SemiAutomaticClassificationPlugin", "Select metadata file (MTD_MSI)")) - self.S2_toolButton_directoryInput_xml2.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Open a file
")) - self.S2_create_bandset_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Create the Band set automatically and use the checked Band set tools
")) - self.S2_create_bandset_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Create Band set and use Band set tools")) - self.add_new_bandset_checkBox_2.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Create a new band set where bands are added
")) - self.add_new_bandset_checkBox_2.setText(_translate("SemiAutomaticClassificationPlugin", "Add bands in a new Band set")) - self.preprocess_b_1_9_10_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Create a new band set where bands are added
")) - self.preprocess_b_1_9_10_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Preprocess bands 1, 9, 10")) - self.S2_satellite_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Satellite (e.g. Sentinel-2A)
")) - self.satellite_label_5.setText(_translate("SemiAutomaticClassificationPlugin", "Satellite")) - self.satellite_label_6.setText(_translate("SemiAutomaticClassificationPlugin", "Product")) - self.S2_product_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Satellite (e.g. Sentinel-2A)
")) - self.label_92.setText(_translate("SemiAutomaticClassificationPlugin", "Metadata")) - self.date_lineEdit_3.setToolTip(_translate("SemiAutomaticClassificationPlugin", "DATE ACQUIRED
")) - self.satellite_label_15.setText(_translate("SemiAutomaticClassificationPlugin", "Date (YYYY-MM-DD)")) - self.sentinel_2_tableWidget.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Edit metadata
")) - item = self.sentinel_2_tableWidget.horizontalHeaderItem(0) - item.setText(_translate("SemiAutomaticClassificationPlugin", "Band")) - item = self.sentinel_2_tableWidget.horizontalHeaderItem(1) - item.setText(_translate("SemiAutomaticClassificationPlugin", "Quantification value")) - item = self.sentinel_2_tableWidget.horizontalHeaderItem(2) - item.setText(_translate("SemiAutomaticClassificationPlugin", "Solar irradiance")) - self.S2_pushButton_remove_band.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Delete row
")) - self.S2_pushButton_remove_band.setText(_translate("SemiAutomaticClassificationPlugin", "Plot")) - self.label_162.setText(_translate("SemiAutomaticClassificationPlugin", " Run")) - self.pushButton_Conversion_2.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Run
")) - self.pushButton_Conversion_2.setText(_translate("SemiAutomaticClassificationPlugin", " RUN")) - self.sentinel2_conversion.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Function to Batch
")) - self.sentinel2_conversion.setText(_translate("SemiAutomaticClassificationPlugin", " BATCH")) - self.tabWidget_preprocessing.setTabText(self.tabWidget_preprocessing.indexOf(self.tab_Sentinel2), _translate("SemiAutomaticClassificationPlugin", "Sentinel-2")) - self.S2_nodata_spinBox_2.setToolTip(_translate("SemiAutomaticClassificationPlugin", "No data value
")) - self.S3_nodata_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, pixels equal to NoData value will be excluded from the output raster
")) - self.S3_nodata_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Use value as NoData")) - self.label_109.setText(_translate("SemiAutomaticClassificationPlugin", " Sentinel-3 conversion")) - self.S3_create_bandset_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Create the Band set automatically and use the checked Band set tools
")) - self.S3_create_bandset_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Create Band set and use Band set tools")) - self.label_106.setText(_translate("SemiAutomaticClassificationPlugin", "Directory containing Sentinel-3 bands")) - self.S3_toolButton_directoryInput.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Select a directory
")) - self.S3_toolButton_directoryInput.setText(_translate("SemiAutomaticClassificationPlugin", "Import library")) - self.DOS1_checkBox_S3.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Enable/Disable the DOS1 atmospheric correction
")) - self.DOS1_checkBox_S3.setText(_translate("SemiAutomaticClassificationPlugin", " Apply DOS1 atmospheric correction")) - self.add_new_bandset_checkBox_3.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Create a new band set where bands are added
")) - self.add_new_bandset_checkBox_3.setText(_translate("SemiAutomaticClassificationPlugin", "Add bands in a new Band set")) - self.sentinel_3_tableWidget.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Edit metadata
")) - item = self.sentinel_3_tableWidget.horizontalHeaderItem(0) - item.setText(_translate("SemiAutomaticClassificationPlugin", "Band")) - self.S3_pushButton_remove_band.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Delete row
")) - self.S3_pushButton_remove_band.setText(_translate("SemiAutomaticClassificationPlugin", "Plot")) - self.S3_satellite_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Satellite (e.g. Sentinel-3A)
")) - self.satellite_label_12.setText(_translate("SemiAutomaticClassificationPlugin", "Satellite")) - self.satellite_label_14.setText(_translate("SemiAutomaticClassificationPlugin", "Product")) - self.S3_product_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Satellite (e.g. Sentinel-3A)
")) - self.label_115.setText(_translate("SemiAutomaticClassificationPlugin", "Metadata")) - self.label_181.setText(_translate("SemiAutomaticClassificationPlugin", " Run")) - self.pushButton_Conversion_5.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Run
")) - self.pushButton_Conversion_5.setText(_translate("SemiAutomaticClassificationPlugin", " RUN")) - self.sentinel3_conversion.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Function to Batch
")) - self.sentinel3_conversion.setText(_translate("SemiAutomaticClassificationPlugin", " BATCH")) - self.tabWidget_preprocessing.setTabText(self.tabWidget_preprocessing.indexOf(self.tab_Sentinel3), _translate("SemiAutomaticClassificationPlugin", "Sentinel-3")) - self.nodata_spinBox_6.setToolTip(_translate("SemiAutomaticClassificationPlugin", "No data value
")) - self.nodata_checkBox_5.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, pixels equal to NoData value will be excluded from the output raster
")) - self.nodata_checkBox_5.setText(_translate("SemiAutomaticClassificationPlugin", "Use value as NoData")) - self.toolButton_directoryInput_ASTER.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Open a file
")) - self.toolButton_directoryInput_ASTER.setText(_translate("SemiAutomaticClassificationPlugin", "Import library")) - self.DOS1_checkBox_2.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Enable/Disable the DOS1 atmospheric correction (thermal band is not corrected)
")) - self.DOS1_checkBox_2.setText(_translate("SemiAutomaticClassificationPlugin", " Apply DOS1 atmospheric correction")) - self.label_67.setText(_translate("SemiAutomaticClassificationPlugin", " ASTER conversion to TOA reflectance and brightness temperature")) - self.label_55.setText(_translate("SemiAutomaticClassificationPlugin", "Select file ASTER L1T (.hdf)")) - self.create_bandset_checkBox_2.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Create the Band set automatically and use the checked Band set tools
")) - self.create_bandset_checkBox_2.setText(_translate("SemiAutomaticClassificationPlugin", "Create Band set and use Band set tools")) - self.add_new_bandset_checkBox_4.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Create a new band set where bands are added
")) - self.add_new_bandset_checkBox_4.setText(_translate("SemiAutomaticClassificationPlugin", "Add bands in a new Band set")) - self.celsius_checkBox_2.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Enable/Disable calculation of temperature in Celsius from thermal band
")) - self.celsius_checkBox_2.setText(_translate("SemiAutomaticClassificationPlugin", " Brightness temperature in Celsius")) - self.ASTER_tableWidget.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Edit metadata
")) - item = self.ASTER_tableWidget.horizontalHeaderItem(0) - item.setText(_translate("SemiAutomaticClassificationPlugin", "Band")) - item = self.ASTER_tableWidget.horizontalHeaderItem(1) - item.setText(_translate("SemiAutomaticClassificationPlugin", "UnitConversionCoeff")) - item = self.ASTER_tableWidget.horizontalHeaderItem(2) - item.setText(_translate("SemiAutomaticClassificationPlugin", "PixelSize")) - self.pushButton_remove_band_2.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Delete row
")) - self.pushButton_remove_band_2.setText(_translate("SemiAutomaticClassificationPlugin", "Plot")) - self.date_lineEdit_2.setToolTip(_translate("SemiAutomaticClassificationPlugin", "DATE ACQUIRED
")) - self.earth_sun_dist_lineEdit_2.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Earth sun distance
")) - self.satellite_label_9.setText(_translate("SemiAutomaticClassificationPlugin", "Earth sun \n" -"distance")) - self.satellite_label_8.setText(_translate("SemiAutomaticClassificationPlugin", "Date\n" -" (YYYYMMDD)")) - self.satellite_label_7.setText(_translate("SemiAutomaticClassificationPlugin", "Sun elevation")) - self.sun_elev_lineEdit_2.setToolTip(_translate("SemiAutomaticClassificationPlugin", "SUN ELEVATION
")) - self.ulm_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Upper left
")) - self.satellite_label_10.setText(_translate("SemiAutomaticClassificationPlugin", "UTM zone")) - self.utm_zone_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "UTM zone
")) - self.satellite_label_11.setText(_translate("SemiAutomaticClassificationPlugin", "UPPERLEFTM")) - self.satellite_label_17.setText(_translate("SemiAutomaticClassificationPlugin", "LOWERRIGHTM")) - self.lrm_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Lower right
")) - self.label_160.setText(_translate("SemiAutomaticClassificationPlugin", "Metadata")) - self.label_163.setText(_translate("SemiAutomaticClassificationPlugin", " Run")) - self.pushButton_Conversion_3.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Run
")) - self.pushButton_Conversion_3.setText(_translate("SemiAutomaticClassificationPlugin", " RUN")) - self.aster_conversion.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Function to Batch
")) - self.aster_conversion.setText(_translate("SemiAutomaticClassificationPlugin", " BATCH")) - self.tabWidget_preprocessing.setTabText(self.tabWidget_preprocessing.indexOf(self.tab_ASTER), _translate("SemiAutomaticClassificationPlugin", "ASTER")) - self.label_218.setText(_translate("SemiAutomaticClassificationPlugin", " MODIS conversion")) - self.create_bandset_checkBox_3.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Create the Band set automatically and use the checked Band set tools
")) - self.create_bandset_checkBox_3.setText(_translate("SemiAutomaticClassificationPlugin", "Create Band set and use Band set tools")) - self.add_new_bandset_checkBox_5.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Create a new band set where bands are added
")) - self.add_new_bandset_checkBox_5.setText(_translate("SemiAutomaticClassificationPlugin", "Add bands in a new Band set")) - self.label_219.setText(_translate("SemiAutomaticClassificationPlugin", "Select file MODIS (.hdf)")) - self.toolButton_directoryInput_MODIS.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Open a file
")) - self.toolButton_directoryInput_MODIS.setText(_translate("SemiAutomaticClassificationPlugin", "Import library")) - self.nodata_spinBox_8.setToolTip(_translate("SemiAutomaticClassificationPlugin", "No data value
")) - self.nodata_checkBox_7.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, pixels equal to NoData value will be excluded from the output raster
")) - self.nodata_checkBox_7.setText(_translate("SemiAutomaticClassificationPlugin", "Use value as NoData")) - self.reproject_modis_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Reproject bands to WGS 84
")) - self.reproject_modis_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Reproject to WGS 84")) - self.MODIS_tableWidget.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Edit metadata
")) - item = self.MODIS_tableWidget.horizontalHeaderItem(0) - item.setText(_translate("SemiAutomaticClassificationPlugin", "Band")) - item = self.MODIS_tableWidget.horizontalHeaderItem(1) - item.setText(_translate("SemiAutomaticClassificationPlugin", "UnitConversionCoeff")) - self.pushButton_remove_band_3.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Delete row
")) - self.pushButton_remove_band_3.setText(_translate("SemiAutomaticClassificationPlugin", "Plot")) - self.satellite_label_16.setText(_translate("SemiAutomaticClassificationPlugin", "Date (YYYY-MM-DD)")) - self.MODIS_ID_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "DATE ACQUIRED
")) - self.satellite_label_13.setText(_translate("SemiAutomaticClassificationPlugin", "ID")) - self.MODIS_date_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "DATE ACQUIRED
")) - self.label_220.setText(_translate("SemiAutomaticClassificationPlugin", "Metadata")) - self.label_221.setText(_translate("SemiAutomaticClassificationPlugin", " Run")) - self.pushButton_Conversion_4.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Run
")) - self.pushButton_Conversion_4.setText(_translate("SemiAutomaticClassificationPlugin", " RUN")) - self.modis_conversion.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Function to Batch
")) - self.modis_conversion.setText(_translate("SemiAutomaticClassificationPlugin", " BATCH")) - self.tabWidget_preprocessing.setTabText(self.tabWidget_preprocessing.indexOf(self.tab_MODIS), _translate("SemiAutomaticClassificationPlugin", "MODIS")) + self.landsat_conversion.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Function to Script
")) + self.landsat_conversion.setText(_translate("SemiAutomaticClassificationPlugin", " Script")) + self.tabWidget_preprocessing.setTabText(self.tabWidget_preprocessing.indexOf(self.tab_Landsat), _translate("SemiAutomaticClassificationPlugin", "Image conversion")) self.label_142.setText(_translate("SemiAutomaticClassificationPlugin", " Convert vector to raster")) self.label_64.setText(_translate("SemiAutomaticClassificationPlugin", "Select the vector")) self.vector_name_combo.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Select the vector
")) self.toolButton_reload_16.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Refresh list
")) self.toolButton_reload_16.setText(_translate("SemiAutomaticClassificationPlugin", "Plot")) - self.field_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Use the value field of the vector
")) - self.field_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Use the value field of the vector")) - self.field_comboBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Select the value field
")) - self.constant_value_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Use constant value
")) - self.constant_value_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Use constant value")) - self.constant_value_spinBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Value
")) self.label_157.setText(_translate("SemiAutomaticClassificationPlugin", "Select the type of conversion")) self.conversion_type_combo.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Select the type of conversion
")) + self.conversion_type_combo.setItemText(0, _translate("SemiAutomaticClassificationPlugin", "pixel_center")) + self.conversion_type_combo.setItemText(1, _translate("SemiAutomaticClassificationPlugin", "all_touched")) + self.conversion_type_combo.setItemText(2, _translate("SemiAutomaticClassificationPlugin", "area_based")) + self.label_158.setText(_translate("SemiAutomaticClassificationPlugin", "Area precision")) + self.area_precision_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Area precision for "area_based" method
")) + self.area_precision_lineEdit.setText(_translate("SemiAutomaticClassificationPlugin", "20")) + self.nodata_checkBox_10.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, pixels equal to NoData value will be excluded from the output raster
")) + self.nodata_checkBox_10.setText(_translate("SemiAutomaticClassificationPlugin", "Use value as NoData")) + self.nodata_spinBox_12.setToolTip(_translate("SemiAutomaticClassificationPlugin", "NoData value
")) + self.constant_value_radioButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Use constant value
")) + self.constant_value_radioButton.setText(_translate("SemiAutomaticClassificationPlugin", "Use constant value")) + self.constant_value_spinBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Value
")) + self.field_radioButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Use the value field of the vector
")) + self.field_radioButton.setText(_translate("SemiAutomaticClassificationPlugin", "Use the value field of the vector")) + self.field_comboBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Select the value field
")) self.label_156.setText(_translate("SemiAutomaticClassificationPlugin", "Select the reference raster")) + self.extent_checkBox_2.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, align to reference raster
")) + self.extent_checkBox_2.setText(_translate("SemiAutomaticClassificationPlugin", "Minimum extent")) self.toolButton_reload_17.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Refresh list
")) self.toolButton_reload_17.setText(_translate("SemiAutomaticClassificationPlugin", "Plot")) + self.label_169.setText(_translate("SemiAutomaticClassificationPlugin", "Pixel size")) + self.pixel_size_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Output pixel size
")) self.reference_raster_name_combo.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Select the reference raster
")) - self.extent_checkBox_2.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Use the same extent as reference raster
")) - self.extent_checkBox_2.setText(_translate("SemiAutomaticClassificationPlugin", "Same extent as reference raster")) self.label_167.setText(_translate("SemiAutomaticClassificationPlugin", " Run")) self.convert_vector_toolButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Run
")) self.convert_vector_toolButton.setText(_translate("SemiAutomaticClassificationPlugin", " RUN")) - self.vector_to_raster.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Function to Batch
")) - self.vector_to_raster.setText(_translate("SemiAutomaticClassificationPlugin", " BATCH")) + self.vector_to_raster.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Function to Script
")) + self.vector_to_raster.setText(_translate("SemiAutomaticClassificationPlugin", " Script")) self.tabWidget_preprocessing.setTabText(self.tabWidget_preprocessing.indexOf(self.tab_spectral_distance), _translate("SemiAutomaticClassificationPlugin", "Vector to raster")) self.label_128.setText(_translate("SemiAutomaticClassificationPlugin", " Clip band set")) - self.nodata_spinBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "NoData value
")) - self.band_set_comb_spinBox_2.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Band set number
")) - self.label_251.setText(_translate("SemiAutomaticClassificationPlugin", "Select input band set")) - self.label_62.setText(_translate("SemiAutomaticClassificationPlugin", "Output name prefix")) - self.label_16.setText(_translate("SemiAutomaticClassificationPlugin", "Use value as NoData")) self.output_clip_name_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Output name prefix
")) self.output_clip_name_lineEdit.setText(_translate("SemiAutomaticClassificationPlugin", "clip")) + self.clip_virtual_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, output bands are virtual rasters
")) + self.clip_virtual_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Create virtual raster output")) + self.label_62.setText(_translate("SemiAutomaticClassificationPlugin", "Output name prefix")) + self.band_set_comb_spinBox_2.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Band set number
")) + self.label_251.setText(_translate("SemiAutomaticClassificationPlugin", "Select input band set")) + self.show_area_radioButton_3.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Show / hide area
")) + self.show_area_radioButton_3.setText(_translate("SemiAutomaticClassificationPlugin", "Show")) + self.LY_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Lower right Y
")) + self.LY_lineEdit.setPlaceholderText(_translate("SemiAutomaticClassificationPlugin", "Y")) + self.label_11.setText(_translate("SemiAutomaticClassificationPlugin", "UL")) self.LX_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Lower right X
")) self.LX_lineEdit.setPlaceholderText(_translate("SemiAutomaticClassificationPlugin", "X")) - self.UX_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Upper left X
")) - self.UX_lineEdit.setPlaceholderText(_translate("SemiAutomaticClassificationPlugin", "X")) + self.selectUL_toolButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Set area in the map
")) + self.label_12.setText(_translate("SemiAutomaticClassificationPlugin", "LR")) self.UY_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Upper left Y
")) self.UY_lineEdit.setPlaceholderText(_translate("SemiAutomaticClassificationPlugin", "Y")) - self.LY_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Lower right Y
")) - self.LY_lineEdit.setPlaceholderText(_translate("SemiAutomaticClassificationPlugin", "Y")) - self.label_12.setText(_translate("SemiAutomaticClassificationPlugin", "LR")) - self.selectUL_toolButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Set area in the map
")) + self.UX_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Upper left X
")) + self.UX_lineEdit.setPlaceholderText(_translate("SemiAutomaticClassificationPlugin", "X")) + self.coordinates_radioButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Use coordinates for clipping rasters
")) + self.coordinates_radioButton.setText(_translate("SemiAutomaticClassificationPlugin", "Use coordinates for clipping")) self.label_29.setText(_translate("SemiAutomaticClassificationPlugin", " Clip coordinates")) - self.show_area_radioButton_3.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Show / hide area
")) - self.show_area_radioButton_3.setText(_translate("SemiAutomaticClassificationPlugin", "Show")) - self.label_11.setText(_translate("SemiAutomaticClassificationPlugin", "UL")) self.shapefile_comboBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Select the vector for clipping
")) - self.shapefile_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Use vector boundaries for clipping rasters
")) - self.shapefile_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Use vector for clipping")) self.toolButton_reload_8.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Refresh list
")) self.toolButton_reload_8.setText(_translate("SemiAutomaticClassificationPlugin", "Plot")) - self.temporary_ROI_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Use temporary ROI boundaries for clipping rasters
")) - self.temporary_ROI_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Use temporary ROI for clipping")) self.vector_field_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, clip iterating through each vector polygon and add field value to the output name
")) self.vector_field_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Use vector field for output name")) self.class_field_comboBox_3.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Select the vector field
")) + self.temporary_ROI_radioButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Use temporary ROI boundaries for clipping rasters
")) + self.temporary_ROI_radioButton.setText(_translate("SemiAutomaticClassificationPlugin", "Use temporary ROI for clipping")) + self.vector_radioButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Use vector boundaries for clipping rasters
")) + self.vector_radioButton.setText(_translate("SemiAutomaticClassificationPlugin", "Use vector for clipping")) self.label_164.setText(_translate("SemiAutomaticClassificationPlugin", " Run")) self.clip_Button.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Run
")) self.clip_Button.setText(_translate("SemiAutomaticClassificationPlugin", " RUN")) - self.clip_multiple_rasters.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Function to Batch
")) - self.clip_multiple_rasters.setText(_translate("SemiAutomaticClassificationPlugin", " BATCH")) - self.tabWidget_preprocessing.setTabText(self.tabWidget_preprocessing.indexOf(self.tab_clip), _translate("SemiAutomaticClassificationPlugin", "Clip multiple rasters")) + self.clip_multiple_rasters.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Function to Script
")) + self.clip_multiple_rasters.setText(_translate("SemiAutomaticClassificationPlugin", " Script")) + self.tabWidget_preprocessing.setTabText(self.tabWidget_preprocessing.indexOf(self.tab_clip), _translate("SemiAutomaticClassificationPlugin", "Clip raster bands")) self.band_set_comb_spinBox_14.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Band set number
")) self.label_264.setText(_translate("SemiAutomaticClassificationPlugin", "Select input band set")) - self.label_249.setText(_translate("SemiAutomaticClassificationPlugin", " Reproject raster bands")) - self.raster_align_comboBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Select the reference raster
")) - self.use_align_raster_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Align to raster
")) - self.use_align_raster_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Align to raster")) + self.label_249.setText(_translate("SemiAutomaticClassificationPlugin", " Reproject and resample band set")) + self.align_radioButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Align to raster
")) + self.align_radioButton.setText(_translate("SemiAutomaticClassificationPlugin", "Align to raster")) self.toolButton_reload_25.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Refresh list
")) self.toolButton_reload_25.setText(_translate("SemiAutomaticClassificationPlugin", "Plot")) self.same_extent_raster_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Keep the same extent as the reference raster
")) self.same_extent_raster_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "same extent as reference")) - self.epsg_code_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "EPSG value
")) - self.use_epsg_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Use EPSG value
")) - self.use_epsg_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Use EPSG code")) + self.raster_align_comboBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Select the reference raster
")) + self.epsg_radioButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Use EPSG code
")) + self.epsg_radioButton.setText(_translate("SemiAutomaticClassificationPlugin", "Use EPSG code")) + self.y_resolution_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Y resolution
")) self.label_267.setText(_translate("SemiAutomaticClassificationPlugin", " Y resolution")) self.label_266.setText(_translate("SemiAutomaticClassificationPlugin", " X resolution")) + self.epsg_code_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "EPSG value
")) self.x_resolution_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "X resolution
")) - self.y_resolution_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Y resolution
")) self.resample_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, new pixel size is original pixel size times this factor
")) self.resample_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Resample pixel factor")) self.resample_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Resample factor
")) @@ -10186,9 +6955,15 @@ def retranslateUi(self, SemiAutomaticClassificationPlugin): self.label_265.setText(_translate("SemiAutomaticClassificationPlugin", "Output name prefix")) self.reproj_output_name_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Output name prefix
")) self.reproj_output_name_lineEdit.setText(_translate("SemiAutomaticClassificationPlugin", "reproj")) + self.virtual_output_checkBox_4.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, use virtual output to merge multiprocess parts
")) + self.virtual_output_checkBox_4.setText(_translate("SemiAutomaticClassificationPlugin", "Virtual output")) + self.compress_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, compress raster output
")) + self.compress_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Compress")) + self.resample_lineEdit_2.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Compression method
")) + self.resample_lineEdit_2.setText(_translate("SemiAutomaticClassificationPlugin", "LZW")) self.label_263.setText(_translate("SemiAutomaticClassificationPlugin", " Run")) - self.reproject_raster_bands.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Function to Batch
")) - self.reproject_raster_bands.setText(_translate("SemiAutomaticClassificationPlugin", " BATCH")) + self.reproject_raster_bands.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Function to Script
")) + self.reproject_raster_bands.setText(_translate("SemiAutomaticClassificationPlugin", " Script")) self.reproject_Button.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Run
")) self.reproject_Button.setText(_translate("SemiAutomaticClassificationPlugin", " RUN")) self.tabWidget_preprocessing.setTabText(self.tabWidget_preprocessing.indexOf(self.tab_reproject_bands), _translate("SemiAutomaticClassificationPlugin", "Reproject raster bands")) @@ -10201,38 +6976,42 @@ def retranslateUi(self, SemiAutomaticClassificationPlugin): self.label_61.setText(_translate("SemiAutomaticClassificationPlugin", "Output name prefix")) self.output_name_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Output name prefix
")) self.output_name_lineEdit.setText(_translate("SemiAutomaticClassificationPlugin", "split")) - self.split_raster_bands.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Function to Batch
")) - self.split_raster_bands.setText(_translate("SemiAutomaticClassificationPlugin", " BATCH")) + self.split_raster_bands.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Function to Script
")) + self.split_raster_bands.setText(_translate("SemiAutomaticClassificationPlugin", " Script")) self.split_Button.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Run
")) self.split_Button.setText(_translate("SemiAutomaticClassificationPlugin", " RUN")) self.tabWidget_preprocessing.setTabText(self.tabWidget_preprocessing.indexOf(self.tab_split_raster), _translate("SemiAutomaticClassificationPlugin", "Split raster bands")) self.label_252.setText(_translate("SemiAutomaticClassificationPlugin", "Select input band set")) self.band_set_comb_spinBox_3.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Band set number
")) - self.stack_raster_bands.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Function to Batch
")) - self.stack_raster_bands.setText(_translate("SemiAutomaticClassificationPlugin", " BATCH")) + self.stack_raster_bands.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Function to Script
")) + self.stack_raster_bands.setText(_translate("SemiAutomaticClassificationPlugin", " Script")) self.stack_Button.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Run
")) self.stack_Button.setText(_translate("SemiAutomaticClassificationPlugin", " RUN")) self.label_223.setText(_translate("SemiAutomaticClassificationPlugin", " Stack band set")) self.label_226.setText(_translate("SemiAutomaticClassificationPlugin", " Run")) self.tabWidget_preprocessing.setTabText(self.tabWidget_preprocessing.indexOf(self.tab_stack_bands), _translate("SemiAutomaticClassificationPlugin", "Stack raster bands")) self.label_134.setText(_translate("SemiAutomaticClassificationPlugin", " Mosaic of band sets")) - self.label_135.setText(_translate("SemiAutomaticClassificationPlugin", "Output name prefix")) self.nodata_checkBox_9.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, pixels equal to NoData value will be excluded from the output raster
")) self.nodata_checkBox_9.setText(_translate("SemiAutomaticClassificationPlugin", "Use value as NoData")) - self.nodata_spinBox_10.setToolTip(_translate("SemiAutomaticClassificationPlugin", "NoData value
")) - self.mosaic_output_name_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Output name prefix
")) - self.mosaic_output_name_lineEdit.setText(_translate("SemiAutomaticClassificationPlugin", "mosaic")) - self.label_144.setText(_translate("SemiAutomaticClassificationPlugin", "Band set list")) - self.mosaic_band_sets_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "List of band set numbers separated by comma ,
Use * for selecting all the band sets
If checked, output bands are virtual rasters
")) self.mosaic_virtual_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Create virtual raster output")) + self.mosaic_output_prefix.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Output prefix
")) + self.mosaic_output_prefix.setText(_translate("SemiAutomaticClassificationPlugin", "mosaic_")) + self.nodata_spinBox_10.setToolTip(_translate("SemiAutomaticClassificationPlugin", "NoData value
")) + self.mosaic_output_name_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Output name
")) + self.mosaic_output_name_lineEdit.setText(_translate("SemiAutomaticClassificationPlugin", "band_")) + self.label_135.setText(_translate("SemiAutomaticClassificationPlugin", "Output name")) + self.label_137.setText(_translate("SemiAutomaticClassificationPlugin", "Output prefix")) + self.mosaic_band_sets_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "List of band set numbers separated by comma ,
Use# for selecting all the band sets
Run
")) self.mosaic_bandsets_toolButton.setText(_translate("SemiAutomaticClassificationPlugin", " RUN")) - self.mosaic_bandsets.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Function to Batch
")) - self.mosaic_bandsets.setText(_translate("SemiAutomaticClassificationPlugin", " BATCH")) + self.mosaic_bandsets.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Function to Script
")) + self.mosaic_bandsets.setText(_translate("SemiAutomaticClassificationPlugin", " Script")) self.label_182.setText(_translate("SemiAutomaticClassificationPlugin", " Run")) self.tabWidget_preprocessing.setTabText(self.tabWidget_preprocessing.indexOf(self.tab_mosaic_band_sets), _translate("SemiAutomaticClassificationPlugin", "Mosaic band sets")) + self.label_138.setText(_translate("SemiAutomaticClassificationPlugin", " Mask of band set")) self.label_260.setText(_translate("SemiAutomaticClassificationPlugin", "Select input band set")) self.band_set_comb_spinBox_9.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Band set number
")) self.classification_name_combo_4.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Select the classification
")) @@ -10241,255 +7020,274 @@ def retranslateUi(self, SemiAutomaticClassificationPlugin): self.label_186.setText(_translate("SemiAutomaticClassificationPlugin", "Select the classification")) self.toolButton_reload_23.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Refresh list
")) self.toolButton_reload_23.setText(_translate("SemiAutomaticClassificationPlugin", "Plot")) - self.label_140.setText(_translate("SemiAutomaticClassificationPlugin", "Output name prefix")) self.mask_output_name_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Output name prefix
")) - self.mask_output_name_lineEdit.setText(_translate("SemiAutomaticClassificationPlugin", "mask")) - self.cloud_buffer_spinBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Size in pixels
")) + self.mask_output_name_lineEdit.setText(_translate("SemiAutomaticClassificationPlugin", "mask_")) self.cloud_buffer_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, create a buffer for class values
")) self.cloud_buffer_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Use buffer of pixel size")) self.nodata_spinBox_11.setToolTip(_translate("SemiAutomaticClassificationPlugin", "NoData value
")) self.label_141.setText(_translate("SemiAutomaticClassificationPlugin", "Output NoData value")) + self.cloud_buffer_spinBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Size in pixels
")) + self.label_140.setText(_translate("SemiAutomaticClassificationPlugin", "Output name prefix")) + self.mask_virtual_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, output bands are virtual rasters
")) + self.mask_virtual_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Create virtual raster output")) self.cloud_mask_toolButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Run
")) self.cloud_mask_toolButton.setText(_translate("SemiAutomaticClassificationPlugin", " RUN")) - self.cloud_masking.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Function to Batch
")) - self.cloud_masking.setText(_translate("SemiAutomaticClassificationPlugin", " BATCH")) + self.cloud_masking.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Function to Script
")) + self.cloud_masking.setText(_translate("SemiAutomaticClassificationPlugin", " Script")) self.label_185.setText(_translate("SemiAutomaticClassificationPlugin", " Run")) - self.label_138.setText(_translate("SemiAutomaticClassificationPlugin", " Mask of band set")) - self.tabWidget_preprocessing.setTabText(self.tabWidget_preprocessing.indexOf(self.tab_cloud_mask), _translate("SemiAutomaticClassificationPlugin", "Cloud masking")) - self.GOES_nodata_spinBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "No data value
")) - self.GOES_nodata_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, pixels equal to NoData value will be excluded from the output raster
")) - self.GOES_nodata_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Use value as NoData")) - self.label_273.setText(_translate("SemiAutomaticClassificationPlugin", " GOES conversion")) - self.GOES_create_bandset_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Create the Band set automatically and use the checked Band set tools
")) - self.GOES_create_bandset_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Create Band set and use Band set tools")) - self.label_274.setText(_translate("SemiAutomaticClassificationPlugin", "Directory containing GOES bands")) - self.GOES_toolButton_directoryInput.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Select a directory
")) - self.GOES_toolButton_directoryInput.setText(_translate("SemiAutomaticClassificationPlugin", "Import library")) - self.add_new_bandset_checkBox_7.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Create a new band set where bands are added
")) - self.add_new_bandset_checkBox_7.setText(_translate("SemiAutomaticClassificationPlugin", "Add bands in a new Band set")) - self.GOES_tableWidget.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Edit metadata
")) - item = self.GOES_tableWidget.horizontalHeaderItem(0) - item.setText(_translate("SemiAutomaticClassificationPlugin", "Band")) - self.GOES_pushButton_remove_band.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Delete row
")) - self.GOES_pushButton_remove_band.setText(_translate("SemiAutomaticClassificationPlugin", "Plot")) - self.label_277.setText(_translate("SemiAutomaticClassificationPlugin", "Metadata")) - self.satellite_label_20.setText(_translate("SemiAutomaticClassificationPlugin", "Satellite")) - self.GOES_satellite_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Satellite (e.g. Sentinel-3A)
")) - self.label_278.setText(_translate("SemiAutomaticClassificationPlugin", " Run")) - self.pushButton_Conversion_8.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Run
")) - self.pushButton_Conversion_8.setText(_translate("SemiAutomaticClassificationPlugin", " RUN")) - self.goes_conversion.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Function to Batch
")) - self.goes_conversion.setText(_translate("SemiAutomaticClassificationPlugin", " BATCH")) - self.tabWidget_preprocessing.setTabText(self.tabWidget_preprocessing.indexOf(self.tab_GOES), _translate("SemiAutomaticClassificationPlugin", "GOES")) - self.label_283.setText(_translate("SemiAutomaticClassificationPlugin", " Run")) - self.label_281.setText(_translate("SemiAutomaticClassificationPlugin", "Matrix file (optional)")) - self.toolButton_input_matrix.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Open a file
")) - self.label_279.setText(_translate("SemiAutomaticClassificationPlugin", "Output name prefix")) - self.neighbor_output_name_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Output name prefix
")) - self.neighbor_output_name_lineEdit.setText(_translate("SemiAutomaticClassificationPlugin", "neighbor")) - self.neighbor_virtual_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, output bands are virtual rasters
")) - self.neighbor_virtual_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Create virtual raster output")) - self.neighbor_pixels.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Function to Batch
")) - self.neighbor_pixels.setText(_translate("SemiAutomaticClassificationPlugin", " BATCH")) - self.class_neighbor_toolButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Run
")) - self.class_neighbor_toolButton.setText(_translate("SemiAutomaticClassificationPlugin", " RUN")) - self.label_286.setText(_translate("SemiAutomaticClassificationPlugin", " Neighbor pixels")) - self.statistic_lineEdit_2.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Enter a value
")) - self.statistic_name_combobox_2.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Select a statistic
")) - self.label_284.setText(_translate("SemiAutomaticClassificationPlugin", "Select a statistic")) - self.label_285.setText(_translate("SemiAutomaticClassificationPlugin", " Statistic")) - self.label_282.setText(_translate("SemiAutomaticClassificationPlugin", "Select input band set")) - self.label_280.setText(_translate("SemiAutomaticClassificationPlugin", "Neighbor distance in pixels")) - self.band_set_comb_spinBox_15.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Band set number
")) - self.class_neighbor_threshold_spinBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Distance in pixels
")) - self.circular_structure_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, neighbor pixels are calculated inside a circle of radius equal to the distance in pixels
")) - self.circular_structure_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Circular")) - self.tabWidget_preprocessing.setTabText(self.tabWidget_preprocessing.indexOf(self.tab_neighbor_pixels), _translate("SemiAutomaticClassificationPlugin", "Neighbor pixels")) + self.tabWidget_preprocessing.setTabText(self.tabWidget_preprocessing.indexOf(self.tab_cloud_mask), _translate("SemiAutomaticClassificationPlugin", "Masking bands")) self.SCP_tabs.setTabText(self.SCP_tabs.indexOf(self.tab_preprocessing), _translate("SemiAutomaticClassificationPlugin", "Preprocessing")) + self.label_72.setText(_translate("SemiAutomaticClassificationPlugin", " Combination of band values")) + self.band_set_comb_spinBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Band set number
")) + self.label_250.setText(_translate("SemiAutomaticClassificationPlugin", "Select input band set (of classifications)")) + self.nodata_checkBox_12.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, pixels equal to NoData value will be excluded from the output raster
")) + self.nodata_checkBox_12.setText(_translate("SemiAutomaticClassificationPlugin", "Use value as NoData")) + self.nodata_spinBox_16.setToolTip(_translate("SemiAutomaticClassificationPlugin", "NoData value
")) + self.band_combination.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Function to Script
")) + self.band_combination.setText(_translate("SemiAutomaticClassificationPlugin", " Script")) self.label_253.setText(_translate("SemiAutomaticClassificationPlugin", " Run")) self.calculateBandSetComb_toolButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Run
")) self.calculateBandSetComb_toolButton.setText(_translate("SemiAutomaticClassificationPlugin", " RUN")) - self.band_combination.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Function to Batch
")) - self.band_combination.setText(_translate("SemiAutomaticClassificationPlugin", " BATCH")) - self.label_250.setText(_translate("SemiAutomaticClassificationPlugin", "Select input band set (of classifications)")) - self.band_set_comb_spinBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Band set number
")) - self.label_72.setText(_translate("SemiAutomaticClassificationPlugin", " Combination of band values")) self.toolBox_band_set_combination.setItemText(self.toolBox_band_set_combination.indexOf(self.page_29), _translate("SemiAutomaticClassificationPlugin", "Input")) self.band_set_comb_textBrowser.setHtml(_translate("SemiAutomaticClassificationPlugin", "\n" "\n" +"\n" "Band set number
")) + self.label_295.setText(_translate("SemiAutomaticClassificationPlugin", "Output name")) + self.output_name_lineEdit_2.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Enter output name
")) + self.output_name_lineEdit_2.setText(_translate("SemiAutomaticClassificationPlugin", "dilation_")) + self.virtual_output_checkBox_1.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, use virtual output to merge multiprocess parts
")) + self.virtual_output_checkBox_1.setText(_translate("SemiAutomaticClassificationPlugin", "Virtual output")) + self.label_291.setText(_translate("SemiAutomaticClassificationPlugin", "Class values")) + self.dilation_classes_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Enter class values separated by , or -
")) + self.band_dilation_toolButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Run
")) + self.band_dilation_toolButton.setText(_translate("SemiAutomaticClassificationPlugin", " RUN")) + self.label_290.setText(_translate("SemiAutomaticClassificationPlugin", "Size in pixels")) + self.dilation_threshold_spinBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Size in pixels
")) + self.circular_structure_checkBox_2.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, neighbor pixels are calculated inside a circle of radius equal to the distance in pixels
")) + self.circular_structure_checkBox_2.setText(_translate("SemiAutomaticClassificationPlugin", "Circular")) + self.band_dilation.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Function to Script
")) + self.band_dilation.setText(_translate("SemiAutomaticClassificationPlugin", " Script")) + self.label_293.setText(_translate("SemiAutomaticClassificationPlugin", " Band dilation")) + self.tabWidget_4.setTabText(self.tabWidget_4.indexOf(self.band_dilation_tab), _translate("SemiAutomaticClassificationPlugin", "Dilation")) + self.label_202.setText(_translate("SemiAutomaticClassificationPlugin", " Band erosion")) + self.classification_erosion.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Function to Script
")) + self.classification_erosion.setText(_translate("SemiAutomaticClassificationPlugin", " Script")) + self.label_151.setText(_translate("SemiAutomaticClassificationPlugin", "Class values")) + self.erosion_classes_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Enter class values separated by , or -
")) + self.label_296.setText(_translate("SemiAutomaticClassificationPlugin", "Select input band set (of classifications)")) + self.band_set_comb_spinBox_17.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Band set number
")) + self.class_erosion_toolButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Run
")) + self.class_erosion_toolButton.setText(_translate("SemiAutomaticClassificationPlugin", " RUN")) + self.label_175.setText(_translate("SemiAutomaticClassificationPlugin", " Run")) + self.label_149.setText(_translate("SemiAutomaticClassificationPlugin", "Size in pixels")) + self.erosion_threshold_spinBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Size in pixels
")) + self.circular_structure_checkBox_3.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, neighbor pixels are calculated inside a circle of radius equal to the distance in pixels
")) + self.circular_structure_checkBox_3.setText(_translate("SemiAutomaticClassificationPlugin", "Circular")) + self.label_297.setText(_translate("SemiAutomaticClassificationPlugin", "Output name")) + self.output_name_lineEdit_3.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Enter output name
")) + self.output_name_lineEdit_3.setText(_translate("SemiAutomaticClassificationPlugin", "erosion_")) + self.virtual_output_checkBox_2.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, use virtual output to merge multiprocess parts
")) + self.virtual_output_checkBox_2.setText(_translate("SemiAutomaticClassificationPlugin", "Virtual output")) + self.tabWidget_4.setTabText(self.tabWidget_4.indexOf(self.band_erosion_tab), _translate("SemiAutomaticClassificationPlugin", "Erosion")) + self.label_195.setText(_translate("SemiAutomaticClassificationPlugin", " Band sieve")) + self.label_298.setText(_translate("SemiAutomaticClassificationPlugin", "Select input band set (of classifications)")) + self.band_set_comb_spinBox_18.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Band set number
")) + self.label_174.setText(_translate("SemiAutomaticClassificationPlugin", " Run")) + self.sieve_toolButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Run
")) + self.sieve_toolButton.setText(_translate("SemiAutomaticClassificationPlugin", " RUN")) + self.classification_sieve.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Function to Script
")) + self.classification_sieve.setText(_translate("SemiAutomaticClassificationPlugin", " Script")) + self.label_133.setText(_translate("SemiAutomaticClassificationPlugin", "Size threshold")) + self.sieve_threshold_spinBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Size threshold in pixels
")) + self.label_136.setText(_translate("SemiAutomaticClassificationPlugin", "Pixel connection")) + self.sieve_connection_combo.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Pixel connection
")) + self.sieve_connection_combo.setItemText(0, _translate("SemiAutomaticClassificationPlugin", "4")) + self.sieve_connection_combo.setItemText(1, _translate("SemiAutomaticClassificationPlugin", "8")) + self.label_299.setText(_translate("SemiAutomaticClassificationPlugin", "Output name")) + self.output_name_lineEdit_4.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Enter output name
")) + self.output_name_lineEdit_4.setText(_translate("SemiAutomaticClassificationPlugin", "sieve_")) + self.virtual_output_checkBox_3.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, use virtual output to merge multiprocess parts
")) + self.virtual_output_checkBox_3.setText(_translate("SemiAutomaticClassificationPlugin", "Virtual output")) + self.tabWidget_4.setTabText(self.tabWidget_4.indexOf(self.band_sieve_tab), _translate("SemiAutomaticClassificationPlugin", "Sieve")) self.label_58.setText(_translate("SemiAutomaticClassificationPlugin", " Principal Components Analysis of band set")) + self.band_set_comb_spinBox_4.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Band set number
")) + self.pca_Button.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Run
")) + self.pca_Button.setText(_translate("SemiAutomaticClassificationPlugin", " RUN")) + self.nodata_spinBox_5.setToolTip(_translate("SemiAutomaticClassificationPlugin", "NoData value
")) self.nodata_checkBox_4.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, pixels equal to NoData value will be excluded from the output raster
")) self.nodata_checkBox_4.setText(_translate("SemiAutomaticClassificationPlugin", "Use value as NoData")) + self.pca_components_spinBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Number of components
")) self.num_comp_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, calculate this number of components only
")) self.num_comp_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Number of components")) - self.nodata_spinBox_5.setToolTip(_translate("SemiAutomaticClassificationPlugin", "NoData value
")) - self.pca_Button.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Run
")) - self.pca_Button.setText(_translate("SemiAutomaticClassificationPlugin", " RUN")) self.label_254.setText(_translate("SemiAutomaticClassificationPlugin", "Select input band set")) - self.band_set_comb_spinBox_4.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Band set number
")) - self.pca_components_spinBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Number of components
")) self.label_166.setText(_translate("SemiAutomaticClassificationPlugin", " Run")) - self.pca.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Function to Batch
")) - self.pca.setText(_translate("SemiAutomaticClassificationPlugin", " BATCH")) + self.pca.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Function to Script
")) + self.pca.setText(_translate("SemiAutomaticClassificationPlugin", " Script")) self.toolBox_PCA.setItemText(self.toolBox_PCA.indexOf(self.page_16), _translate("SemiAutomaticClassificationPlugin", "Input")) self.toolBox_PCA.setItemText(self.toolBox_PCA.indexOf(self.page_17), _translate("SemiAutomaticClassificationPlugin", "Output")) self.tabWidget_4.setTabText(self.tabWidget_4.indexOf(self.PCA_tab), _translate("SemiAutomaticClassificationPlugin", "PCA")) - self.label_78.setText(_translate("SemiAutomaticClassificationPlugin", " Clustering of band set")) - self.isodata_radioButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, use ISODATA
")) - self.isodata_radioButton.setText(_translate("SemiAutomaticClassificationPlugin", "ISODATA")) - self.band_set_comb_spinBox_5.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Band set number
")) - self.label_230.setText(_translate("SemiAutomaticClassificationPlugin", "Method ")) - self.label_255.setText(_translate("SemiAutomaticClassificationPlugin", "Select input band set")) - self.kmeans_radioButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, use K-means
")) - self.kmeans_radioButton.setText(_translate("SemiAutomaticClassificationPlugin", "&K-means ")) - self.label_225.setText(_translate("SemiAutomaticClassificationPlugin", "Max number of iterations")) - self.thresh_doubleSpinBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Threshold
")) - self.std_dev_doubleSpinBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Threshold
")) - self.kmean_threshold_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, for K-means: iteration is terminated if distance is lower than threshold; for ISODATA: signatures are merged if distance is greater than threshold
")) - self.kmean_threshold_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Distance threshold")) - self.nodata_spinBox_9.setToolTip(_translate("SemiAutomaticClassificationPlugin", "NoData value
")) - self.kmeans_iter_spinBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Set the maximum number of iterations
")) - self.label_228.setText(_translate("SemiAutomaticClassificationPlugin", "ISODATA max standard deviation")) - self.nodata_checkBox_8.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, pixels equal to NoData value will be excluded from the output raster
")) - self.nodata_checkBox_8.setText(_translate("SemiAutomaticClassificationPlugin", "Use value as NoData")) - self.kmeans_classes_spinBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Number of classes
")) - self.label_224.setText(_translate("SemiAutomaticClassificationPlugin", "Number of classes")) - self.label_229.setText(_translate("SemiAutomaticClassificationPlugin", "ISODATA minimum class size in pixels")) - self.min_size_class_spinBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Minimum class size in pixels
")) - self.min_distance_radioButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, use Minimum Distance algorithm
")) - self.min_distance_radioButton.setText(_translate("SemiAutomaticClassificationPlugin", "Minimum Distance")) - self.kmean_save_siglist_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, save the resulting signatures to Signature list
")) - self.kmean_save_siglist_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Save resulting signatures to Signature list")) - self.label_227.setText(_translate("SemiAutomaticClassificationPlugin", "Distance algorithm")) - self.label_104.setText(_translate("SemiAutomaticClassificationPlugin", " Seed signatures")) - self.kmean_siglist_radioButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, use signatures in Signature list as seed signatures
")) - self.kmean_siglist_radioButton.setText(_translate("SemiAutomaticClassificationPlugin", "Use Signature list as seed signatures")) - self.kmean_randomsiglist_radioButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, calculate seed signatures from random pixels
")) - self.kmean_randomsiglist_radioButton.setText(_translate("SemiAutomaticClassificationPlugin", "Use random seed signatures")) - self.kmean_minmax_radioButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, calculate seed signatures from minimum and maximum values of bands
")) - self.kmean_minmax_radioButton.setText(_translate("SemiAutomaticClassificationPlugin", "Seed signatures from band values")) - self.spectral_angle_map_radioButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, use Spectral Angle Mapping algorithm (only for K-means)
")) - self.spectral_angle_map_radioButton.setText(_translate("SemiAutomaticClassificationPlugin", "Spectral Angle Mapping")) - self.label_179.setText(_translate("SemiAutomaticClassificationPlugin", " Run")) - self.kmeans_Button.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Run
")) - self.kmeans_Button.setText(_translate("SemiAutomaticClassificationPlugin", " RUN")) - self.clustering.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Function to Batch
")) - self.clustering.setText(_translate("SemiAutomaticClassificationPlugin", " BATCH")) - self.toolBox_kmeans.setItemText(self.toolBox_kmeans.indexOf(self.page_18), _translate("SemiAutomaticClassificationPlugin", "Input")) - self.toolBox_kmeans.setItemText(self.toolBox_kmeans.indexOf(self.page_23), _translate("SemiAutomaticClassificationPlugin", "Output")) - self.tabWidget_4.setTabText(self.tabWidget_4.indexOf(self.tab_kmeans), _translate("SemiAutomaticClassificationPlugin", "Clustering")) - self.min_distance_radioButton_2.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, use Minimum Distance algorithm
")) - self.min_distance_radioButton_2.setText(_translate("SemiAutomaticClassificationPlugin", "Minimum Distance")) - self.label_231.setText(_translate("SemiAutomaticClassificationPlugin", "Distance algorithm")) - self.spectral_angle_map_radioButton_2.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, use Spectral Angle Mapping algorithm (only for K-means)
")) - self.spectral_angle_map_radioButton_2.setText(_translate("SemiAutomaticClassificationPlugin", "Spectral Angle Mapping")) - self.label_137.setText(_translate("SemiAutomaticClassificationPlugin", "Spectral distance of band sets")) - self.distance_threshold_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, calculate a raster of changes where distance is above threshold
")) - self.distance_threshold_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Distance threshold")) - self.thresh_doubleSpinBox_2.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Threshold
")) - self.label_256.setText(_translate("SemiAutomaticClassificationPlugin", "Select first input band set")) - self.band_set_comb_spinBox_7.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Band set number
")) - self.label_257.setText(_translate("SemiAutomaticClassificationPlugin", "Select second input band set")) - self.band_set_comb_spinBox_6.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Band set number
")) - self.label_183.setText(_translate("SemiAutomaticClassificationPlugin", " Run")) - self.spectral_distance_bandsets_toolButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Run
")) - self.spectral_distance_bandsets_toolButton.setText(_translate("SemiAutomaticClassificationPlugin", " RUN")) - self.spectral_distance.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Function to Batch
")) - self.spectral_distance.setText(_translate("SemiAutomaticClassificationPlugin", " BATCH")) - self.tabWidget_4.setTabText(self.tabWidget_4.indexOf(self.tab_spectral_dist), _translate("SemiAutomaticClassificationPlugin", "Spectral distance")) - self.label_32.setText(_translate("SemiAutomaticClassificationPlugin", "Use")) - self.macroclass_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Use the ID of macroclasses for the classification
")) - self.macroclass_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "MC ID")) - self.class_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Use the ID of classes for the classification
")) - self.class_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "C ID")) - self.algorithm_weight_button.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Open tab Algorithm band weight
")) - self.algorithm_weight_button.setText(_translate("SemiAutomaticClassificationPlugin", "W")) - self.algorithm_combo.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Select a classification algorithm
")) - self.algorithm_combo.setItemText(0, _translate("SemiAutomaticClassificationPlugin", "Minimum Distance")) - self.algorithm_combo.setItemText(1, _translate("SemiAutomaticClassificationPlugin", "Maximum Likelihood")) - self.algorithm_combo.setItemText(2, _translate("SemiAutomaticClassificationPlugin", "Spectral Angle Mapping")) - self.band_set_comb_spinBox_12.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Band set number
")) - self.label_261.setText(_translate("SemiAutomaticClassificationPlugin", "Select input band set")) self.label_240.setText(_translate("SemiAutomaticClassificationPlugin", " Algorithm")) - self.alg_threshold_SpinBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Set a classification threshold for all signatures
")) - self.algorithm_threshold_button.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Open tab Signature threshold
")) - self.algorithm_threshold_button.setText(_translate("SemiAutomaticClassificationPlugin", "W")) - self.label_234.setText(_translate("SemiAutomaticClassificationPlugin", "Threshold")) - self.label_243.setText(_translate("SemiAutomaticClassificationPlugin", "Classification")) - self.LC_signature_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, the Land Cover Signature Classification is used
")) - self.LC_signature_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "LCS")) - self.label_235.setText(_translate("SemiAutomaticClassificationPlugin", "Use")) - self.LC_signature_button.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Open tab LCS threshold
")) - self.LCS_leave_unclassified_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, the selected Algorithm is used only for class overlapping pixels of the Land Cover Signature Classification
")) - self.LCS_leave_unclassified_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "only overlap")) - self.label_241.setText(_translate("SemiAutomaticClassificationPlugin", " Land Cover Signature Classification")) - self.LCS_class_algorithm_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, the selected Algorithm is used for unclassified pixels of the Land Cover Signature Classification
")) - self.LCS_class_algorithm_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Algorithm")) - self.label_242.setText(_translate("SemiAutomaticClassificationPlugin", " Classification output")) - self.resetQmlButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Reset
")) - self.resetQmlButton.setText(_translate("SemiAutomaticClassificationPlugin", "Import library")) - self.label_238.setText(_translate("SemiAutomaticClassificationPlugin", "Load qml style")) - self.qml_Button.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Select qml style
")) - self.qml_Button.setText(_translate("SemiAutomaticClassificationPlugin", "Import library")) - self.qml_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Qml file path
")) - self.mask_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Select an optional mask vector
")) - self.mask_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Apply mask")) - self.resetMaskButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Reset
")) - self.resetMaskButton.setText(_translate("SemiAutomaticClassificationPlugin", "Import library")) - self.mask_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Path of the optional mask shapefile
")) - self.vector_output_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Create a classification shapefile after the classification process
")) - self.vector_output_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Create vector")) - self.report_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Calculate a classification report
")) - self.report_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Classification report")) - self.alg_files_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If enabled, the rasters calculated by the classification algorithm (one per signature) are saved along with the classification
")) - self.alg_files_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Save algorithm files")) + self.label_261.setText(_translate("SemiAutomaticClassificationPlugin", "Select input band set")) + self.label_243.setText(_translate("SemiAutomaticClassificationPlugin", " Input")) + self.band_set_comb_spinBox_12.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Band set number
")) + self.linear_scaling_radioButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Linear scaling normalization
")) + self.linear_scaling_radioButton.setText(_translate("SemiAutomaticClassificationPlugin", "Linear scaling")) + self.z_score_radioButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Z-score normalizatin
")) + self.z_score_radioButton.setText(_translate("SemiAutomaticClassificationPlugin", "Z-score")) + self.input_normalization_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, use input normalization
")) + self.input_normalization_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Use input normalization")) + self.label_32.setText(_translate("SemiAutomaticClassificationPlugin", "Use training")) + self.macroclass_radioButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Use the ID of macroclasses for the classification
")) + self.macroclass_radioButton.setText(_translate("SemiAutomaticClassificationPlugin", "Macroclass ID")) + self.class_radioButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Use the ID of classes for the classification
")) + self.class_radioButton.setText(_translate("SemiAutomaticClassificationPlugin", "Class ID")) + self.classification.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Function to Script
")) + self.classification.setText(_translate("SemiAutomaticClassificationPlugin", " Script")) + self.label_239.setText(_translate("SemiAutomaticClassificationPlugin", " Run")) + self.save_classifier_button.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Save classifier to file
")) + self.save_classifier_button.setText(_translate("SemiAutomaticClassificationPlugin", " Save classifier")) + self.load_classifier_Button.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Select a previously saved classifier
")) + self.load_classifier_Button.setText(_translate("SemiAutomaticClassificationPlugin", "Import library")) self.button_classification.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Run
")) self.button_classification.setText(_translate("SemiAutomaticClassificationPlugin", " RUN")) - self.label_239.setText(_translate("SemiAutomaticClassificationPlugin", " Run")) - self.classification.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Function to Batch
")) - self.classification.setText(_translate("SemiAutomaticClassificationPlugin", " BATCH")) - self.tabWidget_4.setTabText(self.tabWidget_4.indexOf(self.tab_classification), _translate("SemiAutomaticClassificationPlugin", "Classification")) - self.label_233.setText(_translate("SemiAutomaticClassificationPlugin", "Use")) - self.macroclass_checkBox_rf.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Use the ID of macroclasses for the classification
")) - self.macroclass_checkBox_rf.setText(_translate("SemiAutomaticClassificationPlugin", "MC ID")) - self.class_checkBox_rf.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Use the ID of classes for the classification
")) - self.class_checkBox_rf.setText(_translate("SemiAutomaticClassificationPlugin", "C ID")) - self.band_set_comb_spinBox_13.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Band set number
")) - self.label_262.setText(_translate("SemiAutomaticClassificationPlugin", "Select input band set")) - self.label_245.setText(_translate("SemiAutomaticClassificationPlugin", "Random Forest classification (ESA SNAP software required)")) + self.label_255.setText(_translate("SemiAutomaticClassificationPlugin", "Load classifier")) + self.confidence_raster_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, calculate classification confidence raster
")) + self.confidence_raster_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Calculate classification confidence raster")) + self.label_235.setText(_translate("SemiAutomaticClassificationPlugin", "Use")) + self.signature_raster_checkBox_3.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, save a raster for each signature distance
")) + self.signature_raster_checkBox_3.setText(_translate("SemiAutomaticClassificationPlugin", "Save signature raster")) + self.single_threshold_checkBox_2.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, use signature thresholds
")) + self.single_threshold_checkBox_2.setText(_translate("SemiAutomaticClassificationPlugin", "Signature threshold")) + self.signature_threshold_button_2.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Open tab Signature threshold
")) + self.signature_threshold_button_2.setText(_translate("SemiAutomaticClassificationPlugin", "W")) + self.alg_threshold_SpinBox_2.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Set a classification threshold for all signatures
")) + self.single_threshold_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, use single threshold for all the spectral signatures
")) + self.single_threshold_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Single threshold")) + self.toolBox_classification.setItemText(self.toolBox_classification.indexOf(self.page_max_like), _translate("SemiAutomaticClassificationPlugin", "Maximum Likelihood")) + self.signature_raster_checkBox_2.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, save a raster for each signature distance
")) + self.signature_raster_checkBox_2.setText(_translate("SemiAutomaticClassificationPlugin", "Save signature raster")) + self.label_237.setText(_translate("SemiAutomaticClassificationPlugin", "Use")) + self.single_threshold_checkBox_4.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, use single threshold for all the spectral signatures
")) + self.single_threshold_checkBox_4.setText(_translate("SemiAutomaticClassificationPlugin", "Single threshold")) + self.alg_threshold_SpinBox_4.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Set a classification threshold for all signatures
")) + self.single_threshold_checkBox_3.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, use signature thresholds
")) + self.single_threshold_checkBox_3.setText(_translate("SemiAutomaticClassificationPlugin", "Signature threshold")) + self.signature_threshold_button_4.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Open tab Signature threshold
")) + self.signature_threshold_button_4.setText(_translate("SemiAutomaticClassificationPlugin", "W")) + self.confidence_raster_checkBox_2.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, calculate classification confidence raster
")) + self.confidence_raster_checkBox_2.setText(_translate("SemiAutomaticClassificationPlugin", "Calculate classification confidence raster")) + self.toolBox_classification.setItemText(self.toolBox_classification.indexOf(self.page_mindist), _translate("SemiAutomaticClassificationPlugin", "Minimum Distance")) + self.label_329.setText(_translate("SemiAutomaticClassificationPlugin", "Activation")) + self.alpha_SpinBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Weight decay (also L2 regularization term) for Adam optimizer
")) + self.batch_size_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Sets the number of samples per batch for optimizer; if auto, the batch is the minimum value between 200 and the number of samples
")) + self.batch_size_lineEdit.setText(_translate("SemiAutomaticClassificationPlugin", "auto")) + self.label_238.setText(_translate("SemiAutomaticClassificationPlugin", "Training proportion")) + self.label_328.setText(_translate("SemiAutomaticClassificationPlugin", "Batch size")) + self.label_256.setText(_translate("SemiAutomaticClassificationPlugin", "Use framework")) + self.scikit_radioButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Use scikit-learn framework
")) + self.scikit_radioButton.setText(_translate("SemiAutomaticClassificationPlugin", "scikit-learn")) + self.pytorch_radioButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Use PyTorch framework
")) + self.pytorch_radioButton.setText(_translate("SemiAutomaticClassificationPlugin", "PyTorch")) + self.max_iterations_SpinBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Sets the maximum number of iterations
")) + self.label_262.setText(_translate("SemiAutomaticClassificationPlugin", "Max iter")) + self.activation_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Sets the activation function
")) + self.activation_lineEdit.setText(_translate("SemiAutomaticClassificationPlugin", "relu")) + self.label_242.setText(_translate("SemiAutomaticClassificationPlugin", "Alpha")) + self.learning_rate_SpinBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Sets initial learning rate
")) + self.training_proportion_SpinBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Proportion of data to be used as training and the remaining part as test
")) + self.label_330.setText(_translate("SemiAutomaticClassificationPlugin", "Hidden layer sizes")) + self.hidden_layers_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "List of values separated by comma, where each value defines the number of neurons in a hidden layer (e.g.: 200, 100 for two hidden layers of 200 and 100 neurons respectively)
")) + self.hidden_layers_lineEdit.setText(_translate("SemiAutomaticClassificationPlugin", "100")) + self.label_241.setText(_translate("SemiAutomaticClassificationPlugin", "Learning rate init")) + self.cross_validation_checkBox_3.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, perform cross validation
")) + self.cross_validation_checkBox_3.setText(_translate("SemiAutomaticClassificationPlugin", "Cross validation")) + self.best_estimator_checkBox_2.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, find the best estimator iteratively
")) + self.best_estimator_checkBox_2.setText(_translate("SemiAutomaticClassificationPlugin", "Find best estimator with steps")) + self.steps_SpinBox_2.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Number of steps
")) + self.confidence_raster_checkBox_3.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, calculate classification confidence raster
")) + self.confidence_raster_checkBox_3.setText(_translate("SemiAutomaticClassificationPlugin", "Calculate classification confidence raster")) + self.toolBox_classification.setItemText(self.toolBox_classification.indexOf(self.page_mlp), _translate("SemiAutomaticClassificationPlugin", "Multi-Layer Perceptron")) + self.label_155.setText(_translate("SemiAutomaticClassificationPlugin", "Number of trees")) + self.max_features_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Parameter for node splitting, if empty all features are considered, if sqrt the square root of all the features, if integer number the number of features, if float number a fraction of all the features
")) + self.best_estimator_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, find the best estimator iteratively
")) + self.best_estimator_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Find best estimator with steps")) + self.class_weight_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, balanced weight is computed inversely proportional to class frequency
")) + self.class_weight_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Balanced class weight")) + self.label_153.setText(_translate("SemiAutomaticClassificationPlugin", "Max features")) + self.min_split_SpinBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Minimum number of samples required to split an internal node
")) + self.cross_validation_checkBox_2.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, perform cross validation
")) + self.cross_validation_checkBox_2.setText(_translate("SemiAutomaticClassificationPlugin", "Cross validation")) + self.label_160.setText(_translate("SemiAutomaticClassificationPlugin", "Minimum number to split")) + self.ovr_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, perform One-Vs-Rest classification
")) + self.ovr_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "One-Vs-Rest")) self.number_trees_SpinBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Number of trees
")) - self.label_237.setText(_translate("SemiAutomaticClassificationPlugin", "Number of trees")) - self.number_training_samples_SpinBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Number of training samples
")) - self.label_236.setText(_translate("SemiAutomaticClassificationPlugin", "Number of training samples ")) - self.evaluate_classifier_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Evaluate classifier
")) - self.evaluate_classifier_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Evaluate classifier")) - self.evaluate_feature_power_set_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, evaluate feature power set
")) - self.evaluate_feature_power_set_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Evaluate feature power set")) - self.label_248.setText(_translate("SemiAutomaticClassificationPlugin", "Max")) - self.rf_power_min_SpinBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Minumum power
")) - self.label_247.setText(_translate("SemiAutomaticClassificationPlugin", "Min")) - self.rf_power_max_SpinBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Maximum power
")) - self.save_classifier_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, save classifier
")) - self.save_classifier_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Save classifier")) - self.label_244.setText(_translate("SemiAutomaticClassificationPlugin", "Load classifier")) - self.classifier_Button.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Select a previosly saved classifier
")) - self.classifier_Button.setText(_translate("SemiAutomaticClassificationPlugin", "Import library")) - self.classifier_lineEdit_.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Classifier file path
")) - self.resetClassifierButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Reset
")) - self.resetClassifierButton.setText(_translate("SemiAutomaticClassificationPlugin", "Import library")) - self.button_random_forest.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Run
")) - self.button_random_forest.setText(_translate("SemiAutomaticClassificationPlugin", " RUN")) - self.label_246.setText(_translate("SemiAutomaticClassificationPlugin", " Run")) - self.random_forest.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Function to Batch
")) - self.random_forest.setText(_translate("SemiAutomaticClassificationPlugin", " BATCH")) - self.toolBox_random_forest.setItemText(self.toolBox_random_forest.indexOf(self.page_21), _translate("SemiAutomaticClassificationPlugin", "Input")) - self.toolBox_random_forest.setItemText(self.toolBox_random_forest.indexOf(self.page_25), _translate("SemiAutomaticClassificationPlugin", "Output")) - self.tabWidget_4.setTabText(self.tabWidget_4.indexOf(self.tab_random_forest), _translate("SemiAutomaticClassificationPlugin", "Random forest")) + self.confidence_raster_checkBox_4.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, calculate classification confidence raster
")) + self.confidence_raster_checkBox_4.setText(_translate("SemiAutomaticClassificationPlugin", "Calculate classification confidence raster")) + self.steps_SpinBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Number of steps
")) + self.toolBox_classification.setItemText(self.toolBox_classification.indexOf(self.page_random_forest), _translate("SemiAutomaticClassificationPlugin", "Random Forest")) + self.signature_threshold_button_3.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Open tab Signature threshold
")) + self.signature_threshold_button_3.setText(_translate("SemiAutomaticClassificationPlugin", "W")) + self.alg_threshold_SpinBox_3.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Set a classification threshold for all signatures
")) + self.label_236.setText(_translate("SemiAutomaticClassificationPlugin", "Use")) + self.single_threshold_checkBox_6.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, use single threshold for all the spectral signatures
")) + self.single_threshold_checkBox_6.setText(_translate("SemiAutomaticClassificationPlugin", "Single threshold")) + self.single_threshold_checkBox_5.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, use signature thresholds
")) + self.single_threshold_checkBox_5.setText(_translate("SemiAutomaticClassificationPlugin", "Signature threshold")) + self.confidence_raster_checkBox_5.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, calculate classification confidence raster
")) + self.confidence_raster_checkBox_5.setText(_translate("SemiAutomaticClassificationPlugin", "Calculate classification confidence raster")) + self.signature_raster_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, save a raster for each signature distance
")) + self.signature_raster_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Save signature raster")) + self.toolBox_classification.setItemText(self.toolBox_classification.indexOf(self.page_sam), _translate("SemiAutomaticClassificationPlugin", "Spectral Angle Mapping")) + self.param_c_SpinBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Regularization parameter C
")) + self.label_173.setText(_translate("SemiAutomaticClassificationPlugin", "Kernel")) + self.gamma_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Kernel coefficient gamma
")) + self.gamma_lineEdit.setText(_translate("SemiAutomaticClassificationPlugin", "scale")) + self.cross_validation_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, perform cross validation
")) + self.cross_validation_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Cross validation")) + self.kernel_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Sets the kernel
")) + self.kernel_lineEdit.setText(_translate("SemiAutomaticClassificationPlugin", "rbf")) + self.label_163.setText(_translate("SemiAutomaticClassificationPlugin", "Gamma")) + self.label_162.setText(_translate("SemiAutomaticClassificationPlugin", "Regularization parameter C")) + self.best_estimator_checkBox_3.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, find the best estimator iteratively
")) + self.best_estimator_checkBox_3.setText(_translate("SemiAutomaticClassificationPlugin", "Find best estimator with steps")) + self.class_weight_checkBox_2.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, balanced weight is computed inversely proportional to class frequency
")) + self.class_weight_checkBox_2.setText(_translate("SemiAutomaticClassificationPlugin", "Balanced class weight")) + self.steps_SpinBox_3.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Number of steps
")) + self.confidence_raster_checkBox_6.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, calculate classification confidence raster
")) + self.confidence_raster_checkBox_6.setText(_translate("SemiAutomaticClassificationPlugin", "Calculate classification confidence raster")) + self.toolBox_classification.setItemText(self.toolBox_classification.indexOf(self.page_svm), _translate("SemiAutomaticClassificationPlugin", "Support Vector Machine")) + self.tabWidget_4.setTabText(self.tabWidget_4.indexOf(self.tab_classification), _translate("SemiAutomaticClassificationPlugin", "Classification")) + self.label_283.setText(_translate("SemiAutomaticClassificationPlugin", " Run")) + self.label_281.setText(_translate("SemiAutomaticClassificationPlugin", "Matrix file (optional)")) + self.toolButton_input_matrix.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Open a file
")) + self.label_279.setText(_translate("SemiAutomaticClassificationPlugin", "Output name")) + self.neighbor_output_name_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Output name prefix
")) + self.neighbor_output_name_lineEdit.setText(_translate("SemiAutomaticClassificationPlugin", "neighbor_")) + self.neighbor_virtual_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, output bands are virtual rasters
")) + self.neighbor_virtual_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Virtual output")) + self.neighbor_pixels.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Function to Script
")) + self.neighbor_pixels.setText(_translate("SemiAutomaticClassificationPlugin", " Script")) + self.class_neighbor_toolButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Run
")) + self.class_neighbor_toolButton.setText(_translate("SemiAutomaticClassificationPlugin", " RUN")) + self.label_286.setText(_translate("SemiAutomaticClassificationPlugin", " Band neighbor")) + self.statistic_lineEdit_2.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Enter a value
")) + self.statistic_name_combobox_2.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Select a statistic
")) + self.label_284.setText(_translate("SemiAutomaticClassificationPlugin", "Select a statistic")) + self.label_285.setText(_translate("SemiAutomaticClassificationPlugin", " Statistic")) + self.label_282.setText(_translate("SemiAutomaticClassificationPlugin", "Select input band set")) + self.label_280.setText(_translate("SemiAutomaticClassificationPlugin", "Neighbor distance in pixels")) + self.band_set_comb_spinBox_15.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Band set number
")) + self.class_neighbor_threshold_spinBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Distance in pixels
")) + self.circular_structure_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, neighbor pixels are calculated inside a circle of radius equal to the distance in pixels
")) + self.circular_structure_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Circular")) + self.tabWidget_4.setTabText(self.tabWidget_4.indexOf(self.tab_neighbor_pixels), _translate("SemiAutomaticClassificationPlugin", "Neighbor pixels")) self.SCP_tabs.setTabText(self.SCP_tabs.indexOf(self.tab_band_processing), _translate("SemiAutomaticClassificationPlugin", "Band processing")) self.label_33.setText(_translate("SemiAutomaticClassificationPlugin", "Select the classification to assess")) self.label_34.setText(_translate("SemiAutomaticClassificationPlugin", "Select the reference vector or raster")) @@ -10508,35 +7306,16 @@ def retranslateUi(self, SemiAutomaticClassificationPlugin): self.label_168.setText(_translate("SemiAutomaticClassificationPlugin", " Run")) self.calculateMatrix_toolButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Run
")) self.calculateMatrix_toolButton.setText(_translate("SemiAutomaticClassificationPlugin", " RUN")) - self.accuracy.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Function to Batch
")) - self.accuracy.setText(_translate("SemiAutomaticClassificationPlugin", " BATCH")) + self.accuracy.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Function to Script
")) + self.accuracy.setText(_translate("SemiAutomaticClassificationPlugin", " Script")) self.toolBox_accuracy.setItemText(self.toolBox_accuracy.indexOf(self.page_10), _translate("SemiAutomaticClassificationPlugin", "Input")) self.error_matrix_textBrowser.setHtml(_translate("SemiAutomaticClassificationPlugin", "\n" "\n" +"\n" "If enabled, pixels having the same values in both classifications will be reported; if not enabled, 0 value is set for unchanged pixels
")) - self.mask_unchanged_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Report unchanged pixels")) - self.classification_reference_name_combo.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Select the reference classification raster
")) - self.label_40.setText(_translate("SemiAutomaticClassificationPlugin", "Select the new classification")) - self.label_38.setText(_translate("SemiAutomaticClassificationPlugin", "Select the reference classification")) - self.new_classification_name_combo.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Select a new raster to be compared with the reference raster
")) - self.toolButton_reload_5.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Refresh list
")) - self.toolButton_reload_5.setText(_translate("SemiAutomaticClassificationPlugin", "Plot")) - self.toolButton_reload_6.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Refresh list
")) - self.toolButton_reload_6.setText(_translate("SemiAutomaticClassificationPlugin", "Plot")) - self.label_116.setText(_translate("SemiAutomaticClassificationPlugin", " Land cover change")) - self.label_169.setText(_translate("SemiAutomaticClassificationPlugin", " Run")) - self.calculateLandCoverChange_toolButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Run
")) - self.calculateLandCoverChange_toolButton.setText(_translate("SemiAutomaticClassificationPlugin", " RUN")) - self.land_cover_change.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Function to Batch
")) - self.land_cover_change.setText(_translate("SemiAutomaticClassificationPlugin", " BATCH")) - self.toolBox_landCoverChange.setItemText(self.toolBox_landCoverChange.indexOf(self.page_12), _translate("SemiAutomaticClassificationPlugin", "Input")) - self.toolBox_landCoverChange.setItemText(self.toolBox_landCoverChange.indexOf(self.page_13), _translate("SemiAutomaticClassificationPlugin", "Output")) - self.tabWidget_2.setTabText(self.tabWidget_2.indexOf(self.tab_landCoverChange), _translate("SemiAutomaticClassificationPlugin", "Land cover change")) self.classification_report_name_combo.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Select the classification raster
")) self.label_44.setText(_translate("SemiAutomaticClassificationPlugin", "Select the classification")) self.nodata_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, pixels equal to NoData value will be excluded from the report
")) @@ -10547,8 +7326,8 @@ def retranslateUi(self, SemiAutomaticClassificationPlugin): self.label_170.setText(_translate("SemiAutomaticClassificationPlugin", " Run")) self.calculateReport_toolButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Run
")) self.calculateReport_toolButton.setText(_translate("SemiAutomaticClassificationPlugin", " RUN")) - self.classification_report.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Function to Batch
")) - self.classification_report.setText(_translate("SemiAutomaticClassificationPlugin", " BATCH")) + self.classification_report.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Function to Script
")) + self.classification_report.setText(_translate("SemiAutomaticClassificationPlugin", " Script")) self.label_148.setText(_translate("SemiAutomaticClassificationPlugin", " Classification report")) self.toolBox_class_report.setItemText(self.toolBox_class_report.indexOf(self.page_14), _translate("SemiAutomaticClassificationPlugin", "Input")) self.toolBox_class_report.setItemText(self.toolBox_class_report.indexOf(self.page_15), _translate("SemiAutomaticClassificationPlugin", "Output")) @@ -10572,33 +7351,16 @@ def retranslateUi(self, SemiAutomaticClassificationPlugin): self.label_200.setText(_translate("SemiAutomaticClassificationPlugin", " Run")) self.calculatecrossClass_toolButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Run
")) self.calculatecrossClass_toolButton.setText(_translate("SemiAutomaticClassificationPlugin", " RUN")) - self.cross_classification.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Function to Batch
")) - self.cross_classification.setText(_translate("SemiAutomaticClassificationPlugin", " BATCH")) + self.cross_classification.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Function to Script
")) + self.cross_classification.setText(_translate("SemiAutomaticClassificationPlugin", " Script")) self.toolBox_cross_classification.setItemText(self.toolBox_cross_classification.indexOf(self.page_19), _translate("SemiAutomaticClassificationPlugin", "Input")) self.cross_matrix_textBrowser.setHtml(_translate("SemiAutomaticClassificationPlugin", "\n" "\n" +"\n" "Select the classification
")) - self.label_201.setText(_translate("SemiAutomaticClassificationPlugin", "Select the classification")) - self.toolButton_reload_22.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Refresh list
")) - self.toolButton_reload_22.setText(_translate("SemiAutomaticClassificationPlugin", "Plot")) - self.label_259.setText(_translate("SemiAutomaticClassificationPlugin", "Select input band set")) - self.band_set_comb_spinBox_8.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Band set number
")) - self.label_184.setText(_translate("SemiAutomaticClassificationPlugin", " Run")) - self.class_signature_Button.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Run
")) - self.class_signature_Button.setText(_translate("SemiAutomaticClassificationPlugin", " RUN")) - self.class_signature_save_siglist_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, save the resulting signatures to Signature list
")) - self.class_signature_save_siglist_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Save resulting signatures to Signature list")) - self.class_signature.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Function to Batch
")) - self.class_signature.setText(_translate("SemiAutomaticClassificationPlugin", " BATCH")) - self.toolBox_class_signature.setItemText(self.toolBox_class_signature.indexOf(self.page_20), _translate("SemiAutomaticClassificationPlugin", "Input")) - self.toolBox_class_signature.setItemText(self.toolBox_class_signature.indexOf(self.page_24), _translate("SemiAutomaticClassificationPlugin", "Output")) - self.tabWidget_2.setTabText(self.tabWidget_2.indexOf(self.tab_class_signature), _translate("SemiAutomaticClassificationPlugin", "Class signature")) self.label_189.setText(_translate("SemiAutomaticClassificationPlugin", " Classification to vector")) self.label_63.setText(_translate("SemiAutomaticClassificationPlugin", "Select the classification")) self.classification_vector_name_combo.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Select the classification raster
")) @@ -10615,8 +7377,8 @@ def retranslateUi(self, SemiAutomaticClassificationPlugin): self.convert_toolButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Run
")) self.convert_toolButton.setText(_translate("SemiAutomaticClassificationPlugin", " RUN")) self.label_171.setText(_translate("SemiAutomaticClassificationPlugin", " Run")) - self.classification_to_vector.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Function to Batch
")) - self.classification_to_vector.setText(_translate("SemiAutomaticClassificationPlugin", " BATCH")) + self.classification_to_vector.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Function to Script
")) + self.classification_to_vector.setText(_translate("SemiAutomaticClassificationPlugin", " Script")) self.tabWidget_2.setTabText(self.tabWidget_2.indexOf(self.tab_class_to_vector), _translate("SemiAutomaticClassificationPlugin", "Classification to vector")) self.label_65.setText(_translate("SemiAutomaticClassificationPlugin", "Select the classification")) self.reclassification_name_combo.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Select the classification raster
")) @@ -10652,116 +7414,9 @@ def retranslateUi(self, SemiAutomaticClassificationPlugin): self.label_172.setText(_translate("SemiAutomaticClassificationPlugin", " Run")) self.reclassify_toolButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Run
")) self.reclassify_toolButton.setText(_translate("SemiAutomaticClassificationPlugin", " RUN")) - self.reclassification.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Function to Batch
")) - self.reclassification.setText(_translate("SemiAutomaticClassificationPlugin", " BATCH")) + self.reclassification.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Function to Script
")) + self.reclassification.setText(_translate("SemiAutomaticClassificationPlugin", " Script")) self.tabWidget_2.setTabText(self.tabWidget_2.indexOf(self.tab_reclassification), _translate("SemiAutomaticClassificationPlugin", "Reclassification")) - self.label_193.setText(_translate("SemiAutomaticClassificationPlugin", " Edit raster")) - self.undo_edit_Button.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Undo edit (only for ROI polygons)
")) - self.undo_edit_Button.setText(_translate("SemiAutomaticClassificationPlugin", "Import library")) - self.label_173.setText(_translate("SemiAutomaticClassificationPlugin", " Run")) - self.label_66.setText(_translate("SemiAutomaticClassificationPlugin", "Select the input raster")) - self.edit_raster_name_combo.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Select the raster to edit
")) - self.toolButton_reload_14.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Refresh list
")) - self.toolButton_reload_14.setText(_translate("SemiAutomaticClassificationPlugin", "Plot")) - self.use_constant_val_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Use constant value
")) - self.use_constant_val_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Use constant value")) - self.value_spinBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Value
")) - self.use_expression_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Use expression
")) - self.use_expression_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Use expression")) - self.expression_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Enter expression
")) - self.expression_lineEdit.setText(_translate("SemiAutomaticClassificationPlugin", "where(raster == 1, 2, raster)")) - self.label_81.setText(_translate("SemiAutomaticClassificationPlugin", " Edit raster values")) - self.use_field_vector_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Use the value field of the vector
")) - self.use_field_vector_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Use the value field of the vector")) - self.field_comboBox_2.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Select the value field
")) - self.edit_val_use_vector_radioButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Edit values using a vector
")) - self.edit_val_use_vector_radioButton.setText(_translate("SemiAutomaticClassificationPlugin", " Edit values using a vector")) - self.vector_name_combo_2.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Select the vector
")) - self.toolButton_reload_20.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Refresh list
")) - self.toolButton_reload_20.setText(_translate("SemiAutomaticClassificationPlugin", "Plot")) - self.edit_val_use_ROI_radioButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Edit values using temporary ROIs
")) - self.edit_val_use_ROI_radioButton.setText(_translate("SemiAutomaticClassificationPlugin", " Edit values using ROI polygons")) - self.label_158.setText(_translate("SemiAutomaticClassificationPlugin", " Edit options")) - self.raster_set_value_toolButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Run
")) - self.raster_set_value_toolButton.setText(_translate("SemiAutomaticClassificationPlugin", " RUN")) - self.edit_raster_using_vector.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Function to Batch
")) - self.edit_raster_using_vector.setText(_translate("SemiAutomaticClassificationPlugin", " BATCH")) - self.tabWidget_2.setTabText(self.tabWidget_2.indexOf(self.tab), _translate("SemiAutomaticClassificationPlugin", "Edit raster")) - self.label_70.setText(_translate("SemiAutomaticClassificationPlugin", "Select the classification")) - self.sieve_raster_name_combo.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Select the classification
")) - self.toolButton_reload_15.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Refresh list
")) - self.toolButton_reload_15.setText(_translate("SemiAutomaticClassificationPlugin", "Plot")) - self.label_133.setText(_translate("SemiAutomaticClassificationPlugin", "Size threshold")) - self.sieve_threshold_spinBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Size threshold in pixels
")) - self.label_136.setText(_translate("SemiAutomaticClassificationPlugin", "Pixel connection")) - self.sieve_connection_combo.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Pixel connection
")) - self.sieve_connection_combo.setItemText(0, _translate("SemiAutomaticClassificationPlugin", "4")) - self.sieve_connection_combo.setItemText(1, _translate("SemiAutomaticClassificationPlugin", "8")) - self.label_174.setText(_translate("SemiAutomaticClassificationPlugin", " Run")) - self.sieve_toolButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Run
")) - self.sieve_toolButton.setText(_translate("SemiAutomaticClassificationPlugin", " RUN")) - self.classification_sieve.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Function to Batch
")) - self.classification_sieve.setText(_translate("SemiAutomaticClassificationPlugin", " BATCH")) - self.label_195.setText(_translate("SemiAutomaticClassificationPlugin", " Classification sieve")) - self.tabWidget_2.setTabText(self.tabWidget_2.indexOf(self.tab_sieve), _translate("SemiAutomaticClassificationPlugin", "Classification sieve")) - self.label_202.setText(_translate("SemiAutomaticClassificationPlugin", " Classification erosion")) - self.label_146.setText(_translate("SemiAutomaticClassificationPlugin", "Select the classification")) - self.erosion_raster_name_combo.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Select the classification
")) - self.toolButton_reload_18.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Refresh list
")) - self.toolButton_reload_18.setText(_translate("SemiAutomaticClassificationPlugin", "Plot")) - self.label_149.setText(_translate("SemiAutomaticClassificationPlugin", "Size in pixels")) - self.erosion_threshold_spinBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Size in pixels
")) - self.circular_structure_checkBox_3.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, neighbor pixels are calculated inside a circle of radius equal to the distance in pixels
")) - self.circular_structure_checkBox_3.setText(_translate("SemiAutomaticClassificationPlugin", "Circular")) - self.label_151.setText(_translate("SemiAutomaticClassificationPlugin", "Class values")) - self.erosion_classes_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Enter class values separated by , or -
")) - self.label_175.setText(_translate("SemiAutomaticClassificationPlugin", " Run")) - self.class_erosion_toolButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Run
")) - self.class_erosion_toolButton.setText(_translate("SemiAutomaticClassificationPlugin", " RUN")) - self.classification_erosion.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Function to Batch
")) - self.classification_erosion.setText(_translate("SemiAutomaticClassificationPlugin", " BATCH")) - self.tabWidget_2.setTabText(self.tabWidget_2.indexOf(self.tab_erosion), _translate("SemiAutomaticClassificationPlugin", "Classification erosion")) - self.label_204.setText(_translate("SemiAutomaticClassificationPlugin", " Classification dilation")) - self.label_152.setText(_translate("SemiAutomaticClassificationPlugin", "Select the classification")) - self.dilation_raster_name_combo.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Select the classification
")) - self.toolButton_reload_19.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Refresh list
")) - self.toolButton_reload_19.setText(_translate("SemiAutomaticClassificationPlugin", "Plot")) - self.label_153.setText(_translate("SemiAutomaticClassificationPlugin", "Size in pixels")) - self.dilation_threshold_spinBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Size in pixels
")) - self.circular_structure_checkBox_2.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, neighbor pixels are calculated inside a circle of radius equal to the distance in pixels
")) - self.circular_structure_checkBox_2.setText(_translate("SemiAutomaticClassificationPlugin", "Circular")) - self.label_155.setText(_translate("SemiAutomaticClassificationPlugin", "Class values")) - self.dilation_classes_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Enter class values separated by , or -
")) - self.label_176.setText(_translate("SemiAutomaticClassificationPlugin", " Run")) - self.class_dilation_toolButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Run
")) - self.class_dilation_toolButton.setText(_translate("SemiAutomaticClassificationPlugin", " RUN")) - self.classification_dilation.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Function to Batch
")) - self.classification_dilation.setText(_translate("SemiAutomaticClassificationPlugin", " BATCH")) - self.tabWidget_2.setTabText(self.tabWidget_2.indexOf(self.tab_dilation), _translate("SemiAutomaticClassificationPlugin", "Classification dilation")) - self.label_212.setText(_translate("SemiAutomaticClassificationPlugin", " Zonal stat rasters")) - self.label_77.setText(_translate("SemiAutomaticClassificationPlugin", "Select the input raster")) - self.classification_name_combo_5.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Select the raster to edit
")) - self.toolButton_reload_24.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Refresh list
")) - self.toolButton_reload_24.setText(_translate("SemiAutomaticClassificationPlugin", "Plot")) - self.nodata_checkBox_10.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, pixels equal to NoData value will be excluded from the output raster
")) - self.nodata_checkBox_10.setText(_translate("SemiAutomaticClassificationPlugin", "Use value as NoData")) - self.nodata_spinBox_12.setToolTip(_translate("SemiAutomaticClassificationPlugin", "NoData value
")) - self.class_field_comboBox_4.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Select the vector field
")) - self.label_214.setText(_translate("SemiAutomaticClassificationPlugin", "Select the reference vector or raster")) - self.buttonReload_shape_6.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Refresh list
")) - self.buttonReload_shape_6.setText(_translate("SemiAutomaticClassificationPlugin", "Plot")) - self.label_213.setText(_translate("SemiAutomaticClassificationPlugin", "Vector field")) - self.reference_name_combo_3.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Select the reference vector or raster
")) - self.statistic_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Enter a value
")) - self.statistic_name_combobox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Select a statistic
")) - self.label_232.setText(_translate("SemiAutomaticClassificationPlugin", "Select a statistic")) - self.label_216.setText(_translate("SemiAutomaticClassificationPlugin", " Statistic")) - self.zonal_stat_raster_toolButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Run
")) - self.zonal_stat_raster_toolButton.setText(_translate("SemiAutomaticClassificationPlugin", " RUN")) - self.label_215.setText(_translate("SemiAutomaticClassificationPlugin", " Run")) - self.zonal_stat_raster.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Function to Batch
")) - self.zonal_stat_raster.setText(_translate("SemiAutomaticClassificationPlugin", " BATCH")) - self.tabWidget_2.setTabText(self.tabWidget_2.indexOf(self.tab_zonal_stats_rasters), _translate("SemiAutomaticClassificationPlugin", " Zonal stat rasters")) self.SCP_tabs.setTabText(self.SCP_tabs.indexOf(self.tab_postProcessing), _translate("SemiAutomaticClassificationPlugin", "Postprocessing")) self.toolButton_reload_13.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Refresh list
")) self.toolButton_reload_13.setText(_translate("SemiAutomaticClassificationPlugin", "Plot")) @@ -10769,83 +7424,18 @@ def retranslateUi(self, SemiAutomaticClassificationPlugin): item = self.tableWidget_band_calc.horizontalHeaderItem(0) item.setText(_translate("SemiAutomaticClassificationPlugin", "Variable")) item = self.tableWidget_band_calc.horizontalHeaderItem(1) - item.setText(_translate("SemiAutomaticClassificationPlugin", "Band name")) + item.setText(_translate("SemiAutomaticClassificationPlugin", "Output")) self.bandcalc_filter_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Filter
")) self.bandcalc_filter_lineEdit.setPlaceholderText(_translate("SemiAutomaticClassificationPlugin", "Filter")) self.label_71.setText(_translate("SemiAutomaticClassificationPlugin", " Band list")) - self.plainTextEdit_calc.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Enter an expression (e.g. "raster1" + "raster2" )
")) - self.toolButton_less.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Less than
")) - self.toolButton_less.setText(_translate("SemiAutomaticClassificationPlugin", "<")) - self.toolButton_greater.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Greater than
")) - self.toolButton_greater.setText(_translate("SemiAutomaticClassificationPlugin", ">")) - self.toolButton_lbracket.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Open parenthesis
")) - self.toolButton_lbracket.setText(_translate("SemiAutomaticClassificationPlugin", "(")) - self.toolButton_rbracket.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Close parenthesis
")) - self.toolButton_rbracket.setText(_translate("SemiAutomaticClassificationPlugin", ")")) - self.toolButton_power.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Power
")) - self.toolButton_power.setText(_translate("SemiAutomaticClassificationPlugin", "^")) - self.toolButton_sqrt.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Square root
")) - self.toolButton_sqrt.setText(_translate("SemiAutomaticClassificationPlugin", "√")) - self.toolButton_plus.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Plus
")) - self.toolButton_plus.setText(_translate("SemiAutomaticClassificationPlugin", "+")) - self.toolButton_minus.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Minus
")) - self.toolButton_minus.setText(_translate("SemiAutomaticClassificationPlugin", "-")) - self.toolButton_product.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Multiplication
")) - self.toolButton_product.setText(_translate("SemiAutomaticClassificationPlugin", "*")) - self.toolButton_ratio.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Division
")) - self.toolButton_ratio.setText(_translate("SemiAutomaticClassificationPlugin", "/")) - self.toolButton_equal.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Equals
")) - self.toolButton_equal.setText(_translate("SemiAutomaticClassificationPlugin", "==")) - self.toolButton_unequal.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Not equals
")) - self.toolButton_unequal.setText(_translate("SemiAutomaticClassificationPlugin", "!=")) - self.toolButton_import_expression.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Open a text file to add custom functions
")) + self.label_band_calc.setText(_translate("SemiAutomaticClassificationPlugin", " Expression")) + self.plainTextEdit_calc.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Enter an expression
")) item = self.band_calc_function_tableWidget.horizontalHeaderItem(0) item.setText(_translate("SemiAutomaticClassificationPlugin", "Functions")) - self.band_calc_tabWidget.setTabText(self.band_calc_tabWidget.indexOf(self.tab_expression), _translate("SemiAutomaticClassificationPlugin", "Expression")) - self.decision_rules_tableWidget.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Enter one or more rules separated by semicolon (e.g. "raster1" > 0; "raster2" > 0 )
")) - item = self.decision_rules_tableWidget.horizontalHeaderItem(0) - item.setText(_translate("SemiAutomaticClassificationPlugin", "Value")) - item = self.decision_rules_tableWidget.horizontalHeaderItem(1) - item.setText(_translate("SemiAutomaticClassificationPlugin", "Rule")) - self.remove_rule_toolButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Delete row
")) - self.remove_rule_toolButton.setText(_translate("SemiAutomaticClassificationPlugin", "Plot")) - self.move_up_toolButton_2.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Move highlighted rule up
")) - self.move_up_toolButton_2.setText(_translate("SemiAutomaticClassificationPlugin", "Import library")) - self.import_rules_toolButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Import rules from text file
")) - self.import_rules_toolButton.setText(_translate("SemiAutomaticClassificationPlugin", "Plot")) - self.clear_rules_toolButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Reset
")) - self.clear_rules_toolButton.setText(_translate("SemiAutomaticClassificationPlugin", "Import library")) - self.add_rule_toolButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Add row
")) - self.add_rule_toolButton.setText(_translate("SemiAutomaticClassificationPlugin", "Plot")) - self.move_down_toolButton_2.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Move highlighted rule down
")) - self.move_down_toolButton_2.setText(_translate("SemiAutomaticClassificationPlugin", "Import library")) - self.export_rules_toolButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Export rules to text file
")) - self.export_rules_toolButton.setText(_translate("SemiAutomaticClassificationPlugin", "Plot")) - self.band_calc_tabWidget.setTabText(self.band_calc_tabWidget.indexOf(self.tab_decision_rules), _translate("SemiAutomaticClassificationPlugin", "Decision rules")) - self.nodata_as_value_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, input NoData pixels will be evaluated as regular values
")) - self.nodata_as_value_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Input NoData \n" -" as value")) - self.nodata_checkBox_3.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, pixels equal to NoData value will be excluded from the output raster
")) - self.nodata_checkBox_3.setText(_translate("SemiAutomaticClassificationPlugin", "Use value\n" -"as NoData")) - self.nodata_spinBox_13.setToolTip(_translate("SemiAutomaticClassificationPlugin", "NoData value
")) - self.label_4.setText(_translate("SemiAutomaticClassificationPlugin", "Calculation\n" -"data type")) - self.calc_type_combo.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Select a type
")) - self.calc_type_combo.setItemText(0, _translate("SemiAutomaticClassificationPlugin", "Float32")) - self.calc_type_combo.setItemText(1, _translate("SemiAutomaticClassificationPlugin", "Int32")) - self.calc_type_combo.setItemText(2, _translate("SemiAutomaticClassificationPlugin", "UInt32")) - self.calc_type_combo.setItemText(3, _translate("SemiAutomaticClassificationPlugin", "Int16")) - self.calc_type_combo.setItemText(4, _translate("SemiAutomaticClassificationPlugin", "UInt16")) - self.calc_type_combo.setItemText(5, _translate("SemiAutomaticClassificationPlugin", "Byte")) - self.label_83.setText(_translate("SemiAutomaticClassificationPlugin", "Extent:")) - self.intersection_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, the extent of raster ouput equals the intersection of input rasters
")) - self.intersection_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Intersection")) - self.extent_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, the extent of raster ouput equals the extent of selected raster
")) - self.extent_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Same as")) - self.raster_extent_combo.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Select a raster
")) - self.align_radioButton.setText(_translate("SemiAutomaticClassificationPlugin", "Align")) + self.toolButton_import_expression.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Open a text file to add custom functions
")) self.label_84.setText(_translate("SemiAutomaticClassificationPlugin", "Output raster")) + self.label_5.setText(_translate("SemiAutomaticClassificationPlugin", "Output\n" +"data type")) self.raster_type_combo.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Select a type
")) self.raster_type_combo.setItemText(0, _translate("SemiAutomaticClassificationPlugin", "Float32")) self.raster_type_combo.setItemText(1, _translate("SemiAutomaticClassificationPlugin", "Int32")) @@ -10856,8 +7446,12 @@ def retranslateUi(self, SemiAutomaticClassificationPlugin): self.label_268.setText(_translate("SemiAutomaticClassificationPlugin", "Output \n" "NoData value")) self.nodata_spinBox_4.setToolTip(_translate("SemiAutomaticClassificationPlugin", "NoData value of the output raster
")) - self.nodata_mask_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, every NoData pixel in input will be NoData pixel in output
")) - self.nodata_mask_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "NoData mask")) + self.label_152.setText(_translate("SemiAutomaticClassificationPlugin", "NoData\n" +"mask")) + self.nodata_mask_combo.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Use NoData mask
")) + self.nodata_mask_combo.setItemText(0, _translate("SemiAutomaticClassificationPlugin", "False")) + self.nodata_mask_combo.setItemText(1, _translate("SemiAutomaticClassificationPlugin", "True")) + self.nodata_mask_combo.setItemText(2, _translate("SemiAutomaticClassificationPlugin", "None")) self.set_scale_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, set a scale
")) self.set_scale_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Set \n" "scale")) @@ -10865,27 +7459,49 @@ def retranslateUi(self, SemiAutomaticClassificationPlugin): self.set_offset_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, set an offset
")) self.set_offset_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Set \n" "offset")) - self.band_calc.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Function to Batch
")) - self.band_calc.setText(_translate("SemiAutomaticClassificationPlugin", " BATCH")) + self.offset_doubleSpinBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Offset")) + self.label_83.setText(_translate("SemiAutomaticClassificationPlugin", "Extent:")) + self.raster_extent_combo.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Select an extent
")) + self.UL_X_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Upperleft X
")) + self.UL_X_lineEdit.setPlaceholderText(_translate("SemiAutomaticClassificationPlugin", "UL X")) + self.UL_Y_linedit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Upper-left Y
")) + self.UL_Y_linedit.setPlaceholderText(_translate("SemiAutomaticClassificationPlugin", "UL Y")) + self.LR_X_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Lower-right X
")) + self.LR_X_lineEdit.setPlaceholderText(_translate("SemiAutomaticClassificationPlugin", "LR X")) + self.LR_Y_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Lower-right Y
")) + self.LR_Y_lineEdit.setPlaceholderText(_translate("SemiAutomaticClassificationPlugin", "LR Y")) + self.label_116.setText(_translate("SemiAutomaticClassificationPlugin", "Align")) + self.raster_extent_combo_2.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Select a raster
")) + self.label_146.setText(_translate("SemiAutomaticClassificationPlugin", "Pixel\n" +"size")) + self.resolution_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Pixel size
")) self.toolButton_calculate.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Run
")) self.toolButton_calculate.setText(_translate("SemiAutomaticClassificationPlugin", " RUN")) + self.nodata_as_value_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, input NoData pixels will be evaluated as regular values
")) + self.nodata_as_value_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Input NoData \n" +" as value")) + self.nodata_checkBox_3.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, pixels equal to NoData value will be excluded from the output raster
")) + self.nodata_checkBox_3.setText(_translate("SemiAutomaticClassificationPlugin", "Use value\n" +"as NoData")) + self.nodata_spinBox_13.setToolTip(_translate("SemiAutomaticClassificationPlugin", "NoData value
")) + self.label_4.setText(_translate("SemiAutomaticClassificationPlugin", "Calculation\n" +"data type")) + self.calc_type_combo.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Select a type
")) + self.calc_type_combo.setItemText(0, _translate("SemiAutomaticClassificationPlugin", "Float32")) + self.calc_type_combo.setItemText(1, _translate("SemiAutomaticClassificationPlugin", "Int32")) + self.calc_type_combo.setItemText(2, _translate("SemiAutomaticClassificationPlugin", "UInt32")) + self.calc_type_combo.setItemText(3, _translate("SemiAutomaticClassificationPlugin", "Int16")) + self.calc_type_combo.setItemText(4, _translate("SemiAutomaticClassificationPlugin", "UInt16")) + self.calc_type_combo.setItemText(5, _translate("SemiAutomaticClassificationPlugin", "Byte")) self.SCP_tabs.setTabText(self.SCP_tabs.indexOf(self.tab_band_calc), _translate("SemiAutomaticClassificationPlugin", "Band calc")) - self.label_73.setText(_translate("SemiAutomaticClassificationPlugin", "Batch")) - self.plainTextEdit_batch.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Enter a batch function
")) - self.export_batch_toolButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Export batch to text file
")) - self.export_batch_toolButton.setText(_translate("SemiAutomaticClassificationPlugin", "Plot")) + self.label_73.setText(_translate("SemiAutomaticClassificationPlugin", "Script (copy the code in a Python shell)")) self.clear_batch_toolButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Reset
")) self.clear_batch_toolButton.setText(_translate("SemiAutomaticClassificationPlugin", "Import library")) - self.import_batch_toolButton.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Import batch from text file
")) - self.import_batch_toolButton.setText(_translate("SemiAutomaticClassificationPlugin", "Plot")) - item = self.batch_tableWidget.horizontalHeaderItem(0) - item.setText(_translate("SemiAutomaticClassificationPlugin", "Functions")) - self.label_177.setText(_translate("SemiAutomaticClassificationPlugin", " Run")) - self.check_batch.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Check batch function
")) - self.check_batch.setText(_translate("SemiAutomaticClassificationPlugin", " CHECK")) - self.toolButton_run_batch.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Run
")) - self.toolButton_run_batch.setText(_translate("SemiAutomaticClassificationPlugin", " RUN")) - self.SCP_tabs.setTabText(self.SCP_tabs.indexOf(self.tab_batch), _translate("SemiAutomaticClassificationPlugin", "Batch")) + self.copy_script.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Copy Script to clipboard
")) + self.copy_script.setText(_translate("SemiAutomaticClassificationPlugin", "Copy")) + self.save_script_button.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Save Script to file
")) + self.save_script_button.setText(_translate("SemiAutomaticClassificationPlugin", " Save to file")) + self.SCP_tabs.setTabText(self.SCP_tabs.indexOf(self.tab_script), _translate("SemiAutomaticClassificationPlugin", "Script")) self.label_28.setText(_translate("SemiAutomaticClassificationPlugin", " System")) self.RAM_spinBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Set available RAM for processes
")) self.label_23.setText(_translate("SemiAutomaticClassificationPlugin", "Available RAM (MB)")) @@ -10908,36 +7524,15 @@ def retranslateUi(self, SemiAutomaticClassificationPlugin): self.temp_directory_Button.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Select a directory
")) self.temp_directory_Button.setText(_translate("SemiAutomaticClassificationPlugin", "Import library")) self.label_87.setText(_translate("SemiAutomaticClassificationPlugin", "Temporary directory")) - self.SNAP_label.setText(_translate("SemiAutomaticClassificationPlugin", "")) - self.label_276.setText(_translate("SemiAutomaticClassificationPlugin", "Python executable path")) - self.label_288.setText(_translate("SemiAutomaticClassificationPlugin", "Python modules path")) self.label_275.setText(_translate("SemiAutomaticClassificationPlugin", "GDAL installation directory")) - self.SNAP_GPT_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Path to the GPT executable (e.g. C:\\Program Files\\snap\\bin\\gpt.exe)
")) - self.python_path_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Path to the Python executable (e.g. /usr/local/bin/python3)
")) - self.python_path_lineEdit_2.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Path to Python modules (e.g. /Applications/QGIS.app/Contents/MacOS/lib/python3.8/site-packages).
Multiple paths can be entered separated by ;
Restart is required.
")) self.gdal_path_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Path to the GDAL directory containing tools such as gdal_translate and gdalwarp (e.g. /usr/bin)
")) self.label_211.setText(_translate("SemiAutomaticClassificationPlugin", "External programs")) self.sound_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Enable/Disable the sound when the process is finished
")) self.sound_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Play sound when finished")) - self.virtual_raster_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, create virtual rasters for certain temporary files
")) - self.virtual_raster_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Use virtual raster for temp files")) self.label_45.setText(_translate("SemiAutomaticClassificationPlugin", "Calculation process")) self.raster_compression_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, a lossless compression is applied to rasters in order to save disk space
")) self.raster_compression_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Raster compression")) - self.parallel_writing_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, the output raster is compared to output calculation to avoid writing errors. It could slightly slow the process.
")) - self.parallel_writing_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Enable writing verification")) self.settings_tabWidget.setTabText(self.settings_tabWidget.indexOf(self.tabWidgetProcessing), _translate("SemiAutomaticClassificationPlugin", "Processing")) - self.label_31.setText(_translate("SemiAutomaticClassificationPlugin", "C Name field")) - self.Info_field_name_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Set the Class name field
[max 10 characters]
")) - self.label_24.setText(_translate("SemiAutomaticClassificationPlugin", " Field names of training input")) - self.ID_field_name_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Set the Class ID field name
[max 10 characters]
")) - self.MID_field_name_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Set the Macroclass ID field name
[max 10 characters]
")) - self.label_10.setText(_translate("SemiAutomaticClassificationPlugin", "C ID field")) - self.MCInfo_field_name_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Set the Macroclass name field
[max 10 characters]
")) - self.label_17.setText(_translate("SemiAutomaticClassificationPlugin", "MC ID field")) - self.label_46.setText(_translate("SemiAutomaticClassificationPlugin", "MC Name field")) - self.reset_field_names_Button.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Reset
")) - self.reset_field_names_Button.setText(_translate("SemiAutomaticClassificationPlugin", "Import library")) self.label_21.setText(_translate("SemiAutomaticClassificationPlugin", " ROI style")) self.change_color_Button.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Select temporary ROI color
")) self.label_22.setText(_translate("SemiAutomaticClassificationPlugin", "ROI color")) @@ -10945,15 +7540,15 @@ def retranslateUi(self, SemiAutomaticClassificationPlugin): self.transparency_Slider.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Change temporary ROI transparency
")) self.reset_color_Button.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Reset
")) self.reset_color_Button.setText(_translate("SemiAutomaticClassificationPlugin", "Import library")) + self.label_95.setText(_translate("SemiAutomaticClassificationPlugin", " Dock")) + self.download_news_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, news about the SCP are downloaded on startup and displayed in Dock
")) + self.download_news_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Download news on startup")) self.label_68.setText(_translate("SemiAutomaticClassificationPlugin", " Variable name")) self.variable_name_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Variable name for expressions
")) self.variable_name_lineEdit.setText(_translate("SemiAutomaticClassificationPlugin", "raster")) - self.label_69.setText(_translate("SemiAutomaticClassificationPlugin", " Variable name for expressions (tab Reclassification and Edit raster)")) + self.label_69.setText(_translate("SemiAutomaticClassificationPlugin", " Variable name for expressions")) self.reset_variable_name_Button.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Reset
")) self.reset_variable_name_Button.setText(_translate("SemiAutomaticClassificationPlugin", "Import library")) - self.label_95.setText(_translate("SemiAutomaticClassificationPlugin", " Dock")) - self.download_news_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "If checked, news about the SCP are downloaded on startup and displayed in Dock
")) - self.download_news_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Download news on startup")) self.label_76.setText(_translate("SemiAutomaticClassificationPlugin", " Project")) self.reset_group_name_Button.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Reset
")) self.reset_group_name_Button.setText(_translate("SemiAutomaticClassificationPlugin", "Import library")) @@ -10963,49 +7558,36 @@ def retranslateUi(self, SemiAutomaticClassificationPlugin): self.group_name_lineEdit.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Group name
")) self.group_name_lineEdit.setText(_translate("SemiAutomaticClassificationPlugin", "Class_temp_group")) self.settings_tabWidget.setTabText(self.settings_tabWidget.indexOf(self.tabWidgetInterface), _translate("SemiAutomaticClassificationPlugin", "Interface")) - self.log_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Enable/Disable the Log of events
")) - self.log_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Record events in a Log file")) + self.test_dependencies_Button.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Test dependencies
")) + self.label_43.setText(_translate("SemiAutomaticClassificationPlugin", " Test")) + self.label_42.setText(_translate("SemiAutomaticClassificationPlugin", "Test dependencies")) self.exportLog_Button.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Export the Log file
")) self.exportLog_Button.setText(_translate("SemiAutomaticClassificationPlugin", "Import library")) - self.clearLog_Button.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Clear the Log file content
")) - self.clearLog_Button.setText(_translate("SemiAutomaticClassificationPlugin", "Import library")) + self.log_checkBox.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Enable/Disable the detailed Log of events in a local text file
")) + self.log_checkBox.setText(_translate("SemiAutomaticClassificationPlugin", "Record detailed events in a Log file")) self.label_30.setText(_translate("SemiAutomaticClassificationPlugin", " Log file")) - item = self.log_tableWidget.horizontalHeaderItem(0) - item.setText(_translate("SemiAutomaticClassificationPlugin", "Date")) - item = self.log_tableWidget.horizontalHeaderItem(1) - item.setText(_translate("SemiAutomaticClassificationPlugin", "Function")) - item = self.log_tableWidget.horizontalHeaderItem(2) - item.setText(_translate("SemiAutomaticClassificationPlugin", "Message")) - self.test_dependencies_Button.setToolTip(_translate("SemiAutomaticClassificationPlugin", "Test dependencies
")) - self.label_42.setText(_translate("SemiAutomaticClassificationPlugin", "Test dependencies")) - self.label_43.setText(_translate("SemiAutomaticClassificationPlugin", " Test")) self.settings_tabWidget.setTabText(self.settings_tabWidget.indexOf(self.tabWidgetDebug), _translate("SemiAutomaticClassificationPlugin", "Debug")) self.SCP_tabs.setTabText(self.SCP_tabs.indexOf(self.tab_Settings), _translate("SemiAutomaticClassificationPlugin", "Settings")) self.plugin_label.setText(_translate("SemiAutomaticClassificationPlugin", "Semi-Automatic Classification Plugin")) self.textBrowser.setHtml(_translate("SemiAutomaticClassificationPlugin", "\n" "\n" -"Developed by Luca Congedo (ing.congedoluca@gmail.com), the Semi-Automatic Classification Plugin (SCP) is a free open source plugin for QGIS that allows for the semi-automatic classification (also supervised classification) of remote sensing images.
\n" -"It provides several tools for the download of free images, the preprocessing, the postprocessing, and the raster calculation.
\n" -"For more information and tutorials visit the official site From GIS to Remote Sensing.
\n" -"\n" -"
Please join the Semi-Automatic Classification Plugin group on Facebook or GitHub discussions
This plugin requires the installation of GDAL, OGR, Numpy, SciPy, and Matplotlib (already bundled with QGIS).
\n" -"Some tools require the additional installation of: ESA SNAP
\n" +"\n" +"Developed by Luca Congedo (ing.congedoluca@gmail.com), the Semi-Automatic Classification Plugin (SCP) is a free open source plugin for QGIS that allows for the semi-automatic classification (also supervised classification) of remote sensing images.
\n" +"It provides several tools for the download of free images, the preprocessing, the postprocessing, and the raster calculation.
\n" +"For more information and tutorials visit the official site From GIS to Remote Sensing.
\n" "How to cite:
\n" -"Congedo, Luca, (2021). Semi-Automatic Classification Plugin: A Python tool for the download and processing of remote sensing images in QGIS. Journal of Open Source Software, 6(64), 3172, https://doi.org/10.21105/joss.03172
\n" +"How to cite:
\n" +"Congedo, Luca, (2021). Semi-Automatic Classification Plugin: A Python tool for the download and processing of remote sensing images in QGIS. Journal of Open Source Software, 6(64), 3172, https://doi.org/10.21105/joss.03172
\n" "
The Semi-Automatic Classification Plugin is developed by Luca Congedo.
The Semi-Automatic Classification Plugin is developed by Luca Congedo.
\n" "Translators:
\n" -"Language: Author
Language: Author name
\n" +"Semi-Automatic Classification Plugin is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 3 of the License.
\n" "Semi-Automatic Classification Plugin 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.
\n" "See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Semi-Automatic Classification Plugin. If not, see <http://www.gnu.org/licenses/>.
")) self.SCP_tabs.setTabText(self.SCP_tabs.indexOf(self.tab_About), _translate("SemiAutomaticClassificationPlugin", "About")) self.main_tabWidget.setTabText(self.main_tabWidget.indexOf(self.tool_tab), _translate("SemiAutomaticClassificationPlugin", "Tool")) self.main_tabWidget.setTabText(self.main_tabWidget.indexOf(self.help_tab), _translate("SemiAutomaticClassificationPlugin", "Help")) - from . import resources_rc diff --git a/ui/ui_semiautomaticclassificationplugin.ui b/ui/ui_semiautomaticclassificationplugin.ui old mode 100644 new mode 100755 index 50693b5..4a8541b --- a/ui/ui_semiautomaticclassificationplugin.ui +++ b/ui/ui_semiautomaticclassificationplugin.ui @@ -9,8 +9,8 @@Batch
")) + DockClass.setWindowTitle(_translate("DockClass", "SCP Dock")) self.postprocessing_toolButton_2.setToolTip(_translate("DockClass", "Postprocessing
")) - self.preprocessing_toolButton_2.setToolTip(_translate("DockClass", "Preprocessing
")) self.bandset_toolButton.setToolTip(_translate("DockClass", "Band set
")) - self.bandcalc_toolButton_2.setToolTip(_translate("DockClass", "Band calc
")) - self.download_images_toolButton_2.setToolTip(_translate("DockClass", "Download products
")) + self.preprocessing_toolButton_2.setToolTip(_translate("DockClass", "Preprocessing
")) self.band_processing_toolButton.setToolTip(_translate("DockClass", "Band processing
")) + self.batch_toolButton.setToolTip(_translate("DockClass", "Batch
")) self.basic_tools_toolButton.setToolTip(_translate("DockClass", "Basic tools
")) + self.bandcalc_toolButton_2.setToolTip(_translate("DockClass", "Band calc
")) + self.download_images_toolButton_2.setToolTip(_translate("DockClass", "Download products
")) self.label_35.setText(_translate("DockClass", " News")) + self.rs_version.setText(_translate("DockClass", "")) self.userguide_toolButton_2.setToolTip(_translate("DockClass", "User manual
")) self.userguide_toolButton_2.setText(_translate("DockClass", "User manual")) self.help_toolButton_2.setToolTip(_translate("DockClass", "Ask a question
")) - self.help_toolButton_2.setText(_translate("DockClass", "Ask a question")) - self.support_toolButton.setToolTip(_translate("DockClass", "Support the SCP
")) - self.support_toolButton.setText(_translate("DockClass", "Support the SCP")) - self.label.setText(_translate("DockClass", "How to cite:
Congedo, Luca, (2021). Semi-Automatic Classification Plugin: A Python tool for the download and processing of remote sensing images in QGIS. Journal of Open Source Software, 6(64), 3172, https://doi.org/10.21105/joss.03172
")) + self.help_toolButton_2.setText(_translate("DockClass", "Support forum")) + self.label.setText(_translate("DockClass", "To cite the Semi-Automatic Classification Plugin in your work:
Congedo, Luca, (2021). Semi-Automatic Classification Plugin: A Python tool for the download and processing of remote sensing images in QGIS. Journal of Open Source Software, 6(64), 3172, https://doi.org/10.21105/joss.03172
")) self.tabWidget_dock.setTabText(self.tabWidget_dock.indexOf(self.tab), _translate("DockClass", "Home")) self.button_new_input.setToolTip(_translate("DockClass", "Create a new training input
")) self.trainingFile_lineEdit.setToolTip(_translate("DockClass", "Input file path
")) @@ -620,36 +638,35 @@ def retranslateUi(self, DockClass): self.label_42.setText(_translate("DockClass", "C ID")) self.label_45.setText(_translate("DockClass", "MC Name")) self.label_44.setText(_translate("DockClass", "MC ID")) - self.ROI_ID_spin.setToolTip(_translate("DockClass", "The class ID of the ROI signature
")) + self.ROI_ID_spin.setToolTip(_translate("DockClass", "The class ID of the ROI signature (should be unique)
")) self.ROI_Class_line.setToolTip(_translate("DockClass", "The class name of the ROI signature
")) - self.ROI_Class_line.setText(_translate("DockClass", "C 1")) self.ROI_Macroclass_line.setToolTip(_translate("DockClass", "The macroclass name of the ROI signature
")) - self.ROI_Macroclass_line.setText(_translate("DockClass", "MC 1")) self.undo_save_Button.setToolTip(_translate("DockClass", "Undo ROI save
")) self.undo_save_Button.setText(_translate("DockClass", "Import library")) self.redo_save_Button.setToolTip(_translate("DockClass", "Redo ROI save
")) self.redo_save_Button.setText(_translate("DockClass", "Import library")) - self.save_input_checkBox.setToolTip(_translate("DockClass", "Automatically save training input when a ROI is saved in it
")) + self.save_input_checkBox.setToolTip(_translate("DockClass", "Automatically save the training input whenever a ROI is saved in it
")) self.save_input_checkBox.setText(_translate("DockClass", "Autosave")) self.signature_checkBox.setToolTip(_translate("DockClass", "Add ROI spectral signature to signature list
")) self.signature_checkBox.setText(_translate("DockClass", "Signature")) self.button_Save_ROI.setToolTip(_translate("DockClass", "Save temporary ROI to training input
")) self.button_Save_ROI.setText(_translate("DockClass", "Import library")) self.tabWidget_dock.setTabText(self.tabWidget_dock.indexOf(self.tab_2), _translate("DockClass", "Training input")) + self.rapidROI_band_spinBox.setToolTip(_translate("DockClass", "Band number
")) + self.rapid_ROI_checkBox.setToolTip(_translate("DockClass", "Calculate temporary ROI only on one band
")) + self.rapid_ROI_checkBox.setText(_translate("DockClass", "Rapid ROI b.")) self.display_cursor_checkBox.setToolTip(_translate("DockClass", "Display a vegetation index value with the cursor
")) self.display_cursor_checkBox.setText(_translate("DockClass", "Display")) self.vegetation_index_comboBox.setToolTip(_translate("DockClass", "Select a vegetation index
")) self.vegetation_index_comboBox.setItemText(0, _translate("DockClass", "NDVI")) self.vegetation_index_comboBox.setItemText(1, _translate("DockClass", "EVI")) self.vegetation_index_comboBox.setItemText(2, _translate("DockClass", "Custom")) - self.custom_index_lineEdit.setToolTip(_translate("DockClass", "Custom expression (e.g. bandset#b4 / bandset#b3 )
")) - self.rapid_ROI_checkBox.setToolTip(_translate("DockClass", "Calculate temporary ROI only on one band
")) - self.rapid_ROI_checkBox.setText(_translate("DockClass", "Rapid ROI b.")) - self.rapidROI_band_spinBox.setToolTip(_translate("DockClass", "Band number
")) - self.auto_refresh_ROI_radioButton.setToolTip(_translate("DockClass", "Automatically refresh the temporary ROI, as the parameters change
")) - self.auto_refresh_ROI_radioButton.setText(_translate("DockClass", "A&uto-refresh ROI")) - self.auto_calculate_ROI_signature_radioButton.setToolTip(_translate("DockClass", "Automatically calculate signature plot of temporary ROI
")) - self.auto_calculate_ROI_signature_radioButton.setText(_translate("DockClass", "Auto-plot")) + self.custom_index_lineEdit.setToolTip(_translate("DockClass", "Custom expression (e.g. "b1" / "b2" or "#NIR#" / "#RED#")
")) + self.auto_refresh_ROI_checkBox.setToolTip(_translate("DockClass", "Automatically refresh the temporary ROI, as the parameters change
")) + self.auto_refresh_ROI_checkBox.setText(_translate("DockClass", "A&uto-refresh ROI")) + self.auto_calculate_ROI_signature_checkBox.setToolTip(_translate("DockClass", "Automatically calculate signature plot of temporary ROI
")) + self.auto_calculate_ROI_signature_checkBox.setText(_translate("DockClass", "Auto-plot")) + self.label_46.setText(_translate("DockClass", "Maximum training buffer")) + self.max_buffer_spinBox.setToolTip(_translate("DockClass", "Maximum training buffer for undo and redo actions (higher values require more memory)
")) self.tabWidget_dock.setTabText(self.tabWidget_dock.indexOf(self.tab_12), _translate("DockClass", " ROI options")) - from . import resources_rc diff --git a/ui/ui_semiautomaticclassificationplugin_dock_class.ui b/ui/ui_semiautomaticclassificationplugin_dock_class.ui old mode 100644 new mode 100755 index 8afb664..a44c13f --- a/ui/ui_semiautomaticclassificationplugin_dock_class.ui +++ b/ui/ui_semiautomaticclassificationplugin_dock_class.ui @@ -6,8 +6,8 @@Calculate scatter plot
")) - self.show_polygon_area_pushButton.setToolTip(_translate("ScatterPlot", "Calculate and display scatter raster
")) - self.add_signature_list_pushButton.setToolTip(_translate("ScatterPlot", "Calculate and save to signature list
")) - self.value_label_2.setText(_translate("ScatterPlot", "x=0.000000 y=0.000000")) - self.fitToAxes_pushButton_2.setToolTip(_translate("ScatterPlot", "Automatically fit the plot to data
")) - self.save_plot_pushButton_2.setToolTip(_translate("ScatterPlot", "Save the plot to file (jpg, png, pdf)
")) - self.label_27.setText(_translate("ScatterPlot", " Plot")) - self.label_50.setText(_translate("ScatterPlot", "Colormap")) - self.colormap_comboBox.setToolTip(_translate("ScatterPlot", "Select a colormap
")) - self.plot_color_ROI_pushButton.setToolTip(_translate("ScatterPlot", "Set colormap for highlighted spectral plots
")) - self.label_51.setText(_translate("ScatterPlot", "Extent")) - self.extent_comboBox.setToolTip(_translate("ScatterPlot", "Select extent of scatter raster
")) - self.extent_comboBox.setItemText(0, _translate("ScatterPlot", "same as display")) - self.extent_comboBox.setItemText(1, _translate("ScatterPlot", "same as image")) - self.draw_polygons_pushButton.setToolTip(_translate("ScatterPlot", "Create selection polygons
")) - self.label_22.setText(_translate("ScatterPlot", "color")) - self.polygon_color_Button.setToolTip(_translate("ScatterPlot", "Select polygon color
")) - self.remove_polygons_pushButton.setToolTip(_translate("ScatterPlot", "Remove selection polygons
")) - self.label_48.setText(_translate("ScatterPlot", "Band Y")) - self.bandY_spinBox.setToolTip(_translate("ScatterPlot", "Band Y
")) - self.label_46.setText(_translate("ScatterPlot", "Band X")) - self.bandX_spinBox.setToolTip(_translate("ScatterPlot", "Band X
")) self.precision_checkBox.setToolTip(_translate("ScatterPlot", "Use custom decimal precision
")) self.precision_checkBox.setText(_translate("ScatterPlot", "Precision")) self.precision_comboBox.setToolTip(_translate("ScatterPlot", "Select decimal precision:
4 = 10^−4
3 = 10^−3
2 = 10^−2
1 = 10^−1
0 = 1
-1 = 10
-2 = 10^2
-3 = 10^3
")) @@ -449,12 +320,19 @@ def retranslateUi(self, ScatterPlot): self.precision_comboBox.setItemText(5, _translate("ScatterPlot", "-1")) self.precision_comboBox.setItemText(6, _translate("ScatterPlot", "-2")) self.precision_comboBox.setItemText(7, _translate("ScatterPlot", "-3")) + self.fitToAxes_pushButton_2.setToolTip(_translate("ScatterPlot", "Automatically fit the plot to data
")) + self.save_plot_pushButton_2.setToolTip(_translate("ScatterPlot", "Save the plot to file (jpg, png, pdf)
")) + self.label_27.setText(_translate("ScatterPlot", " Plot")) + self.label_50.setText(_translate("ScatterPlot", "Colormap")) + self.colormap_comboBox.setToolTip(_translate("ScatterPlot", "Select a colormap for selected rows
")) + self.value_label_2.setText(_translate("ScatterPlot", "x=0.000000 y=0.000000")) + self.label_48.setText(_translate("ScatterPlot", "Band Y")) + self.bandY_spinBox.setToolTip(_translate("ScatterPlot", "Band Y
")) + self.label_46.setText(_translate("ScatterPlot", "Band X")) + self.bandX_spinBox.setToolTip(_translate("ScatterPlot", "Band X
")) self.remove_Signature_Button.setToolTip(_translate("ScatterPlot", "Delete row
")) self.remove_Signature_Button.setText(_translate("ScatterPlot", "Plot")) self.plot_temp_ROI_pushButton.setToolTip(_translate("ScatterPlot", "Calculate scatter plot from temporary ROI
")) - self.plot_display_pushButton.setToolTip(_translate("ScatterPlot", "Calculate scatter plot from the current display extent
")) - self.plot_image_pushButton.setToolTip(_translate("ScatterPlot", "Calculate scatter plot from entire image
")) self.label_25.setText(_translate("ScatterPlot", " Scatter list")) - from .scatterwidget2 import ScatterWidget2 from . import resources_rc diff --git a/ui/ui_semiautomaticclassificationplugin_scatter_plot.ui b/ui/ui_semiautomaticclassificationplugin_scatter_plot.ui old mode 100644 new mode 100755 index 4654698..a4ecfe0 --- a/ui/ui_semiautomaticclassificationplugin_scatter_plot.ui +++ b/ui/ui_semiautomaticclassificationplugin_scatter_plot.ui @@ -23,6 +23,9 @@Activate pointer for setting thresholds from pixel
")) - self.label_90.setText(_translate("SpectralSignaturePlot", "From\n" -"pixel")) - self.LCS_cut_checkBox_2.setToolTip(_translate("SpectralSignaturePlot", "If checked, signature threshold is reduced to exclude pixel signature
")) - self.LCS_include_checkBox_2.setToolTip(_translate("SpectralSignaturePlot", "If checked, signature threshold is extended to include pixel signature
")) - self.label_91.setText(_translate("SpectralSignaturePlot", "From\n" -"ROI")) - self.LCS_ROI_button_2.setToolTip(_translate("SpectralSignaturePlot", "Set thresholds from temporary ROI
")) - self.label_26.setText(_translate("SpectralSignaturePlot", "Automatic thresholds")) - self.set_min_max_Button.setToolTip(_translate("SpectralSignaturePlot", "Set automatic threshold Min Max
")) - self.label_102.setText(_translate("SpectralSignaturePlot", "Min Max")) - self.label_101.setText(_translate("SpectralSignaturePlot", "σ *")) - self.multiplicative_threshold_doubleSpinBox_2.setToolTip(_translate("SpectralSignaturePlot", "Set a value that will be multiplied by standard deviation
")) - self.automatic_threshold_pushButton_2.setToolTip(_translate("SpectralSignaturePlot", "Set automatic threshold σ
")) - self.undo_threshold_Button.setToolTip(_translate("SpectralSignaturePlot", "Undo thresholds
")) - self.undo_threshold_Button.setText(_translate("SpectralSignaturePlot", "Import library")) + self.add_signature_list_pushButton.setToolTip(_translate("SpectralSignaturePlot", "Add highlighted spectral signatures to signature list
")) self.remove_Signature_Button.setToolTip(_translate("SpectralSignaturePlot", "Delete row
")) self.remove_Signature_Button.setText(_translate("SpectralSignaturePlot", "Plot")) - self.add_signature_list_pushButton.setToolTip(_translate("SpectralSignaturePlot", "Add highlighted spectral signatures to signature list
")) - self.calculate_spectral_distance_Button.setToolTip(_translate("SpectralSignaturePlot", "Calculate spectral distances
")) + self.calculate_spectral_distance_Button.setToolTip(_translate("SpectralSignaturePlot", "Calculate spectral distances of highlighted signatures
")) self.calculate_spectral_distance_Button.setText(_translate("SpectralSignaturePlot", "Plot")) self.label_25.setText(_translate("SpectralSignaturePlot", " Signature list")) - self.band_lines_checkBox.setToolTip(_translate("SpectralSignaturePlot", "Plot the value range (standard deviation or defined minimum and maximum) for each signature
")) - self.band_lines_checkBox.setText(_translate("SpectralSignaturePlot", "Band lines")) self.label_8.setText(_translate("SpectralSignaturePlot", "Max characters")) - self.plot_text_spinBox.setToolTip(_translate("SpectralSignaturePlot", "Text lenght of names in the spectral plot legend
")) + self.band_lines_checkBox.setToolTip(_translate("SpectralSignaturePlot", "Plot vertical lines for each band value
")) + self.band_lines_checkBox.setText(_translate("SpectralSignaturePlot", "Band lines")) self.value_label.setText(_translate("SpectralSignaturePlot", "x=0.000000 y=0.000000")) - self.value_range_pushButton.setToolTip(_translate("SpectralSignaturePlot", "Change value range interactively in the plot
")) - self.fitToAxes_pushButton.setToolTip(_translate("SpectralSignaturePlot", "Automatically fit the plot to data
")) + self.plot_text_spinBox.setToolTip(_translate("SpectralSignaturePlot", "Text lenght of names in the spectral plot legend
")) + self.grid_checkBox.setToolTip(_translate("SpectralSignaturePlot", "Plot the axis grid
")) + self.grid_checkBox.setText(_translate("SpectralSignaturePlot", "Grid")) self.save_plot_pushButton.setToolTip(_translate("SpectralSignaturePlot", "Save the plot to file (jpg, png, pdf)
")) self.sigma_checkBox.setToolTip(_translate("SpectralSignaturePlot", "Plot the value range (standard deviation or defined minimum and maximum) for each signature
")) self.sigma_checkBox.setText(_translate("SpectralSignaturePlot", "Plot value range")) - self.grid_checkBox.setToolTip(_translate("SpectralSignaturePlot", "Plot the value range (standard deviation or defined minimum and maximum) for each signature
")) - self.grid_checkBox.setText(_translate("SpectralSignaturePlot", "Grid")) + self.fitToAxes_pushButton.setToolTip(_translate("SpectralSignaturePlot", "Automatically fit the plot to data
")) self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab), _translate("SpectralSignaturePlot", "Plot")) self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_2), _translate("SpectralSignaturePlot", "Signature details")) self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_3), _translate("SpectralSignaturePlot", "Spectral distances")) - from .sigwidget2 import SigWidget2 from . import resources_rc diff --git a/ui/ui_semiautomaticclassificationplugin_signature_plot.ui b/ui/ui_semiautomaticclassificationplugin_signature_plot.ui old mode 100644 new mode 100755 index 2cdc3f2..e4fd67d --- a/ui/ui_semiautomaticclassificationplugin_signature_plot.ui +++ b/ui/ui_semiautomaticclassificationplugin_signature_plot.ui @@ -6,7 +6,7 @@First time using the Semi-Automatic Classification Plugin (SCP)?
\n" -"Please check the user manual with tutorials available in several languages.
\n" -"You can also contribute to SCP translation.
\n" -"For comments or questions please join the SCP group in Facebook .
\n" -"Select all
")) + self.select_all_toolButton.setText(_translate("SCP_Widget", "Plot")) +from . import resources_rc diff --git a/ui/ui_semiautomaticclassificationplugin_widget.ui b/ui/ui_semiautomaticclassificationplugin_widget.ui new file mode 100755 index 0000000..5f5f214 --- /dev/null +++ b/ui/ui_semiautomaticclassificationplugin_widget.ui @@ -0,0 +1,113 @@ + +