# OTB with the command prompt : lost georeferencing

**URL:** <https://forum.orfeo-toolbox.org/t/otb-with-the-command-prompt-lost-georeferencing/1426>\
**Category:** OTB Usage\
**Created:** [August 10, 2022, 12:07am UTC](https://forum.orfeo-toolbox.org/t/otb-with-the-command-prompt-lost-georeferencing/1426 "2022-08-10T00:07:10Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Natacha](https://forum.orfeo-toolbox.org/user_avatar/forum.orfeo-toolbox.org/natacha/32/617_2.png) [@Natacha](https://forum.orfeo-toolbox.org/u/Natacha)\
**Post date:** [August 10, 2022, 12:07am UTC](https://forum.orfeo-toolbox.org/t/otb-with-the-command-prompt-lost-georeferencing/1426/1 "2022-08-10T00:07:11Z")

</div>

### 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/](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.

---

<div class="post-metadata">

**Author:** ![julienosman](https://forum.orfeo-toolbox.org/user_avatar/forum.orfeo-toolbox.org/julienosman/32/1492_2.png) [@julienosman](https://forum.orfeo-toolbox.org/u/julienosman)\
**Post date:** [August 10, 2022, 5:27am UTC](https://forum.orfeo-toolbox.org/t/otb-with-the-command-prompt-lost-georeferencing/1426/2 "2022-08-10T05:27:35Z")

</div>

Dear @Natacha,

Thank you for using OTB and Monteverdi!

The issue you are facing [has been filed](https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/2295). We have been working on [a fix](https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/merge_requests/920), 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](https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/2295#note_101663):

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

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

```

Regards.  
Julien 🙂

---

<div class="post-metadata">

**Author:** ![Natacha](https://forum.orfeo-toolbox.org/user_avatar/forum.orfeo-toolbox.org/natacha/32/617_2.png) [@Natacha](https://forum.orfeo-toolbox.org/u/Natacha)\
**Post date:** [August 10, 2022, 6:47am UTC](https://forum.orfeo-toolbox.org/t/otb-with-the-command-prompt-lost-georeferencing/1426/3 "2022-08-10T06:47:44Z")

</div>

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 :

```auto
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

---

<div class="post-metadata">

**Author:** ![julienosman](https://forum.orfeo-toolbox.org/user_avatar/forum.orfeo-toolbox.org/julienosman/32/1492_2.png) [@julienosman](https://forum.orfeo-toolbox.org/u/julienosman)\
**Post date:** [August 10, 2022, 7:02am UTC](https://forum.orfeo-toolbox.org/t/otb-with-the-command-prompt-lost-georeferencing/1426/4 "2022-08-10T07:02:28Z")

</div>

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`

---

<div class="post-metadata">

**Author:** ![Natacha](https://forum.orfeo-toolbox.org/user_avatar/forum.orfeo-toolbox.org/natacha/32/617_2.png) [@Natacha](https://forum.orfeo-toolbox.org/u/Natacha)\
**Post date:** [August 10, 2022, 7:52am UTC](https://forum.orfeo-toolbox.org/t/otb-with-the-command-prompt-lost-georeferencing/1426/5 "2022-08-10T07:52:33Z")

</div>

> [@julienosman](#):
>
> 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

---

<div class="post-metadata">

**Author:** ![julienosman](https://forum.orfeo-toolbox.org/user_avatar/forum.orfeo-toolbox.org/julienosman/32/1492_2.png) [@julienosman](https://forum.orfeo-toolbox.org/u/julienosman)\
**Post date:** [August 10, 2022, 8:42am UTC](https://forum.orfeo-toolbox.org/t/otb-with-the-command-prompt-lost-georeferencing/1426/6 "2022-08-10T08:42:58Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Natacha](https://forum.orfeo-toolbox.org/user_avatar/forum.orfeo-toolbox.org/natacha/32/617_2.png) [@Natacha](https://forum.orfeo-toolbox.org/u/Natacha)\
**Post date:** [August 10, 2022, 9:25am UTC](https://forum.orfeo-toolbox.org/t/otb-with-the-command-prompt-lost-georeferencing/1426/7 "2022-08-10T09:25:44Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![julienosman](https://forum.orfeo-toolbox.org/user_avatar/forum.orfeo-toolbox.org/julienosman/32/1492_2.png) [@julienosman](https://forum.orfeo-toolbox.org/u/julienosman)\
**Post date:** [August 10, 2022, 2:43pm UTC](https://forum.orfeo-toolbox.org/t/otb-with-the-command-prompt-lost-georeferencing/1426/8 "2022-08-10T14:43:37Z")

</div>

The development version contains the corrections you need. You can download it [here](https://www.orfeo-toolbox.org/packages/ci/latest/OTB-develop-47c7fd7e-Win64.zip).

---

<div class="post-metadata">

**Author:** ![julienosman](https://forum.orfeo-toolbox.org/user_avatar/forum.orfeo-toolbox.org/julienosman/32/1492_2.png) [@julienosman](https://forum.orfeo-toolbox.org/u/julienosman)\
**Post date:** [August 11, 2022, 12:51pm UTC](https://forum.orfeo-toolbox.org/t/otb-with-the-command-prompt-lost-georeferencing/1426/9 "2022-08-11T12:51:20Z")

</div>

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

> [@OTB 8.1.0 release candidate n°1](https://forum.orfeo-toolbox.org/t/otb-8-1-0-release-candidate-n-1/1427):
>
> Dear OTB community, We are happy to announce that OTB version 8.1.0 rc1 has been released! Ready to use binary packages are available on the package page of the website: [OTB-8.1.0-rc1-Darwin64.run](https://www.orfeo-toolbox.org/packages/OTB-8.1.0-rc1-Darwin64.run) (Mac OS) [OTB-8.1.0-rc1-Linux64.run](https://www.orfeo-toolbox.org/packages/OTB-8.1.0-rc1-Linux64.run) (Linux) [OTB-8.1.0-rc1-Win64.zip](https://www.orfeo-toolbox.org/packages/OTB-8.1.0-rc1-Win64.zip) (Windows 64 bits) It is also possible to checkout the branch with git: git clone https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb.git OTB -b release-8.1 The documentation for OTB 8.1.0 can be found [here](https://www.orfeo-toolbox.org/CookBook-8.1/). This major versi…
