OTB with the command prompt : lost georeferencing

Configuration setup

My system: *Windows10
Version of the OTB: version 8.0.1 – 27 avril 2022
I installed the OTB with: in https://www.orfeo-toolbox.org/)

I have ArcGis and Python 3.9

Description of my issue

Hello, my name is Natacha, I am doing a tutorial for my students with OTB like every year and I would like to do every step with Monteverdi and with the command prompt. Each image loses its georeferencing. For example, the first step with my Sentinel Satellite image is otbcli_Superimpose –inr …B8.jp2 -inm …B12.jp2 -out …B12_resamp.tif uint16
If I do this step with Monteverdi, the image keeps its georeferencing and it’s OK but with command prompt, no, the process is ok but no georeferencing, Why ?
I have no message error. Thank you.

Dear @Natacha,

Thank you for using OTB and Monteverdi!

The issue you are facing has been filed. We have been working on a fix, that will be available in OTB 8.1 expected by the end of the month.

If you can’t wait until then, you can use the writerpctags extended filename as proposed there:

Use ?&writerpctags=true at the end of the output file path.

otbcli_Superimpose -inr reference.tif -inm measure.tif -out "output.tif?&writerpctags=true"

Regards.
Julien :slight_smile:

Thank you Julien for your response but do you mean ? :

C:\Program Files\OTB-8.0.1-Win64\bin>otbcli_Superimpose -inr D:\TD_OTB\images\1_selection_bandes\220617_T30TXQ\T30TXQ_20220617T105629_B08_10m.jp2 -inm D:\TD_OTB\images\1_selection_bandes\220617_T30TXQ\T30TXQ_20220617T105629_B12_20m.jp2 -out D:\TD_OTB\images\1_selection_bandes\220617_T30TXQ\T30TXQ_20220617_B12_resampltest.tif?&writerpctags=true uint16

because I have tried and I have proj :“inconnu”

The command prompt :

C:\Program Files\OTB-8.0.1-Win64\bin>otbcli_Superimpose -inr D:\TD_OTB\images\1_selection_bandes\220617_T30TXQ\T30TXQ_20220617T105629_B08_10m.jp2 -inm D:\TD_OTB\images\1_selection_bandes\220617_T30TXQ\T30TXQ_20220617T105629_B12_20m.jp2 -out D:\TD_OTB\images\1_selection_bandes\220617_T30TXQ\T30TXQ_20220617_B12_resampltest.tif?&writerpctags=true
'C:\Program' n’est pas reconnu en tant que commande interne
ou externe, un programme exécutable ou un fichier de commandes.
ERROR 1: PROJ: proj_create_from_database: Cannot find proj.db
ERROR 1: PROJ: proj_create_from_database: Cannot find proj.db
ERROR 1: PROJ: proj_create_from_database: Cannot find proj.db
2022-08-10 08:45:08 (INFO): Loading metadata from official product
ERROR 1: PROJ: proj_create_from_database: Cannot find proj.db
ERROR 1: PROJ: proj_create_from_database: Cannot find proj.db
ERROR 1: PROJ: proj_create_from_database: Cannot find proj.db
2022-08-10 08:45:08 (INFO): Loading metadata from official product
2022-08-10 08:45:08 (INFO) Superimpose: Default RAM limit for OTB is 256 MB
2022-08-10 08:45:08 (INFO) Superimpose: GDAL maximum cache size is 813 MB
2022-08-10 08:45:08 (INFO) Superimpose: OTB will use at most 8 threads
2022-08-10 08:45:08 (INFO) Superimpose: Elevation management: setting default height above ellipsoid to 0 meters
2022-08-10 08:45:08 (WARNING): The SensorTransform factory could not find a compatible Sensor Transform
2022-08-10 08:45:08 (WARNING): The SensorTransform factory could not find a compatible Sensor Transform
2022-08-10 08:45:08 (INFO): Estimated memory for full processing: 1114.07MB (avail.: 256 MB), optimal image partitioning: 5 blocks
2022-08-10 08:45:08 (INFO): File D:\TD_OTB\images\1_selection_bandes\220617_T30TXQ\T30TXQ_20220617_B12_resampltest.tif will be written in 9 blocks of 5120x4480 pixels
Writing D:\TD_OTB\images\1_selection_bandes\220617_T30TXQ\T30TXQ_20220617_B12_resampltest.tif?...: 100% [**************************************************] (19s)
'writerpctags' n’est pas reconnu en tant que commande interne
ou externe, un programme exécutable ou un fichier de commandes.

It’s not good, still lost georeferencing

You should use quotes " around the output path:

C:\Program Files\OTB-8.0.1-Win64\bin>otbcli_Superimpose -inr D:\TD_OTB\images\1_selection_bandes\220617_T30TXQ\T30TXQ_20220617T105629_B08_10m.jp2 -inm D:\TD_OTB\images\1_selection_bandes\220617_T30TXQ\T30TXQ_20220617T105629_B12_20m.jp2 -out "D:\TD_OTB\images\1_selection_bandes\220617_T30TXQ\T30TXQ_20220617_B12_resampltest.tif?&writerpctags=true" uint16

I have also tested with “” but the resulting image is stil not gereferencing. With Monteverdi, I have Proj “Inconnu” instead of “32630”. I have tried to open with ArcGis and I have “Unknow Coordinate System” in Spatial Reference

I think you will have to wait for the release of OTB 8.1. The release candidate should arrive by the end of the week.

ok, I will only do the TD with Monteverdi for the moment. Thank you

The development version contains the corrections you need. You can download it here.

The release candidate is out now. You can use it to Superimpose your images. You still need to use the extended filename writerpctag.