Uses of the -elev.dem argument for otbcli_OrthoRectification command

Hi,
I am new for OTB, and I have a question down below:

Context

What am trying to do is to compare the use of otbcli_OrthoRectification with and without -elev.dem argument.

Configuration setup

My system: Windows10
**Version of the OTB : 7.3.0
**I installed the OTB with the binaries

Description of my issue

Data used is one scene of SPOT5 image(one_scene_spot5.tif), and ASTER GDEM data downloaded from https://earthdata.nasa.gov/ and put under .\DEM_data. And I the DEM data overlaps with the SPOT5 image being processed.
Now with DEM setting:
otbcli_OrthoRectification -io.in one_scene_spot5.tif -io.out ortho_with_dem.tif -elev.dem .\DEM_data

And without DEM setting:
otbcli_OrthoRectification -io.in one_scene_spot5.tif -io.out ortho_without_dem.tif

Looking at the output, I found that ortho_with_dem.tif and ortho_without_dem.tif are exactly the same both in size and bitwise, since I did the bitwise comparation between the two using:
otbcli_BandMath -il output_without_dem.tif ortho_with_dem.tif -out difference_image.tif -exp “im1b1 - im2b1”, and didn’t find the change, which, I think is unusual.

Could you please some give me a hint on what have I done wrong in this process? Is there any way for me to track whether DEM data have taken there part in the orthorectification process?

Thank you in advance

Pan

Hi Pan

Can you give the logs with and without the dem please? It would help us to give a clear answer.

For Spot5 we’d recommand using the latest version of OTB , OTB 9.1 which brought back the support of SPOT5 via GDAL.

Best regards

Hi Thibaut,
Thank you for the response. Here you go for the logs and other related info for this issue.



As you can see the ortho_with_dem.tif and ortho_without_dem.tif both have the same file size. And I checked their bit wise difference difference_image.tif which gives “NoData Value”, seems to indicate that the DEM data haven’t taken their duty in my case.

I tried to get more verbous output to track the issue by using “-progress 1” argument, but it didn’t make any difference.

And I tried the same method on OTB-9.0.0, the results are the same.
I don’t know how much changes between OTB-9.0.0 and OTB-9.1. With your suggestion, I’ll have a try.

For the moment, I need to check if I’ve made the improper useage of the command.

Please let me know if other infomation is needed to help with the bug tracking.

Thanks for your time

Pan

Can you try launching your command by prefixing with OTB_LOGGER_LEVEL=DEBUG the call to otbcli_* ?

I don’t recognize the DEM you use, where did you get it ? is it a ASTER DEM from USGS?
if GDAL supports it, it should give you some informations if you do a gdalinfo on your DEM, can you show me the output of gdalinfo on your dem ? maybe this driver of GDAL could open it : USGSDEM -- USGS ASCII DEM (and CDED) — GDAL documentation

OTB 9.1.0 reintroduces the full support of SPOT5 which was not supported in 9.0.0.

Best regards

Hi Thibaut,
I’ve downloaded the OTB9.1.0 and test my case on it now. Maybe because I’m using windows system, the following command could not be recognized:
OTB_LOGGER_LEVEL=DEBUG otbcli_OrthoRectification -io.in one_scene_spot5.tif -io.out ortho_with_dem.tif -elev.dem ./DEM_data

So instead, I created a system environment variable OTB_LOGGER_LEVEL and set it to be DEBUG, then running the following command will give me the more detailed logging output as the attached.
log_without_dem.txt (111.0 KB)
log_with_dem.txt (151.2 KB)

As for the DEM, I downloaded from NASA’s search data website:

Input the search criteria like “ASTER GDEM” I can get the data from which I can choose.

By using gdalinfo command to one of the DEM tiles I can get the output info like the following:

Since you mentioned USGS DEM , I’ll take a try to see if I can use this instead to solve my issue.

Thanks again

Pan

Hi Thibaut,
Do I need to provide more information on the description of the issue?

Since my purpose is to verify the function of some of the key commands such as otbcli_OrthoRectification, otbcli_RefineSensorModel, etc, maybe we can try other ways like: could you tell me where I could find some sample data such as satelite images, reference data, DEM data so that I can use them to make the test?

Thanks and regards

Pan

Hi @Pan_Hongwei

Sorry i had a few time to test, I downloaded an Aster DEM and noticed it is a GeoTIFF file so GDAL should be able to read it.
In the repository of the project there are sample data in the “Data” folder that you can browse. There is also an SRTM folder which contains DEM Data.
The repo is here.

the data that interests you is in DEM folder in srtm_directory.

About windows i’m afraid you cannot use the cmd terminal to execute a command with an environement variable but maybe you can set it before calling the otb command ?

Regards

Thank you so much Thibaut for the informative feedback, I’ll follow up with them to make my test here.

Best Regards

Pan