<div dir="ltr"><div>Hi Folks,</div><div><br></div>I am trying to explore GDAL raster APIs for reading i_3001a.ntf. I have installed GDAL using miniconda on Ubuntu 18.04 and referring to the Raster API tutorial open sample file downloaded from <a href="https://www.gwg.nga.mil/ntb/baseline/software/testfile/Nitfv2_1/scen_2_1.html">here</a>.<br><div><br></div><div>Below is the code snippet I have written to open the file,</div><div><br></div><div><pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:Arial,Helvetica,sans-serif;color:rgb(192,192,192)">        </span><span style="font-family:Arial,Helvetica,sans-serif;color:rgb(128,0,128)">GDALDataset</span><span style="font-family:Arial,Helvetica,sans-serif;color:rgb(192,192,192)"> </span><span style="font-family:Arial,Helvetica,sans-serif">*</span><span style="font-family:Arial,Helvetica,sans-serif;color:rgb(9,46,100)">poDataset</span><span style="font-family:Arial,Helvetica,sans-serif">;</span><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(0,103,124)">GDALAllRegister</span>();</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(9,46,100)">poDataset</span><span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,128,0)">static_cast</span><<span style="color:rgb(128,0,128)">GDALDataset</span>*>(<span style="color:rgb(0,103,124)">GDALOpen</span>(<span style="color:rgb(0,128,0)">"../i_3001a_reader/images/i_3001a.ntf"</span>,<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">GA_ReadOnly</span>));</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(128,128,0)">if</span><span style="color:rgb(192,192,192)"> </span>(<span style="color:rgb(9,46,100)">poDataset</span><span style="color:rgb(192,192,192)"> </span>==<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,128,0)">nullptr</span>)</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span>{</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">        </span><span style="color:rgb(206,92,0)">cout</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,103,124)"><<</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">"Couldn't</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">open</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">i_3001a.ntf</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">file"</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,103,124)"><<</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,103,124)">endl</span>;</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span>}</pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre></div><div>On running this code getting below error,</div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><b>proj_context_get_database_path: Open of /home/nishant/miniconda3/share/proj failed</b></div></blockquote><div><br></div><div>Am I missing any step? Please suggest.</div><div><br></div><div>Kind Regards,</div><div>Nishant</div><div><br></div></div>