Hello,
Geotiff written by OTB included a metadata info which is TileHintX and TileHintY: I did not find anything explaining what are these metadata (also search on gdal).
Metadata:
AREA_OR_POINT=Area
DataType=4
METADATATYPE=OTB
OTB_VERSION=8.0.1
TileHintX=*
TileHintY=1
The main problerm is that when using gdalwarp on two chuncks written by OTB, it leads to strange value (e.g. TileHintX=*
) and then it is not possible anymore to process the geotiff using BandMath for instance. We need to rewritte the metadata using gdal_edit.py
to continue the processing.
Also, when using gdal_merge, these metadata (TileHintX) is not propagated. I am wondering to what kind of information these values are related, and if it is possible to tell otb to not write these.
I found in the OTB source code (otb/Modules/Core/Common/include/otbImageRegionAdaptativeSplitter.h
) that TileHintX is related to some data compression (jpg2000).
For my situation, the problem can be solved by using -cvmd
option in gdalwarp
to manage metadata conflict between merged data set and prevent having *
as metadata.
However, OTB does not seem to be able to open geotiff with metadata TileHintX=*
, while gdal is.
Hello @MathieuF ,
Do you know which OTB application has written this metadata? it really doesn’t look regular.
AFAIK tile hints are just convenience processing metadata (e.g. hinting that JP2000 tile is NxN).
Hi @remi.cresson
Sorry if I was not clear: the*
in ThileHintX=*
was written by gdalwarp
. It is the default behavior when conflictig metadata.
The ThileHintX
metadata is written by several otb app (ImageClassifier
and BandMath
) with python wrapper.
With iota2 (iota2-project / iota2 · GitLab) tile chuncks are processed in parallel: for some processing, we use otb app as final task, and use internal otb writter to save the chuncks : in that case we have the TileHintX
metadata, and then when merging gdalwarp
leads to *
issue. In other case, rasterio is used, and we don’t have TileHintX
metadata, and thus no problem with gdalwarp
.
For now, the problem is solved by specifiying option in gdalwarp
.
But more generally, OTB does not seem to be able to open geotiff with metadata TileHintX=*
. (for OTB version 8.0.1).
I hope it is more clear now.
1 Like