<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=iso-8859-1"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"Myriad Pro";
        panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:70.85pt 85.05pt 70.85pt 85.05pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link="#0563C1" vlink="#954F72" style='word-wrap:break-word'><div class=WordSection1><p class=MsoNormal><span style='color:#1F497D'>Elena,<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>I have had this same problem.  We have a few methods of setting the location of the proj.db file.  When we call from C++ (or from python), there’s a function called OSRSetPROJSearchPaths that’s handy.  If you’re calling from a command line, you could try setting your environment variable just before calling your function (set “PROJ_LIB=c:\path\to\proj\”). I think there’s also a command line option to set your PROJ_LIB.  You could try adding “--config PROJ_LIB “c:\path\to\proj”” to your command line and see what that does.  I haven’t personally tried it.<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>I haven’t had to do these things as much with the python/conda distributions of the commandline programs for whatever reason.<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>HTH,<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Chris<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> gdal-dev [mailto:gdal-dev-bounces@lists.osgeo.org] <b>On Behalf Of </b>Elena Ruiz<br><b>Sent:</b> Thursday, March 30, 2023 6:02 AM<br><b>To:</b> gdal-dev@lists.osgeo.org<br><b>Subject:</b> [gdal-dev] Cannot find proj.db<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span lang=ES>Hello, <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB>I am using GDAL 3.6.2 on Windows 11 and am having problems with the following error:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB>ERROR 1: PROJ: proj_create_from_database: Cannot find proj.db<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB>I have set as environment variable PROJ_LIB= “D:\MDT\V9\bin\gdal\gdal_latest\share”  and PROJ_DATA= “D:\MDT\V9\bin\gdal\gdal_latest\share”, as user variable and in the system variable, but it still doesn't work and the file proj.db exits in D:\MDT\V9\bin\gdal\gdal_latest\share  .<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB>D:\MDT\V9\bin\gdal\gdal_latest\x64>gdalwarp -s_srs EPSG:4326 -t_srs EPSG:25831 -r near -of GTiff C:\Users\elena\Downloads\D37531385_0101_DTM.asc C:/Users/elena/Downloads/D37531385_0101_DTM_25831_qgis_.tif<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB>ERROR 1: PROJ: proj_create_from_database: Cannot find proj.db<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB>ERROR 1: Translating source or target SRS failed:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB>EPSG:4326<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB>The funny thing is that I have the same version of GDAL installed on my computer using Anaconda3, to do tests, and from the anaconda directory it works for me, and if I look in the environment variables I don't see any path that refers to where Anaconda has the Proj.db. Is there another way to set the PROJ_LIB path besides adding an environment variable? Is there any way to know where the PROJ_LIB is looking for my version of GDAL?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoNormal><span lang=ES>C:\Users\elena\Anaconda3\envs\mygdal\Library\bin>gdalwarp -s_srs EPSG:4326 -t_srs EPSG:25831 -r near -of GTiff C:\Users\elena\Downloads\D37531385_0101_DTM.asc C:/Users/elena/Downloads/D37531385_0101_DTM_25831_qgis_.tif<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB>Creating output file that is 1003P x 1201L.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB>Processing C:\Users\elena\Downloads\D37531385_0101_DTM.asc [1/1] : 0Using internal nodata values (e.g. -9999) for image C:\Users\elena\Downloads\D37531385_0101_DTM.asc.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB>Copying nodata values from source C:\Users\elena\Downloads\D37531385_0101_DTM.asc to destination C:/Users/elena/Downloads/D37531385_0101_DTM_25831_qgis_.tif.<o:p></o:p></span></p><p class=MsoNormal><span lang=ES>...10...20...30...40...50...60...70...80...90...100 - done.<o:p></o:p></span></p><p class=MsoNormal><span lang=ES><o:p> </o:p></span></p><p class=MsoNormal><span lang=ES>Thank you and regards<o:p></o:p></span></p><div class=MsoNormal align=center style='text-align:center'><span lang=ES style='font-size:12.0pt;font-family:"Times New Roman","serif"'><hr size=2 width="100%" align=center></span></div><table class=MsoNormalTable border=0 cellpadding=0 width=473 style='width:354.75pt'><tr style='height:18.75pt'><td style='padding:.75pt .75pt .75pt .75pt;height:18.75pt'><p align=right style='text-align:right'><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'><img id="_x0000_i1026" src="https://www.aplitop.com/descargas/firma1.jpg"><o:p></o:p></span></p></td><td width=330 valign=top style='width:247.5pt;padding:.75pt .75pt .75pt .75pt;height:18.75pt'><p class=MsoNormal style='line-height:9.75pt'><strong><span style='font-size:9.0pt;font-family:"Myriad Pro","serif"'>Elena Ruiz </span></strong><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><br></span><span style='font-size:7.0pt;font-family:"Myriad Pro","serif"'>Sofware Development & Technical Support<br>Tel. +34 952 43 97 71 <br>eruiz@aplitop.com<br>Sumatra, 9 - 29190 Málaga (Spain)<br><strong><span style='font-family:"Myriad Pro","serif"'>www.aplitop.com</span></strong><b><br><br><strong><span style='font-family:"Myriad Pro","serif"'><a href="https://www.facebook.com/AplitopSL/"><span style='text-decoration:none'><img border=0 width=15 height=15 id="_x0000_i1027" src="cid:image002.jpg@01D962F7.949DE440"></span></a>   <a href="https://twitter.com/aplitop"><span style='text-decoration:none'><img border=0 width=15 height=15 id="_x0000_i1028" src="cid:image004.jpg@01D962F7.949DE440"></span></a>   <a href="https://www.linkedin.com/company/aplitop"><span style='text-decoration:none'><img border=0 width=15 height=15 id="_x0000_i1029" src="cid:image006.jpg@01D962F7.949DE440"></span></a>   <a href="https://www.youtube.com/user/aplitop"><span style='text-decoration:none'><img border=0 width=15 height=15 id="_x0000_i1030" src="cid:image008.png@01D962F7.949DE440"></span></a></span></strong></b></span><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p></o:p></span></p></td></tr></table><p style='margin-bottom:12.0pt'><span lang=ES style='font-size:6.0pt;font-family:"Myriad Pro","serif"'>In accordance with the provisions of the European Regulation of Data Protection 2016/679 (Reglamento Europeo de Protección de Datos 2016/679), we inform you that the data and the information you provide us through this medium will be used by APLITOP, S.L., with C.I.F. B-92543396 and with address at C / Sumatra, 9, Malaga, 29190, in order to answer your questions and inform you about our products. The data provided will be kept as long as it does not request its cessation and will not be transferred to third parties except in cases where there is a legal obligation. You have the right to access your personal data, correct inaccurate data or request its deletion when the data is no longer necessary for the purposes that were collected, as well as any rights recognized in the RGPD 2016/679</span><span lang=ES style='font-size:10.0pt;font-family:"Arial","sans-serif"'><o:p></o:p></span></p><p style='margin-bottom:12.0pt'><span lang=ES style='font-size:6.0pt;font-family:"Myriad Pro","serif"'><br><br><br><br></span><span lang=ES style='font-size:10.0pt;font-family:"Arial","sans-serif"'><o:p></o:p></span></p></div></body></html>