<div dir="ltr">> So you would have a XML file that would point <br>> to the beginning of the .jp2 file, then an auxiliary file with the TLM <br>> marker, and then the rest of the .jp2 file, and then you open <br>> /vsisparse/my_patched_jp2.xml . I believe that should work because there <br><div>> are no absolute offsets in JP2 files.</div><div><br></div><div>Thank you for the idea, indeed this works great, the implementation is straightforward, and it doesn't require any change on GDAL/OpenJPEG!</div><div>So let's discard the tlm sidecar idea.<br></div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">Le ven. 13 déc. 2024 à 17:47, Even Rouault <<a href="mailto:even.rouault@spatialys.com">even.rouault@spatialys.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
><br>
> If you are not against the .tlm sidecar idea in GDAL/OpenJPEG, that's <br>
> good enough for me for now, and it might allow further discussions <br>
> with ESA.<br>
<br>
Well, you should tell them I'm actively *against* the sidecar idea to <br>
motivate them doing the proper thing, otherwise they'll have little <br>
incentive to move :-)<br>
<br>
I just said it can be technically done (what can't ?), not that I'm a <br>
big fan of it. That would be purely a openjpeg change.<br>
<br>
Actually, if you only target GDAL, you could do something that requires <br>
no change neither in GDAL or openjpeg, which would be a variation of <br>
rewriting a new .jp2 file with the TLM marker without actually rewriting <br>
them. GDAL has a rather little-known /vsisparse/ virtual file system (Cf <br>
<a href="https://gdal.org/en/stable/user/virtual_file_systems.html#vsisparse-sparse-files" rel="noreferrer" target="_blank">https://gdal.org/en/stable/user/virtual_file_systems.html#vsisparse-sparse-files</a>) <br>
where you can point at a XML file that concatenates portions of various <br>
files into a virtual file. So you would have a XML file that would point <br>
to the beginning of the .jp2 file, then an auxiliary file with the TLM <br>
marker, and then the rest of the .jp2 file, and then you open <br>
/vsisparse/my_patched_jp2.xml . I believe that should work because there <br>
are no absolute offsets in JP2 files.<br>
<br>
-- <br>
<a href="http://www.spatialys.com" rel="noreferrer" target="_blank">http://www.spatialys.com</a><br>
My software is free, but my time generally not.<br>
Butcher of all kinds of standards, open or closed formats. At the end, this is just about bytes.<br>
<br>
</blockquote></div>