<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="">
Hi again,
<div class=""><br class="">
</div>
<div class="">I also do that. Here is the full code snippet that does not work.</div>
<div class=""><br class="">
</div>
<div class="">
<div style="color: rgb(54, 54, 54); background-color: rgb(255, 255, 255); font-family: Menlo, Monaco, "Courier New", monospace; font-size: 16px; line-height: 24px; white-space: pre;" class="">
<div class=""><span style="color: rgb(157, 78, 150);" class="">#include</span><span style="color: rgb(63, 151, 223);" class="">
</span><span style="color: rgb(162, 86, 55);" class="">"ogrsf_frmts.h"</span></div>
<br class="">
<div class=""><span style="color: rgb(63, 151, 223);" class="">int</span> <span style="color: rgb(99, 99, 36);" class="">
main</span>()</div>
<br class="">
<div class="">{</div>
<div class=""><span style="color: rgb(99, 99, 36);" class="">GDALAllRegister</span>();</div>
<br class="">
<div class="">GDALDataset *poDS;</div>
<br class="">
<div class="">poDS = (GDALDataset*) <span style="color: rgb(99, 99, 36);" class="">
GDALOpenEx</span>( <span style="color: rgb(162, 86, 55);" class="">"US5LA26M.000"</span>, GDAL_OF_VECTOR,
<span style="color: rgb(63, 151, 223);" class="">NULL</span>, <span style="color: rgb(63, 151, 223);" class="">
NULL</span>, <span style="color: rgb(63, 151, 223);" class="">NULL</span> );</div>
<div class=""><span style="color: rgb(157, 78, 150);" class="">if</span>( poDS ==
<span style="color: rgb(63, 151, 223);" class="">NULL</span> )</div>
<div class="">{</div>
<div class=""><span style="color: rgb(99, 99, 36);" class="">printf</span>( <span style="color: rgb(162, 86, 55);" class="">
"Open failed.</span><span style="color: rgb(152, 116, 40);" class="">\n</span><span style="color: rgb(162, 86, 55);" class="">"</span> );</div>
<div class=""><span style="color: rgb(99, 99, 36);" class="">exit</span>( <span style="color: rgb(73, 104, 57);" class="">
1</span> );</div>
<div class="">}</div>
<div class="">}</div>
</div>
</div>
<div class="">
<div><br class="">
</div>
<div><br class="">
</div>
<div><br class="">
<blockquote type="cite" class="">
<div class="">Den 19. jan. 2023 kl. 13.23 skrev Aryan Landi <<a href="mailto:aryan.landi@trelleborg.com" class="">aryan.landi@trelleborg.com</a>>:</div>
<br class="Apple-interchange-newline">
<div class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<table style="background-color:#393939; height: 37px;" border="0" cellspacing="0" cellpadding="0" class="">
<tbody class="">
<tr class="">
<td style="vertical-align: middle; font-size:8pt; font-family: 'Segoe UI','Segoe',Tahoma,Helvetica,Arial,sans-serif; font-weight: bold; color: #fff;" class="">
CAUTION: External Mail </td>
</tr>
</tbody>
</table>
<div class=""><span style="caret-color: rgb(0, 0, 0);" class="">Hi all,</span>
<div class="" style="caret-color: rgb(0, 0, 0);"><br class="">
</div>
<div class="" style="caret-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/wis/clicktime/v1/query?url=https%3a%2f%2fgdal.org%2ftutorials%2fvector%5fapi%5ftut.html&umid=0557ffb0-6eb1-4f6b-80d6-1131e1983409&auth=b6670b9751c5c90ededae23711566d84a7ddb070-b06f87e0005818871cbf737adb302076abd31b48" 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);"><br class="">
</div>
<div class="" style="caret-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);">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);"><br class="">
</div>
<div class="" style="caret-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>
</div>
</div>
_______________________________________________<br class="">
gdal-dev mailing list<br class="">
<a href="mailto:gdal-dev@lists.osgeo.org" class="">gdal-dev@lists.osgeo.org</a><br class="">
https://ddec1-0-en-ctp.trendmicro.com:443/wis/clicktime/v1/query?url=https%3a%2f%2flists.osgeo.org%2fmailman%2flistinfo%2fgdal%2ddev&umid=0557ffb0-6eb1-4f6b-80d6-1131e1983409&auth=b6670b9751c5c90ededae23711566d84a7ddb070-22e347d19f280b9bf24a6d423d3574fa65c3ae72<br class="">
</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>