<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p><br>
    </p>
    <p>    I get exactly the same layers in <i>ogrinfo</i> as I do with
      your program both with GDAL 3.3.2 and GDAL 3.4.1 on all of your
      S57 files. <i>s57/1B5X02NE.000</i> has 13 layers.<br>
    </p>
    <p>    Here is the program I used: <a class="moz-txt-link-freetext" href="https://pastebin.com/z99xeQ92">https://pastebin.com/z99xeQ92</a></p>
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 28/01/2022 01:55,
      <a class="moz-txt-link-abbreviated" href="mailto:dthorne@pivotmaritime.com">dthorne@pivotmaritime.com</a> wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:1643331349.224118169@apps.rackspace.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <font size="2" face="arial">
        <p style="margin:0;padding:0;font-family: arial; font-size:
          10pt; overflow-wrap: break-word;">The S57 file we used to test
          with each language and it is read correctly in C# &
          python, our c++ project is the problem. The S57 is the one
          generated in "\gdal-3.4.1\autotest\ogr\data\s57" when we built
          gdal. But <a
href="https://drive.google.com/file/d/1AGCHEQMWHvs6IJgDW45KJvK6gm-r_cpH/view?usp=sharing"
            moz-do-not-send="true">here is a link</a> to that s57
          folder.<br>
          <br>
          The specific s57 file we used was "1B5X02NE.000" which in
          reference to the first image I linked should have 13 layers. <br>
          Thanks in advance for the help! <br>
          <br>
          Daniel<br>
          <br>
          <br>
        </p>
        <p style="margin:0;padding:0;font-family: arial; font-size:
          10pt; overflow-wrap: break-word;">-----Original Message-----<br>
          From: "kusala nine" <a class="moz-txt-link-rfc2396E" href="mailto:kusala9@googlemail.com"><kusala9@googlemail.com></a><br>
          Sent: Friday, January 28, 2022 7:04am<br>
          To: "Momtchil Momtchev" <a class="moz-txt-link-rfc2396E" href="mailto:momtchil@momtchev.com"><momtchil@momtchev.com></a><br>
          Cc: <a class="moz-txt-link-abbreviated" href="mailto:dthorne@pivotmaritime.com">dthorne@pivotmaritime.com</a>, <a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
          Subject: Re: [gdal-dev] GDAL/OGR 3.4.1 not reading S57
          correctly<br>
          <br>
        </p>
        <div id="SafeStyles1643331021">I’m an S57 expert. Send me the
          data - I’ll take a look, there’s a lot of leeway with S57 and
          sometimes it trips up GDAL. I had issues with AML data before
          which is similar…
          <div>Jonathan. <br>
            <br>
            <div dir="ltr">Sent from my iPhone</div>
            <div dir="ltr"><br>
              <blockquote>On 27 Jan 2022, at 10:44, Momtchil Momtchev
                <a class="moz-txt-link-rfc2396E" href="mailto:momtchil@momtchev.com"><momtchil@momtchev.com></a> wrote:<br>
                <br>
              </blockquote>
            </div>
            <blockquote>
              <div dir="ltr">
                <p style="margin:0;padding:0;font-family: arial;
                  font-size: 10pt; overflow-wrap: break-word;"> </p>
                <p style="margin:0;padding:0;font-family: arial;
                  font-size: 10pt; overflow-wrap: break-word;">    Your
                  code looks OK, can you send me the file too?</p>
                <p style="margin:0;padding:0;font-family: arial;
                  font-size: 10pt; overflow-wrap: break-word;"> </p>
                <div class="moz-cite-prefix">On 27/01/2022 03:34, <a
                    class="moz-txt-link-abbreviated
                    moz-txt-link-freetext"
                    href="mailto:dthorne@pivotmaritime.com"
                    moz-do-not-send="true">dthorne@pivotmaritime.com</a>
                  wrote:</div>
                <blockquote>
                  <p style="margin:0;padding:0;margin: 0; padding: 0;
                    font-family: arial; font-size: 10pt; overflow-wrap:
                    break-word;">Here is the C++ code we have written to
                    read the test s57 file. <br>
                    <a class="moz-txt-link-freetext"
                      href="https://pastebin.com/seXrkgmB"
                      moz-do-not-send="true">https://pastebin.com/seXrkgmB</a><br>
                     <br>
                    We feel that it is some setup stuff we have missed
                    but can't find any clear information. For example we
                    hadn't seen GDAL_DATA environment variables
                    mentioned in any of the documentation we've tried
                    following until Even mentioned it. Are there any
                    other setup stuff we need to do? <a
                      href="https://pastebin.com/seXrkgmB"
                      moz-do-not-send="true"><br>
                    </a><br>
                    <br>
                  </p>
                  <p style="margin:0;padding:0;margin: 0; padding: 0;
                    font-family: arial; font-size: 10pt; overflow-wrap:
                    break-word;">-----Original Message-----<br>
                    From: "Momtchil Momtchev" <a
                      class="moz-txt-link-rfc2396E"
                      href="mailto:momtchil@momtchev.com"
                      moz-do-not-send="true"><momtchil@momtchev.com></a><br>
                    Sent: Wednesday, January 26, 2022 9:21pm<br>
                    To: <a class="moz-txt-link-abbreviated
                      moz-txt-link-freetext"
                      href="mailto:dthorne@pivotmaritime.com"
                      moz-do-not-send="true">dthorne@pivotmaritime.com</a>,
                    <a class="moz-txt-link-abbreviated
                      moz-txt-link-freetext"
                      href="mailto:gdal-dev@lists.osgeo.org"
                      moz-do-not-send="true">gdal-dev@lists.osgeo.org</a><br>
                    Subject: Re: [gdal-dev] GDAL/OGR 3.4.1 not reading
                    S57 correctly<br>
                    <br>
                  </p>
                  <div id="SafeStyles1643250155">
                    <p style="margin:0;padding:0;margin: 0; padding: 0;
                      font-family: arial; font-size: 10pt;
                      overflow-wrap: break-word;"> </p>
                    <p style="margin:0;padding:0;margin: 0; padding: 0;
                      font-family: arial; font-size: 10pt;
                      overflow-wrap: break-word;">Can you post your C++
                      code? Generally, you have more chances of getting
                      an answer for this type of question on <a
                        class="moz-txt-link-freetext"
                        href="https://gis.stackexchange.com/"
                        moz-do-not-send="true">https://gis.stackexchange.com/</a></p>
                    <p style="margin:0;padding:0;margin: 0; padding: 0;
                      font-family: arial; font-size: 10pt;
                      overflow-wrap: break-word;"> </p>
                    <div class="moz-cite-prefix">On 24/01/2022 06:36, <a
                        class="moz-txt-link-abbreviated
                        moz-txt-link-freetext"
                        href="mailto:dthorne@pivotmaritime.com"
                        moz-do-not-send="true">dthorne@pivotmaritime.com</a>
                      wrote:</div>
                    <blockquote>
                      <p style="margin:0;padding:0;margin: 0; padding:
                        0; font-family: arial; font-size: 10pt;
                        overflow-wrap: break-word;"><span style="color:
                          #000000; font-family: arial; font-size:
                          13.3333px; font-style: normal;
                          font-variant-ligatures: normal;
                          font-variant-caps: normal; font-weight: 400;
                          letter-spacing: normal; orphans: 2;
                          text-align: start; text-indent: 0px;
                          text-transform: none; white-space: normal;
                          widows: 2; word-spacing: 0px;
                          -webkit-text-stroke-width: 0px;
                          background-color: #ffffff;
                          text-decoration-thickness: initial;
                          text-decoration-style: initial;
                          text-decoration-color: initial; display:
                          inline !important; float: none;">Hi, </span><br
                          style="color: #000000; font-family: arial;
                          font-size: 13.3333px; font-style: normal;
                          font-variant-ligatures: normal;
                          font-variant-caps: normal; font-weight: 400;
                          letter-spacing: normal; orphans: 2;
                          text-align: start; text-indent: 0px;
                          text-transform: none; white-space: normal;
                          widows: 2; word-spacing: 0px;
                          -webkit-text-stroke-width: 0px;
                          background-color: #ffffff;
                          text-decoration-thickness: initial;
                          text-decoration-style: initial;
                          text-decoration-color: initial;">
                        <span style="color: #000000; font-family: arial;
                          font-size: 13.3333px; font-style: normal;
                          font-variant-ligatures: normal;
                          font-variant-caps: normal; font-weight: 400;
                          letter-spacing: normal; orphans: 2;
                          text-align: start; text-indent: 0px;
                          text-transform: none; white-space: normal;
                          widows: 2; word-spacing: 0px;
                          -webkit-text-stroke-width: 0px;
                          background-color: #ffffff;
                          text-decoration-thickness: initial;
                          text-decoration-style: initial;
                          text-decoration-color: initial; display:
                          inline !important; float: none;">So I am
                          trying to get a test C++ project built to read
                          S57 files using the gdal/ogr C++ library. </span><br
                          style="color: #000000; font-family: arial;
                          font-size: 13.3333px; font-style: normal;
                          font-variant-ligatures: normal;
                          font-variant-caps: normal; font-weight: 400;
                          letter-spacing: normal; orphans: 2;
                          text-align: start; text-indent: 0px;
                          text-transform: none; white-space: normal;
                          widows: 2; word-spacing: 0px;
                          -webkit-text-stroke-width: 0px;
                          background-color: #ffffff;
                          text-decoration-thickness: initial;
                          text-decoration-style: initial;
                          text-decoration-color: initial;">
                        <span style="color: #000000; font-family: arial;
                          font-size: 13.3333px; font-style: normal;
                          font-variant-ligatures: normal;
                          font-variant-caps: normal; font-weight: 400;
                          letter-spacing: normal; orphans: 2;
                          text-align: start; text-indent: 0px;
                          text-transform: none; white-space: normal;
                          widows: 2; word-spacing: 0px;
                          -webkit-text-stroke-width: 0px;
                          background-color: #ffffff;
                          text-decoration-thickness: initial;
                          text-decoration-style: initial;
                          text-decoration-color: initial; display:
                          inline !important; float: none;">I have
                          previously used the C# library that is on
                          there NuGet manager which states v2.4.4 and
                          that seems to read the s57 without issues.
                          Also tried python and that seems to read it
                          with no issues. </span><br style="color:
                          #000000; font-family: arial; font-size:
                          13.3333px; font-style: normal;
                          font-variant-ligatures: normal;
                          font-variant-caps: normal; font-weight: 400;
                          letter-spacing: normal; orphans: 2;
                          text-align: start; text-indent: 0px;
                          text-transform: none; white-space: normal;
                          widows: 2; word-spacing: 0px;
                          -webkit-text-stroke-width: 0px;
                          background-color: #ffffff;
                          text-decoration-thickness: initial;
                          text-decoration-style: initial;
                          text-decoration-color: initial;">
                        <br style="color: #000000; font-family: arial;
                          font-size: 13.3333px; font-style: normal;
                          font-variant-ligatures: normal;
                          font-variant-caps: normal; font-weight: 400;
                          letter-spacing: normal; orphans: 2;
                          text-align: start; text-indent: 0px;
                          text-transform: none; white-space: normal;
                          widows: 2; word-spacing: 0px;
                          -webkit-text-stroke-width: 0px;
                          background-color: #ffffff;
                          text-decoration-thickness: initial;
                          text-decoration-style: initial;
                          text-decoration-color: initial;">
                        <span style="color: #000000; font-family: arial;
                          font-size: 13.3333px; font-style: normal;
                          font-variant-ligatures: normal;
                          font-variant-caps: normal; font-weight: 400;
                          letter-spacing: normal; orphans: 2;
                          text-align: start; text-indent: 0px;
                          text-transform: none; white-space: normal;
                          widows: 2; word-spacing: 0px;
                          -webkit-text-stroke-width: 0px;
                          background-color: #ffffff;
                          text-decoration-thickness: initial;
                          text-decoration-style: initial;
                          text-decoration-color: initial; display:
                          inline !important; float: none;">However, I am
                          having a problem with the C++ test project.
                          Having built the C++ library into the .lib and
                          .dll files I have included them into a blank
                          project and implemented the functions to read
                          the s57 file, however it is only reporting 5
                          layers.</span><br style="color: #000000;
                          font-family: arial; font-size: 13.3333px;
                          font-style: normal; font-variant-ligatures:
                          normal; font-variant-caps: normal;
                          font-weight: 400; letter-spacing: normal;
                          orphans: 2; text-align: start; text-indent:
                          0px; text-transform: none; white-space:
                          normal; widows: 2; word-spacing: 0px;
                          -webkit-text-stroke-width: 0px;
                          background-color: #ffffff;
                          text-decoration-thickness: initial;
                          text-decoration-style: initial;
                          text-decoration-color: initial;">
                        <span style="color: #000000; font-family: arial;
                          font-size: 13.3333px; font-style: normal;
                          font-variant-ligatures: normal;
                          font-variant-caps: normal; font-weight: 400;
                          letter-spacing: normal; orphans: 2;
                          text-align: start; text-indent: 0px;
                          text-transform: none; white-space: normal;
                          widows: 2; word-spacing: 0px;
                          -webkit-text-stroke-width: 0px;
                          background-color: #ffffff;
                          text-decoration-thickness: initial;
                          text-decoration-style: initial;
                          text-decoration-color: initial; display:
                          inline !important; float: none;">These 5
                          layers are the same no matter the s57 file.
                          And 4 out of those 5 layers are not actually
                          layers.</span><br style="color: #000000;
                          font-family: arial; font-size: 13.3333px;
                          font-style: normal; font-variant-ligatures:
                          normal; font-variant-caps: normal;
                          font-weight: 400; letter-spacing: normal;
                          orphans: 2; text-align: start; text-indent:
                          0px; text-transform: none; white-space:
                          normal; widows: 2; word-spacing: 0px;
                          -webkit-text-stroke-width: 0px;
                          background-color: #ffffff;
                          text-decoration-thickness: initial;
                          text-decoration-style: initial;
                          text-decoration-color: initial;">
                        <span style="color: #000000; font-family: arial;
                          font-size: 13.3333px; font-style: normal;
                          font-variant-ligatures: normal;
                          font-variant-caps: normal; font-weight: 400;
                          letter-spacing: normal; orphans: 2;
                          text-align: start; text-indent: 0px;
                          text-transform: none; white-space: normal;
                          widows: 2; word-spacing: 0px;
                          -webkit-text-stroke-width: 0px;
                          background-color: #ffffff;
                          text-decoration-thickness: initial;
                          text-decoration-style: initial;
                          text-decoration-color: initial; display:
                          inline !important; float: none;">Using the
                          autotest generated s57 file as a unit test to
                          cross check, there is supposed to be 13
                          layers. </span><br style="color: #000000;
                          font-family: arial; font-size: 13.3333px;
                          font-style: normal; font-variant-ligatures:
                          normal; font-variant-caps: normal;
                          font-weight: 400; letter-spacing: normal;
                          orphans: 2; text-align: start; text-indent:
                          0px; text-transform: none; white-space:
                          normal; widows: 2; word-spacing: 0px;
                          -webkit-text-stroke-width: 0px;
                          background-color: #ffffff;
                          text-decoration-thickness: initial;
                          text-decoration-style: initial;
                          text-decoration-color: initial;">
                        <br>
                        Note: I had feedback from Even indicating the
                        setup environment is probably wrong. And to set
                        up the GDAL_DATA environment variable, so we've
                        made an environment variable referencing the
                        gdal/data folder and that hasn't fixed the
                        problem, but I think it's on the right track as
                        Even said they could reproduce the problem if
                        not setup correctly.<br>
                        <br style="color: #000000; font-family: arial;
                          font-size: 13.3333px; font-style: normal;
                          font-variant-ligatures: normal;
                          font-variant-caps: normal; font-weight: 400;
                          letter-spacing: normal; orphans: 2;
                          text-align: start; text-indent: 0px;
                          text-transform: none; white-space: normal;
                          widows: 2; word-spacing: 0px;
                          -webkit-text-stroke-width: 0px;
                          background-color: #ffffff;
                          text-decoration-thickness: initial;
                          text-decoration-style: initial;
                          text-decoration-color: initial;">
                        <strong style="color: #000000; font-family:
                          arial; font-size: 13.3333px; font-style:
                          normal; font-variant-ligatures: normal;
                          font-variant-caps: normal; letter-spacing:
                          normal; orphans: 2; text-align: start;
                          text-indent: 0px; text-transform: none;
                          white-space: normal; widows: 2; word-spacing:
                          0px; -webkit-text-stroke-width: 0px;
                          background-color: #ffffff;
                          text-decoration-thickness: initial;
                          text-decoration-style: initial;
                          text-decoration-color: initial;">Has anyone
                          had success reading s57 files with a C++
                          3.4.1. project that could possibly help get
                          this going?</strong><br>
                        <br>
                        Link to reference Image: <a
                          class="moz-txt-link-freetext"
                          href="https://imgur.com/a/KwmqZSe"
                          moz-do-not-send="true">https://imgur.com/a/KwmqZSe</a></p>
                      <p style="margin:0;padding:0;margin: 0; padding:
                        0; font-family: arial; font-size: 10pt;
                        overflow-wrap: break-word;"><br style="color:
                          #000000; font-family: arial; font-size:
                          13.3333px; font-style: normal;
                          font-variant-ligatures: normal;
                          font-variant-caps: normal; font-weight: 400;
                          letter-spacing: normal; orphans: 2;
                          text-align: start; text-indent: 0px;
                          text-transform: none; white-space: normal;
                          widows: 2; word-spacing: 0px;
                          -webkit-text-stroke-width: 0px;
                          background-color: #ffffff;
                          text-decoration-thickness: initial;
                          text-decoration-style: initial;
                          text-decoration-color: initial;">
                        <span style="color: #000000; font-family: arial;
                          font-size: 13.3333px; font-style: normal;
                          font-variant-ligatures: normal;
                          font-variant-caps: normal; font-weight: 400;
                          letter-spacing: normal; orphans: 2;
                          text-align: start; text-indent: 0px;
                          text-transform: none; white-space: normal;
                          widows: 2; word-spacing: 0px;
                          -webkit-text-stroke-width: 0px;
                          background-color: #ffffff;
                          text-decoration-thickness: initial;
                          text-decoration-style: initial;
                          text-decoration-color: initial; display:
                          inline !important; float: none;">Regards,</span><br
                          style="color: #000000; font-family: arial;
                          font-size: 13.3333px; font-style: normal;
                          font-variant-ligatures: normal;
                          font-variant-caps: normal; font-weight: 400;
                          letter-spacing: normal; orphans: 2;
                          text-align: start; text-indent: 0px;
                          text-transform: none; white-space: normal;
                          widows: 2; word-spacing: 0px;
                          -webkit-text-stroke-width: 0px;
                          background-color: #ffffff;
                          text-decoration-thickness: initial;
                          text-decoration-style: initial;
                          text-decoration-color: initial;">
                        <span style="color: #000000; font-family: arial;
                          font-size: 13.3333px; font-style: normal;
                          font-variant-ligatures: normal;
                          font-variant-caps: normal; font-weight: 400;
                          letter-spacing: normal; orphans: 2;
                          text-align: start; text-indent: 0px;
                          text-transform: none; white-space: normal;
                          widows: 2; word-spacing: 0px;
                          -webkit-text-stroke-width: 0px;
                          background-color: #ffffff;
                          text-decoration-thickness: initial;
                          text-decoration-style: initial;
                          text-decoration-color: initial; display:
                          inline !important; float: none;">Daniel</span></p>
                      <br>
                      <fieldset class="moz-mime-attachment-header"></fieldset>
                      <p class="moz-quote-pre"
                        style="margin:0;padding:0;margin: 0; padding:
                        0;">_______________________________________________
                        gdal-dev mailing list <a
                          class="moz-txt-link-abbreviated
                          moz-txt-link-freetext"
                          href="mailto:gdal-dev@lists.osgeo.org"
                          moz-do-not-send="true">gdal-dev@lists.osgeo.org</a>
                        <a class="moz-txt-link-freetext"
                          href="https://lists.osgeo.org/mailman/listinfo/gdal-dev"
                          moz-do-not-send="true">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a></p>
                    </blockquote>
                    <p class="moz-signature"
                      style="margin:0;padding:0;margin: 0; padding: 0;">--
                      Momtchil Momtchev <a
                        class="moz-txt-link-rfc2396E"
                        href="mailto:momtchil@momtchev.com"
                        moz-do-not-send="true"><momtchil@momtchev.com></a></p>
                  </div>
                </blockquote>
                <p class="moz-signature" style="margin:0;padding:0;">--
                  Momtchil Momtchev <a class="moz-txt-link-rfc2396E"
                    href="mailto:momtchil@momtchev.com"
                    moz-do-not-send="true"><momtchil@momtchev.com></a>
                  <span>_______________________________________________</span><br>
                  <span>gdal-dev mailing list</span><br>
                  <span><a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a></span><br>
                  <span><a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/gdal-dev">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a></span></p>
              </div>
            </blockquote>
          </div>
        </div>
      </font>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
Momtchil Momtchev <a class="moz-txt-link-rfc2396E" href="mailto:momtchil@momtchev.com"><momtchil@momtchev.com></a>
</pre>
  </body>
</html>