I am trying to import my supervised classification from SNAP to QGIS. I exported the file in GeoTIFF format in SNAP and opened it in QGIS. But the raster is all red… what are the steps I am missing?
(Also, could you tell me if a KNN classification is pertinent for land use classification (my classes are: crop, grassland, forest, shrubland etct). Of all algorithms, it seems to be giving me the most accurate classification; but I see RF and ML being used more often…)
band 1 is the one with the classification. As it ranges between 2 and 11 there must be values. Have you made sure that the colors in QGIS cover this range? You can set it to “unique values” instead of a stretched color ramp so that each value gets its own color.
The same happened to me. I actually coloured it manually because otherwise it wasn’t working.
I noticed that after opening the SNAP-file in QGIS the “overlapping” which is coloured in grey is part of the background. I want it to be a color from the classes as the other ones. I didn’t noticed it in SNAP but after doing the import into QGIS I realized it.
As I have read the problem earlier from your first post, I’d suggest to export the band 1 which has the classification, from optical —>band extractor, no need to import to other format in this case, however keep the SNAP format, you’ll get folder has the header and the file image, drag and drop it in QGIS, and see if has any difference of color,
Concerning the background color, check up the training classes, and also in case this within red circle the classes’ borders and the background whether both give NaN or not!
I already drag and drop the image and this worked.
Concerning your other advice, I do not understand exactly what you mean (new in this ). There is always a class which appears as kind of default-class and yes the backround and part of the real area has the overlapping color as I circled in red.
I was doing other things the past time. My question still remains and also the problem shown in the picture.
I actually had originally a picture which was rectangular which I clipped in QGIS. Afterwards I used the clipped image to aply the LUC. You always have to choose the image you use (Function BandSet: Multiband) if not you can’t proceed with the selection of the ROIs. What did you mean by pixels of masked area? By the way the training data is from QGIS but the error can be seen on SNAP after the classification is done.
@ABraun
The geotiff products exported from snap to QGIS contains those no-data areas, is there a way to remove those areas from snap before the export?
Those areas of no data have the value of Zero but I am afraid that pixels inside the interferogram itself that has a phase value of zero would be filtererd out as well. here’s my attempt of defining No-data-value to remove those areas