Supervised and unsupervised classification, Sentinel 2

I don’t think it’s possible in SNAP, but I can recommend the SCP plugin for QGIS

1 Like

That’s the semi-automatic classification plugin?

yes, it provides great post-processing options for classification. img-files of the dimap format can directly loaded into QGIS.

Ok, great. I will try QGIS. Cheers and thanks

Hi again. I am re-running the classification in SNAP and I get the following message:

Java.io.IOException: The device is not ready.

What could be the issue?

Pam

Often it is caused by a wrong path to a file.

1 Like

Thanks…had figured it out!

I am unable to load dimap files into QGIS…what could I be doing wrong?

Don’t open the dim-file, this is only the metadata. Take the img-file from the folder of same name.

1 Like

ok thanks! It worked

4 posts were split to a new topic: Classification: How to use saved classifier on another product

A post was merged into an existing topic: Classification: How to use saved classifier on another product

Hi, could the people of SNAP clarify why the supervised classification (I’m using MLC) does not work if a reprojection step is not included? According to the previous posts and my experience the process works when:

Resample (and save product)
Subset (if necessary) (and save product)
Reproject (and save product)
Run classification (training areas created before)

Why do we have to reproject if the S2 1c has already a reference system? Is this a software bug? It doesn’t look logical to reproject a product that is already projected

Thanks for the clarification
M

I haven’t heard of this before, can you please provide links to posts where it is stated that data should be reprojected?

The only think about Sentinel-2 is that it is a multi-size product so resampling is needed before most steps. The thing is that the resampling operator only writes a logical product in most cases (when resampling only takes 1 second). It is physically written on your hard drive only when you save the product as a dim file or perform another operation on it which writes a product to a new file. So maybe this step is needed for classification but I don’t think it must be reprojection in special.

It is mentioned in this post

But this is a bug. And @junlu already said that they will have a look at it.

what do we input apart from the one image we want to classify ? plz specify in detail.

what did u input in product set reader? which images do i need to take, the one needs to be classified and what about the second one? please give details

what files do i need to take as input in product set reader for supervised knn or random forest classifier? plz specify in detail

I would suggest reading some of the basics first. Otherwise you would just press buttons without knowing what is happening :slight_smile:


http://www.iiste.org/Journals/index.php/JEES/article/viewFile/7807/7873
http://www.nrcan.gc.ca/node/9361

3 Likes

Dear @ABraun ,
I have same error.
I want to do classification on Tandem-x image but first of all, I tried on S2 product. I resampled it from 60 m to 20 meters and then I subseted a small area and created a container with the right name. Then I selected it by clicking on the corresponding class under Vector Data and use one of the digitizing tools: Rectangle, polygon or circle. You can see my steps in below but polygon does not have information.
What can I do now?