Sentinel 2 atmospheric correction - reprojection issue

78 views
Skip to first unread message

dwal...@gmail.com

unread,
Jul 20, 2018, 9:08:44 AM7/20/18
to RSGISLib Support
HI,

I'm trying to atmospherically correct Sentinel 2 images for the Republic of Ireland, extracting the band datasets and converting them to GTiff using gdal_translate but the output is not re-projected right in QGIS. I have tried without specifying -outwkt and then using gdal_translate -a_srs to assign the EPSG:2157 projection but with no success. I have also tried specifying -outwkt and using the projection found at https://epsg.io/2157 and at http://spatialreference.org/ref/epsg/2157/ but with the same results. I have tried all of the above with a different image too but no success. After doing a gdalinfo on the image I noticed that everything is as it should be except that there was no line with the details for the origin. The output image is atmospherically corrected but the image is not re-projected correctly. Any ideas as to what I'm doing wrong?

I'm using ubuntu 18.04, gdal version 2.2.1, QGIS 3 and arcsi is installed through miniconda.

This is my code:

arcsi.py -s sen2 -p DOSAOTSGL SREF SHARP -o ./OutputsSen2_final/ --stats --format KEA --tmpath ./tmp --dem ~/path_to_my_dem.tif --projabbv 2157 --outwkt 2157.prj -i Sentinel2_image/MTD_MSIL1C.xml


Thanks

Dylan


Daniel Clewley

unread,
Jul 23, 2018, 7:53:03 AM7/23/18
to dwal...@gmail.com, RSGISLib Support
Hi Dylan,

I’m not sure on this. Can you confirm, are you using the same version of GDAL which you installed with ARCSI to convert from KEA? If you are using a version of GDAL without support for the KEA file format it won’t read all the projection information from the HDF5 file.

Thanks,

Dan

--
You received this message because you are subscribed to the Google Groups "RSGISLib Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rsgislib-suppo...@googlegroups.com.
To post to this group, send email to rsgislib...@googlegroups.com.
Visit this group at https://groups.google.com/group/rsgislib-support.
For more options, visit https://groups.google.com/d/optout.

Daniel Clewley

unread,
Aug 1, 2018, 4:31:04 PM8/1/18
to Dylan Walshe, RSGISLib Support
Hi Dylan,

Glad you were able to resolve your issue.

Dan

On 31 Jul 2018, at 10:57, Dylan Walshe <dwal...@gmail.com> wrote:

Hi Dan,

Apologies for the delayed response. Yes, you are absolutely right, I was not using the same version, this has fixed the problem, thank you very much.

Kind regards,

Dylan

On Mon, Jul 23, 2018 at 12:52 PM, Daniel Clewley <daniel....@gmail.com> wrote:
Hi Dylan,

I’m not sure on this. Can you confirm, are you using the same version of GDAL which you installed with ARCSI to convert from KEA? If you are using a version of GDAL without support for the KEA file format it won’t read all the projection information from the HDF5 file.

Thanks,

Dan


On 20 Jul 2018, at 14:08, dwal...@gmail.com wrote:

HI,

I'm trying to atmospherically correct Sentinel 2 images for the Republic of Ireland, extracting the band datasets and converting them to GTiff using gdal_translate but the output is not re-projected right in QGIS. I have tried without specifying -outwkt and then using gdal_translate -a_srs to assign the EPSG:2157 projection but with no success. I have also tried specifying -outwkt and using the projection found at https://epsg.io/2157 and at http://spatialreference.org/ref/epsg/2157/ but with the same results. I have tried all of the above with a different image too but no success. After doing a gdalinfo on the image I noticed that everything is as it should be except that there was no line with the details for the origin. The output image is atmospherically corrected but the image is not re-projected correctly. Any ideas as to what I'm doing wrong?

I'm using ubuntu 18.04, gdal version 2.2.1, QGIS 3 and arcsi is installed through miniconda.

This is my code:

arcsi.py -s sen2 -p DOSAOTSGL SREF SHARP -o ./OutputsSen2_final/ --stats --format KEA --tmpath ./tmp --dem ~/path_to_my_dem.tif --projabbv 2157 --outwkt 2157.prj -i Sentinel2_image/MTD_MSIL1C.xml


Thanks

Dylan



--
You received this message because you are subscribed to the Google Groups "RSGISLib Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rsgislib-support+unsubscribe@googlegroups.com.
To post to this group, send email to rsgislib-support@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages