<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">Hi all,</span>
<div class="" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><br class="">
</div>
<div class="" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">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="">https://gdal.org/tutorials/vector_api_tut.html</a>,
 I should be able to do something like:</div>
<div class="" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><br class="">
</div>
<div class="" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">
<pre class="" style="box-sizing: border-box; line-height: 1.5; font-family: "Source Code Pro", "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace; background-size: 12px 12px, 12px 12px, 12px 12px, 12px 12px, 12px 12px, 12px 12px, 12px 12px, 12px 12px; background-color: rgb(248, 248, 248); margin-top: 0px; margin-bottom: 0px; padding: 12px; overflow: auto; color: rgb(51, 51, 51);"><span class="n" style="box-sizing: border-box;">GDALDataset</span><span class="w" style="box-sizing: border-box; color: rgb(187, 187, 187);">       </span><span class="o" style="box-sizing: border-box; font-weight: bold;">*</span><span class="n" style="box-sizing: border-box;">poDS</span><span class="p" style="box-sizing: border-box;">;</span>

<span class="n" style="box-sizing: border-box;">poDS</span><span class="w" style="box-sizing: border-box; color: rgb(187, 187, 187);"> </span><span class="o" style="box-sizing: border-box; font-weight: bold;">=</span><span class="w" style="box-sizing: border-box; color: rgb(187, 187, 187);"> </span><span class="p" style="box-sizing: border-box;">(</span><span class="n" style="box-sizing: border-box;">GDALDataset</span><span class="o" style="box-sizing: border-box; font-weight: bold;">*</span><span class="p" style="box-sizing: border-box;">)</span><span class="w" style="box-sizing: border-box; color: rgb(187, 187, 187);"> </span><span class="n" style="box-sizing: border-box;">GDALOpenEx</span><span class="p" style="box-sizing: border-box;">(</span><span class="w" style="box-sizing: border-box; color: rgb(187, 187, 187);"> </span><span class="s" style="box-sizing: border-box; color: rgb(187, 136, 68);">“s57Chart.000"</span><span class="p" style="box-sizing: border-box;">,</span><span class="w" style="box-sizing: border-box; color: rgb(187, 187, 187);"> </span><span class="n" style="box-sizing: border-box;">GDAL_OF_VECTOR</span><span class="p" style="box-sizing: border-box;">,</span><span class="w" style="box-sizing: border-box; color: rgb(187, 187, 187);"> </span><span class="nb" style="box-sizing: border-box; color: rgb(153, 153, 153);">NULL</span><span class="p" style="box-sizing: border-box;">,</span><span class="w" style="box-sizing: border-box; color: rgb(187, 187, 187);"> </span><span class="nb" style="box-sizing: border-box; color: rgb(153, 153, 153);">NULL</span><span class="p" style="box-sizing: border-box;">,</span><span class="w" style="box-sizing: border-box; color: rgb(187, 187, 187);"> </span><span class="nb" style="box-sizing: border-box; color: rgb(153, 153, 153);">NULL</span><span class="w" style="box-sizing: border-box; color: rgb(187, 187, 187);"> </span><span class="p" style="box-sizing: border-box;">);</span></pre>
<div class=""><br class="">
</div>
</div>
<div class="" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">However, poDS becomes NULL. On further investigation, invoking the gdalinfo command on a file returns </div>
<div class="" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><br class="">
</div>
<div class="" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">
<div class="" style="margin: 0px; font-stretch: normal; font-size: 18px; line-height: normal; font-family: Menlo; color: rgb(64, 64, 64);">
<span class="" style="font-variant-ligatures: no-common-ligatures;">ERROR 4: `s57Chart.000' not recognized as a supported file format.</span></div>
<div class="" style="margin: 0px; font-stretch: normal; font-size: 18px; line-height: normal; font-family: Menlo; color: rgb(64, 64, 64);">
<span class="" style="font-variant-ligatures: no-common-ligatures;">gdalinfo failed - unable to open ’s57Chart.000’.</span></div>
</div>
<div class="" style="margin: 0px; font-stretch: normal; font-size: 18px; line-height: normal; font-family: Menlo; color: rgb(64, 64, 64);">
<span class="" style="font-variant-ligatures: no-common-ligatures;"><br class="">
</span></div>
<div class="" style="margin: 0px; font-stretch: normal; line-height: normal; color: rgb(64, 64, 64);">
<span class="" style="font-variant-ligatures: no-common-ligatures;">If I use the ogrinfo command, the result is correct.</span></div>
<div class="" style="margin: 0px; font-stretch: normal; line-height: normal; color: rgb(64, 64, 64);">
<span class="" style="font-variant-ligatures: no-common-ligatures;"><br class="">
</span></div>
<div class="" style="margin: 0px; font-stretch: normal; line-height: normal; color: rgb(64, 64, 64);">
<span class="" style="font-variant-ligatures: no-common-ligatures;">So it seems that GDALOpenEx is unable to locate the correct driver, which is shipped with GDAL.</span></div>
<div class="" style="margin: 0px; font-stretch: normal; line-height: normal; color: rgb(64, 64, 64);">
<span class="" style="font-variant-ligatures: no-common-ligatures;"><br class="">
</span></div>
<div class="" style="margin: 0px; font-stretch: normal; line-height: normal; color: rgb(64, 64, 64);">
<span class="" style="font-variant-ligatures: no-common-ligatures;">Anyone who knows how to parse a s57 chart using GDAL 3.7?</span></div>
<div class="" style="margin: 0px; font-stretch: normal; line-height: normal; color: rgb(64, 64, 64);">
<span class="" style="font-variant-ligatures: no-common-ligatures;"><br class="">
</span></div>
<div class="" style="margin: 0px; font-stretch: normal; line-height: normal; color: rgb(64, 64, 64);">
<span class="" style="font-variant-ligatures: no-common-ligatures;">Best regards,</span></div>
<div class="" style="margin: 0px; font-stretch: normal; line-height: normal; color: rgb(64, 64, 64);">
<span class="" style="font-variant-ligatures: no-common-ligatures;"><br class="">
</span></div>
<div class="" style="margin: 0px; font-stretch: normal; line-height: normal; color: rgb(64, 64, 64);">
<span class="" style="font-variant-ligatures: no-common-ligatures;">Aryan Mohammadi Landi.</span></div>
</body>
</html>