<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Aryan,</p>
    <p>You likely need to register the drivers with GDALAllRegister():
      <a class="moz-txt-link-freetext" href="https://gdal.org/tutorials/vector_api_tut.html#reading-from-ogr">https://gdal.org/tutorials/vector_api_tut.html#reading-from-ogr</a></p>
    <p>Even<br>
    </p>
    <div class="moz-cite-prefix">Le 19/01/2023 à 13:23, Aryan Landi a
      écrit :<br>
    </div>
    <blockquote type="cite"
      cite="mid:C1D6F458-FDCA-41E3-8728-BC2FAB84A249@trelleborg.com">
      <span class="">Hi all,</span>
      <div class=""><br class="">
      </div>
      <div class="">I am unable to use the GDAL/OGR S57 driver to parse
        s57 charts. According to the official tutorial at <a
href="https://ddec1-0-en-ctp.trendmicro.com:443/wis/clicktime/v1/query?url=https%3a%2f%2fgdal.org%2ftutorials%2fvector%5fapi%5ftut.html&umid=13d2fd67-3eca-462f-840d-c2d3dbebac5c&auth=b6670b9751c5c90ededae23711566d84a7ddb070-2fb38fd794274bb72553fe7321f02a983f2a6600"
          class="" moz-do-not-send="true">https://gdal.org/tutorials/vector_api_tut.html</a>,
        I should be able to do something like:</div>
      <div class=""><br class="">
      </div>
      <div class="">
        <pre class=""><span class="n">GDALDataset</span><span class="w">       </span><span class="o">*</span><span class="n">poDS</span><span class="p">;</span>

<span class="n">poDS</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">GDALDataset</span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="n">GDALOpenEx</span><span class="p">(</span><span class="w"> </span><span class="s">“s57Chart.000"</span><span class="p">,</span><span class="w"> </span><span class="n">GDAL_OF_VECTOR</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="w"> </span><span class="p">);</span></pre>
        <div class=""><br class="">
        </div>
      </div>
      <div class="">However, poDS becomes NULL. On further
        investigation, invoking the gdalinfo command on a file returns </div>
      <div class=""><br class="">
      </div>
      <div class="">
        <div class="">
          <span class="">ERROR 4: `s57Chart.000' not recognized as a
            supported file format.</span></div>
        <div class="">
          <span class="">gdalinfo failed - unable to open
            ’s57Chart.000’.</span></div>
      </div>
      <div class="">
        <span class=""><br class="">
        </span></div>
      <div class="">
        <span class="">If I use the ogrinfo command, the result is
          correct.</span></div>
      <div class="">
        <span class=""><br class="">
        </span></div>
      <div class="">
        <span class="">So it seems that GDALOpenEx is unable to locate
          the correct driver, which is shipped with GDAL.</span></div>
      <div class="">
        <span class=""><br class="">
        </span></div>
      <div class="">
        <span class="">Anyone who knows how to parse a s57 chart using
          GDAL 3.7?</span></div>
      <div class="">
        <span class=""><br class="">
        </span></div>
      <div class="">
        <span class="">Best regards,</span></div>
      <div class="">
        <span class=""><br class="">
        </span></div>
      <div class="">
        <span class="">Aryan Mohammadi Landi.</span></div>
      <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>