Replies: 5 comments
-
Hello, it is probably related to raster values. |
Beta Was this translation helpful? Give feedback.
-
I am using Sentinel-2 data. However I have used the Acolite processing package to perform atmospheric correction. The output from Acolite is a netCDF file containing a series of geotiffs for each band. I am only running the SCP on 6 of the bands all resampled to 10m. Is there any way I can use SCP to deal will no data values by setting inf to nans? I find the raster calculator does not handle the geotiffs from Acolite output very well. I cannot find any configuration within to Acolite package to deal with this. Otherwise I will write my own python script to set any inf values to nan. I assume that SCP is designed to ignore nan values but not to look for very high inf values. Is this true? Thanks for taking the time to reply. |
Beta Was this translation helpful? Give feedback.
-
Hello @NOC-EO , yes, inf values should be reclassified to NoData. |
Beta Was this translation helpful? Give feedback.
-
Hello I appreciate the time you have taken to reply to this discussion. I am now redoing my work and I have used a conditional expression to set the data values. I found out that the issue was that in certain circumstances Acolite, that i used for atmospheric correction, gives -ive values for reflectance. Following your advise I can now digitise ROIs wherever I want in the data. However, I am now running into the issue of getting this error when calculating the spectral signatures:
I get this error for every ROI that I try to use. I have tried reloading the band-set as well as recreating it from scratch. The classifier does not give any results. Presumably because of this error. (1) can you comment on this error Many thanks - CLive |
Beta Was this translation helpful? Give feedback.
-
Hello
this error usually means that you changed the Band set after the creation of the training input.
The NoData values are defined within the tif file, you can use the option "Output NoData" in Band calc https://semiautomaticclassificationmanual.readthedocs.io/en/latest/bandCalcTab.html#output-raster-1 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have repeatedly got this error and I haven't been able to fix it in the source code. As far as I can tell the 'inf' must be a value in one of my bands. I have tried replacing it in the string at line 1609 in utils.py but cannot get it to work..
An error has occurred while executing Python code:
NameError: name 'inf' is not defined
Traceback (most recent call last):
File "C:\Users/cneil/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\SemiAutomaticClassificationPlugin\dock\scpdock.py", line 2411, in saveROItoShapefile
cfg.utls.calculateSignature(cfg.shpLay, cfg.bandSetsList[bandSetNumber][8], [self.ROILastID], cfg.ROIMacroID, cfg.ROIMacroClassInfo, cfg.ROIID, cfg.ROIInfo, 50, 40, 'No', 'No', UID, bandSetNumber = bandSetNumber)
File "C:\Users/cneil/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\SemiAutomaticClassificationPlugin\core\utils.py", line 1610, in calculateSignature
rStat = eval(rStatStr)
File "", line 1, in
NameError: name 'inf' is not defined
Beta Was this translation helpful? Give feedback.
All reactions