<div dir="ltr"><div dir="ltr">Dear all,<div>I did not want to file the following question as an issue, as I am not sure if I am just not missing anything in configuration, so putting it as a question here:</div><div><br></div><div><div>I am trying to change the geotransform of a JPEG2000 file and then save back the content via Python bindings on Ubuntu 20.04 - gdal 3.2.0 (based on osgeo/gdal:ubuntu-full-latest - <span style="color:rgb(111,119,124);font-family:"Ubuntu Mono",consolas,monaco,monospace;font-size:12px;white-space:nowrap">sha256:6a82b53f12945a3ba8ac168a7488d1cf5ecb351020f67c88abc6691275a70b68</span>)</div><div><br></div><div>Following code:</div><div>ds = gdal.Open(input_filename, gdal.GA_Update)<br></div><div>ulx, xres, xskew, uly, yskew, yres = ds.GetGeoTransform()<br></div><div>... do something with geotransform</div><div>ds.SetGeoTransform(geotransform_new)<br></div><div>del ds</div><div>Throws me into this exception <span style="box-sizing:border-box;color:rgb(3,47,98);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;white-space:pre-wrap;background-color:rgb(255,251,221)">"</span><span style="color:rgb(3,47,98);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;white-space:pre-wrap;background-color:rgb(255,251,221)">USE_SRC_CODESTREAM=YES specified, but no codestream found</span><span style="box-sizing:border-box;color:rgb(3,47,98);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;white-space:pre-wrap;background-color:rgb(255,251,221)">"</span>: <a href="https://github.com/OSGeo/gdal/blob/master/gdal/frmts/openjpeg/openjpegdataset.cpp#L3718-L3722" target="_blank">https://github.com/OSGeo/gdal/blob/master/gdal/frmts/openjpeg/openjpegdataset.cpp#L3718-L3722</a></div><div><br></div><div><div>How does this creationOption by default being False according to <a href="https://gdal.org/drivers/raster/jp2openjpeg.html#creation-options" target="_blank">https://gdal.org/drivers/raster/jp2openjpeg.html#creation-options</a> come into play while opening and saving an already existing file?</div><div>Using a workaround by saving the ds to a .vrt by gdal.Warp('output.vrt',ds) works fine for me. I was just curious if I can disable the USE_SRC_CODESTREAM after opening the JPEG2000 anyhow?</div><div><br></div><div>Thank you,</div><div>Best regards,</div><font color="#888888"><br></font></div></div><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><font color="#000000"><font face="Verdana, sans-serif"><span style="font-size:13.3333px"><b>Lubomir Bucek</b></span></font><br></font><p class="MsoNormal"><font color="#000000"><span lang="DE-AT" style="font-size:10pt;font-family:Verdana,sans-serif">Geospatial IT Engineer</span><u></u></font></p><p class="MsoNormal"><font color="#000000"><span lang="EN-GB" style="font-size:10pt;font-family:Verdana,sans-serif">EOX IT Services GmbH</span><span lang="EN-GB" style="font-size:10pt;font-family:Verdana,sans-serif"> <br></span><span lang="EN-GB" style="font-size:10pt;font-family:Verdana,sans-serif">1090 Vienna, Thurngasse 8/4, Austria</span><span lang="EN-GB" style="font-size:10pt;font-family:Verdana,sans-serif"> <br></span><span lang="EN-GB" style="font-size:10pt;font-family:Verdana,sans-serif">T +43 (0)</span><span lang="EN-GB" style="font-size:10pt;font-family:Verdana,sans-serif"> 660</span><span lang="EN-GB" style="font-size:10pt;font-family:Verdana,sans-serif"> 369 7514, </span><span lang="DE-AT" style="font-size:10pt;font-family:Verdana,sans-serif"><span lang="EN-GB"><a href="mailto:gerhard.triebnig@eox.at" target="_blank">lubomir.bucek@eox.at</a></span></span></font></p></div></div></div></div></div></div>