Geographic projection missing in output

Sorry to hear about that. But it seems to be a gdal issue.
Be sure to have the JP2000 driver installed (look for JP2OpenJPEG (most common) in output of gdalinfo --formats )

1 Like

thanks for the hint. Indeed the JP2000 driver was missing on the machine where sen2cor 2.2.1 was installed.
I removed sen2cor and installed GDAL individually. JPEG2000 driver is there and .jp2 can be read (gdalinfo). Unfortunately installing sen2cor 2.2.1 overwrites the former gdal installation thus removing the driver. I tried to remove the gdal installation from the setup.py file but wasnā€™t successfull.

Any hints are welcome

Dear unnic,
I really appreciate your reply and the time invested in making it work. However, if you donā€™t mine Iā€™ll wait for you and the rest of pros to solve it before tryingā€¦
Thank you!

@unnic

Hi,

Iā€™ve raised it with my colleagues, and it appears that it is a known issue. As to when it is sorted; that I cannot say with any certainty. Sorry.

Iā€™ve asked my colleagues to look at this thread.

Cheers

Jan

Hello @nmatton,

I tried to georefrence L2A images using your script on windows x64 system but script proccesing isnā€™t getting any progress at all. All i see is 0.0% at any product i tried to process.

Any help?

Hello,

i am trying to use nmattonā€™s script @nmatton but the progress always remains at 0.0%, no error appears and nothing happens. I had exactly the same result using the script on windows and linux system. @unnic the script worked in your case? What could be the cause? Maybe i should use a specific version of python and gdal ? Well, i was thinking about doing the projection using ground control points in ArcGis but i think nmattonā€™s code could help me a lot.

@ 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