Geographic projection missing in output

@ Rea

I suppose it’s the same problem as described here: Geographic projection missing in output . You can try by checking if the jp2 driver (JP2OpenJPEG) is missing in the output of gdalinfo --formats

@nmatton s approach isn’t much different from gdalcopyproj.py (using gdal.Open() ) so it’s also not working in this case because the driver is missing.

I suggest uninstalling everything (Python, Anaconda …) and reinstalling sen2cor 2.0.6 which does not remove the needed driver.

@unnic
Thanks for your answer.

I installed Anaconda on Ubuntu 16.04 and then manually i installed osgeo gdal package 1.11.2. I checked the installations and all packages respond correctly. Also jp2 driver is supported by GDAL as you can see in the image bellow. But still script is not running it stucks on progress 0.0%…

I don’t know what else to do :tired_face:

sry, I can’t speak for nmattons script, it did not work for me but gdalcopyproj.py does.

1 Like

@nmatton
So I managed to reinstall GDAL with a driver for jp2 files.
running gdalinfo filename.jp2 from the command line returns the expected output but in python

import gdal
data=gdal.Open(filename)

does not return anything.

I assume python is not directing to the right GDAL installation Is there a way to set the installation path of gdal within python?

1 Like

Hi,

I was in the belief that the most recent version of sen2cor (2.3.0) fixed the problem with missing geo reference in the L2A output. Anyhow, for me the problem still occurs … the only thing new is the output of *geo.jp2 files, which I can’t seem to open or use.

Am I missing something obvious or can someone shed some light on this for me?

Much appreciated,

Val

Hey Val,

i just processed a recent acquisition with sen2cor 2.3.0. The resulting .jp2 files are projected correctly.
Check if L2A_process -h indicates that the correct version is used; e.g.: Sentinel-2 Level 2A Prototype Processor (Sen2Cor). Version: 2.3.0,

Hi unnic,

thanks for the answer.

I just checked again, and I’m running definitely version 2.3.0.

Sentinel-2 Level 2A Prototype Processor (Sen2Cor). Version: 2.3.0, created:
2016.11.18, supporting Level-1C product version: 14.

That’s what’s confusing me … also the *geo.jp2 files. Are these supposed to be there or maybe a sign of an unfinished process?

So your sen2cor output .jp2 files do open but are simply unprojected (like it was with sen2cor <2.3) ? Any error messages?

Precisely … with the only difference of having additionally files like

S2A_USER_MSI_L2A_TL_MTI__20160709T114209_A005466_T36PWT_B02_10m_geo.jp2

as well.

No error messages during the processing, the only thing I’ve noticed is that sen2cor ocassionally “pauses” until I hit the return button … which I tried to sort out here:

I can check if I get the same result for your granule.
Did you try reinstalling sen2cor?

Doesn’t seem to be a Granule issue … i processed somewhat 30 Gs and the issue is the same in all of them.

I guess re-installing is the next logical step. I just wanted to make sure if I’m missing something here … Thanks for your efforts!

Much appreciated

Well well well … reinstalling sen2cor actually did the trick. I feel like I’m back in the 90s, when the only solution on hand was giving the ol’ TV a proper smack.

Anyways, thanks for the support @unnic

Hi,
I read your discussion and I found many similarities with my issue. After the latest update of SNAP, I can’t obtain georeferenced products if I run sen2cor. I tried reinstalling the plugin but I still have this problem.

Could you suggest me a solution?
Thanks in advance!

Sorry, I can’t say more than make sure you’re running the most recent version of sen2cor (2.3.0) and if so, uninstall and re-install it following the instructions.

This did the trick for me.

Best

Hi Val,
yes, I have the latest versions of both SNAP and sen2cor. As I wrote, it worked correctly until the latest update. I already tried with the re-installation, but unfortunately it doesn’t do the trick.

Anyway, thank you! I’ll try some batch processings.

Yeah sorry, sometimes the works of sen2cor can be mysterious.

Check if you’re running the latest version of Anaconda … maybe that could help

Can you check which glymur version is installed in your anaconda? It is mandatory to have glymur 0.8.6. If you had before an older version of sen2cor installed, then there could be an issue with glymur which causes the …_geo.jp2 files.

To check which version you have installed:
conda list glymur

If glymur 0.8.4 or older is installed:
conda remove --yes glymur

If glymur 0.8.6 is already installed:
pip uninstall glymur

afterward install glymur again:
pip install --trusted-host pypi.python.org glymur==0.8.6

Cheers,
Andreas

Hi Andreas,

thanks for the suggestion. I checked and I have glymur 0.8.6. Everything is updated, I really don’t understand where is the problem.

Ok, then I can not understand the error either.

Maybe @umwilm can help?

hi m.anelli, can you give me your operating system and which version of SNAP you installed, I’ll try to trace down your problem. Is it true that sen2cor 2.3.0 worked for you before doing the SNAP upgrade?