In general it works fine.
For some data there are errors. But give it a try - in most of the cases it will perform great.
In general it works fine.
Good morning everyone,
I am also a student trying to work with the Supervised Classification.
I am trying to classify a raster formed by several bands, each of them containing the temporal profile of a VI o similar features; the bands were derived from landsat8 data.
I have tried to perform the Random Forest and I got the error “bound must be positive”, even if all the values of the used bands were >=0.
I have also tried with MLC and MD, but, just like the people above in this discussion, I got a blank raster, full with NaN.
Has anyone managed to understand what is the problem behind these errors?
‘bound’ could refer to the coordinates of your data. Did you project your raster to a coordinate system? Which one?
What kind of data are you working on?
Generally in java this error means your item is empty, here your image (if a java expert can confirm ?) and when he tries to jump to the next item’s object (pixel) bound is negative (don’t know if it’s clear).
So there’s a problem with the image reading I guess (again if someone can confirm would be great )
hi , Unfortunately I have the same problem
I want to make a supervised classification (RF or SVM), I chose the region of interest, when I do the classification RF I receive the following error “bound must be positive”, I made the reprojection and still I have a problem: the LabeledClasses layer is displayed in black, I can not see the different classes.
Please help me solve this problem
I need tutorials, documents or video on classification under SNAP
I am not sure about “bound must be positive”.
What I did for preprocessing the product:
- Atmospheric correction: Sen2Cor algorithm [S2A_OPER…]
- Resampling the new product [S2A_USER…]
- Subset the area of interest (AOI)
- Reproject the AOI
- Training vectors (masks) [cluster of pixels]: forest, crop, urban, soil …
- Apply the supervised classification algorithm (iterative)
I read in the SNAP tutorial that it supports the SVM classification, but I do not find it in the supervised classification menu.
Is that someone you have already worked with SVM under SNAP ???
Thank you in advance!
I’m not sure but I think it was included once but was then removed again. It was available only a short time between two updates.
Thank you for your answer.
The SVM is implemented but not yet ready for all to use. I’m not sure when I’ll have time to get back to it - maybe by spring.
The SVM is implemented but not yet ready for all to use. I’m not sure when
I’ll have time to get back to it - maybe by spring.
What is the spatial resolution of the result of the classification ??
It is the same as the source image.
Thanks for your quick reply, you used all ten bands for the classification ???
Depends on the goal, but it’s a good start.
Ok thank you, my goal is to do the mapping of the annual crop types, and I need the bands of SWIR and red Edge for the classification.
I could not run the KNN classifier despite reproducing exact steps as described. I made vector layers with training areas and saved the product. Then I ran KNN on vanilla SNAP 5.0. The classifier ran without error, but output data were null, as someone else had.
Then I upgraded the SNAP installation to the latest version and I got
Error: [NodeId: KNN-Classifier] node when entering the KNN-Classifier tab.
Can you look into it?
Here’s a log snippet I managed to find:
org.esa.snap.core.gpf.graph.GraphException: [NodeId: KNN-Classifier] node at org.esa.snap.core.gpf.graph.NodeContext.initTargetProduct(NodeContext.java:79) at org.esa.snap.core.gpf.graph.GraphContext.initNodeContext(GraphContext.java:195) at org.esa.snap.core.gpf.graph.GraphContext.initNodeContext(GraphContext.java:178) at org.esa.snap.core.gpf.graph.GraphContext.initOutput(GraphContext.java:162) at org.esa.snap.core.gpf.graph.GraphContext.<init>(GraphContext.java:91) at org.esa.snap.core.gpf.graph.GraphContext.<init>(GraphContext.java:64) at org.esa.snap.graphbuilder.rcp.dialogs.support.GraphExecuter.recreateGraphContext(GraphExecuter.java:268) at org.esa.snap.graphbuilder.rcp.dialogs.support.GraphExecuter.InitGraph(GraphExecuter.java:248) at org.esa.snap.graphbuilder.rcp.dialogs.GraphBuilderDialog.InitGraph(GraphBuilderDialog.java:324) at org.esa.snap.graphbuilder.rcp.dialogs.GraphBuilderDialog.ValidateAllNodes(GraphBuilderDialog.java:539) at org.esa.snap.graphbuilder.rcp.dialogs.GraphBuilderDialog.access$000(GraphBuilderDialog.java:65) at org.esa.snap.graphbuilder.rcp.dialogs.GraphBuilderDialog$1.stateChanged(GraphBuilderDialog.java:149) at javax.swing.JTabbedPane.fireStateChanged(Unknown Source) at javax.swing.JTabbedPane$ModelListener.stateChanged(Unknown Source) at javax.swing.DefaultSingleSelectionModel.fireStateChanged(Unknown Source) at javax.swing.DefaultSingleSelectionModel.setSelectedIndex(Unknown Source) at javax.swing.JTabbedPane.setSelectedIndexImpl(Unknown Source) at javax.swing.JTabbedPane.setSelectedIndex(Unknown Source) at javax.swing.plaf.basic.BasicTabbedPaneUI$Handler.mousePressed(Unknown Source) at java.awt.AWTEventMulticaster.mousePressed(Unknown Source) at java.awt.Component.processMouseEvent(Unknown Source) at javax.swing.JComponent.processMouseEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Window.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$500(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source)
Nothing has changed in the updates for the classifiers. However, this looks like a similar bug to the one reported recently involving S2 masks. This should be fixed now and will be available soon.