<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>DGN writing indeeds need GDAL_DATA to be set and point to the
      directory that contains seed_2d.dgn</p>
    <p>You can source scripts/setdevenv.sh to set the appropriate
      environment variables for a dev env.<br>
    </p>
    <div class="moz-cite-prefix">Le 26/04/2021 à 16:38, Andrew Bell a
      écrit :<br>
    </div>
    <blockquote type="cite"
cite="mid:CACJ51z2AwDH7GHK6NMg8gihdPuoRnqqrNshUsNveyObzJihDdQ@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div dir="ltr"><br>
        </div>
        <br>
        <div class="gmail_quote">
          <div dir="ltr" class="gmail_attr">On Mon, Apr 26, 2021 at
            10:18 AM Even Rouault <<a
              href="mailto:even.rouault@spatialys.com"
              moz-do-not-send="true">even.rouault@spatialys.com</a>>
            wrote:<br>
          </div>
          <blockquote class="gmail_quote" style="margin:0px 0px 0px
            0.8ex;border-left:1px solid
            rgb(204,204,204);padding-left:1ex">
            <div>
              <p>Andrew,</p>
              <p>you don't need to add autotest/ogr to GDAL_DATA.</p>
              <p>Normally this is done in autotest/pytest.ini</p>
            </div>
          </blockquote>
          <div>Thanks. I missed that. </div>
          <blockquote class="gmail_quote" style="margin:0px 0px 0px
            0.8ex;border-left:1px solid
            rgb(204,204,204);padding-left:1ex">
            <div>
              <p>I suspect you don't have the pytest-env python module
                installed.</p>
              <p>You should probably just run:<br>
              </p>
              <p>pip3 install -U -r autotest/requirements.txt</p>
            </div>
          </blockquote>
          <div>I'm using conda and pip often interacts badly with it, so
            I've just been using conda.</div>
          <div><br>
          </div>
          <div>I'm still getting an error that *seems* as if it might be
            related to finding test data. Is there any setting/variable
            I might still need to check?</div>
          <div><br>
          </div>
          <div>___________________________________________
            test_ogr_dgn_7 ___________________________________________<br>
            <br>
                def test_ogr_dgn_7():<br>
            <br>
                    co_opts = ['UOR_PER_SUB_UNIT=100',
            'SUB_UNITS_PER_MASTER_UNIT=100',<br>
                               'ORIGIN=-50,-50,0']<br>
            <br>
                    dgn2_ds =
            ogr.GetDriverByName('DGN').CreateDataSource('tmp/dgn7.dgn',<br>
                                                                       
              options=co_opts)<br>
            <br>
                    dgn2_lyr = dgn2_ds.CreateLayer('elements')<br>
            <br>
                    dgn_ds = ogr.Open('data/dgn/smalltest.dgn')<br>
                    dgn_lyr = dgn_ds.GetLayer(0)<br>
            <br>
            >       dst_feat =
            ogr.Feature(feature_def=dgn2_lyr.GetLayerDefn())<br>
            E       AttributeError: 'NoneType' object has no attribute
            'GetLayerDefn'<br>
          </div>
          <div><br>
          </div>
          <div>Thanks,</div>
          <div><br>
          </div>
        </div>
        -- <br>
        <div dir="ltr" class="gmail_signature">Andrew Bell<br>
          <a href="mailto:andrew.bell.ia@gmail.com" target="_blank"
            moz-do-not-send="true">andrew.bell.ia@gmail.com</a></div>
      </div>
    </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>