<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>For future doc readers: <a class="moz-txt-link-freetext" href="https://github.com/OSGeo/gdal/pull/9211">https://github.com/OSGeo/gdal/pull/9211</a><br>
    </p>
    <div class="moz-cite-prefix">Le 07/02/2024 à 20:45, Even Rouault via
      gdal-dev a écrit :<br>
    </div>
    <blockquote type="cite"
      cite="mid:0a893e59-4d5f-4df6-9264-502f683cd972@spatialys.com">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      Scott,<o:p></o:p>
      <blockquote type="cite"
cite="mid:BN2P110MB14326CAEB5A756C699E4A4FFA545A@BN2P110MB1432.NAMP110.PROD.OUTLOOK.COM">
        <div class="WordSection1">
          <p class="MsoNormal"><o:p> </o:p></p>
          <p class="MsoNormal">I’m trying to create a JPEG2000 file
            using the JP2ECW driver, but I’m getting “WriteBlock() not
            supported…”.  The same code works using the PNM driver.<o:p></o:p></p>
          <p class="MsoNormal"><o:p> </o:p></p>
          <p class="MsoNormal">What am I missing?</p>
        </div>
      </blockquote>
      <p>This comment in the code
        <a class="moz-txt-link-freetext"
href="https://github.com/OSGeo/gdal/blob/0255b1d767bbfc6910d8044e37019f1d1ea5a617/frmts/ecw/ecwcreatecopy.cpp#L1653"
          moz-do-not-send="true">https://github.com/OSGeo/gdal/blob/0255b1d767bbfc6910d8044e37019f1d1ea5a617/frmts/ecw/ecwcreatecopy.cpp#L1653</a>
        which basically says that there's some form of Create() support
        in the JP2ECW driver but you need to write by scanline from top
        to bottom. The PNM, GTiff etc drivers implement full
        random-writing, which is what is required typically for
        gdalwarp. The workaround is either to modify the way you write
        the file (if you use the API), or if you use GDAL tools to write
        to an intermediate format (GeoTIFF) and then gdal_translate to
        JPEG2000 afterwards.<br>
      </p>
      <p>Even</p>
      <span style="white-space: pre-wrap">
</span>
      <pre class="moz-signature" cols="72">-- 
<a class="moz-txt-link-freetext" href="http://www.spatialys.com"
      moz-do-not-send="true">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
      <br>
      <fieldset class="moz-mime-attachment-header"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
gdal-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/gdal-dev">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
  </body>
</html>