sen2cor scene classification problem

Hello, I tried to compute L2A by use of sen2cor, however it seems it can’t complete the task because it can’t delete a file (see the error snapshot below). However it produces some results but they don’t look reliable. For instance if you take a look at the classification it finds a lot of water where there are mountains. Did anyone encountered the same problem?

Thank you for any help.

Regards
Gabriele

Dear Gabriele,

I cannot help you with the installation problem, but may be with the problem regarding the classification problem. Do you processed the product using a DEM? The result looks as you were processing without a DEM.
Processing with a DEM is quite easy. I recommend you creating a folder for the DEM in your Sen2Cor user directory. In the cfg-folder you find the configuration file L2A_GIPP. Change in line 8 of the file “None” into the name or your new directory and that is all. The processor is then downloading the required DEM and saves it into your DEM-directory.

Dear bdpg, thank you for your help. Indeed I did not set the DEM in the config file. However once set an error is raised: gdalwarp is not a recognized program. After that, sen2cor stops.

Dear gabbro,

I have no idea what happens with your Sen2Cor installation. Its running on my computer without this error. I will forward this problem to Sen2Cor developer.

Kind regards
Bringfried

————————————————————————
Deutsches Zentrum für Luft- und Raumfahrt (DLR) - German Aerospace Center | Earth Observation Center | Remote Sensing Technology Institute | Photogrammetry and Image Analysis | Team Marine Remote Sensing | Rutherfordstrasse 2 | 12489 Berlin | Germany

Bringfried Pflug
Telephone +49 30 67055-655 | Telefax +49 30 67055-642 | bringfried.pflug@dlr.demailto:bringfried.pflug@dlr.de www.DLR.de/eochttp://www.dlr.de/eoc

Von: gabbro [mailto:forum@step-email.net]
Gesendet: Freitag, 8. Januar 2016 11:30
An: Pflug, Bringfried
Betreff: [step] [s2tbx/sen2cor] sen2cor scene classification problem

[Das Bild wurde vom Absender entfernt.]

gabbrohttp://forum.step.esa.int/users/gabbro
January 8

Dear bdpg, thank you for your help. Indeed I did not set the DEM in the config file. However once set an error is raised: gdalwarp is not a recognized program. After that, sen2cor stops.

To respond, reply to this email or visit sen2cor scene classification problem in your browser.

Dear bdpg,
thank you very much, it is very kind of you.

Kind regards
Gabriele

this issue is identified as a problem (SIIMPC-297) and will be fixed in the next release.

1 Like

Dear Gabriele,

Your first probelm also happens to me when I try to process SEN2COR at 10m. But it works well when I specify 20m or 60m.
Concerning the GDAL issue, please be sure that GDAL is already installed on your system, or that it is well defined as an environnment variable (see the installation section in http://s2tbx.telespazio-vega.de/sen2cor/sen2cor-sum-2.0.pdf).

Regards,

Robin

1 Like

This seems to be the same copy error that was discussed elsewhere.
A possible workaround is at Workaround for sen2cor bug at resolution 10 m .

1 Like

Hi All,
as to the gdal issue I found a workaround. I edited the L2A_Tables.py script and I wrote the reference to the complete path of the folder containing the gdal libraries. For instance where the script instances the variable:
command = 'gdalwarp ’
I make it become:
command = myPathToGdalLib + 'gdalwarp ’
In this way it works and sen2cor reaches the end.

However the classification results still seem unreliable. There is still a lot of water detected in mountain areas and urban areas. Or clouds detected over industrial buildings with grey roofs.
Any suggestion?

Thank you in advance.
Gabriele

Hey gabbro,
how is you path to GdalLib?

Regards

Hi kirl23,
my path is: ‘C:/Anaconda2/pkgs/gdal-1.11.1-np19py27_0/Lib/site-packages/osgeo/’
Regards

Hello gabbro,

your solution doesn’t work for my but i found (with my friend) other way to solve this problem without ingerention to L2A_Tables.py file. My way will be posted on other topic ("sen2cor fatal error with DEM "). I prepare a little guide how to do that

Regards all
Wojtek from Poland

1 Like

Dear Gabriele,

I come back to your classification problem. There are really a lot of misclassification issues with the Sen2Cor-version you are using. There is an update of scene classification module on the way with the next update of Sen2Cor. We are actually testing it in the S2-MPC and results are much better. However, don’t expect that scene classification is perfect.The problem that some bright roofs are classified as clouds is difficult to avoid. It wouldn’t be better when some thrsholds are changed and as a result some clouds are classified as roofs.
I have no information when the Sen2Cor update will be released to public.

Regards
Bringfried

2 Likes

Dear Bringfried,
thank you so much for your message. I am looking forward to the next release.
Kind regards
Gabriele