[gdal-dev] Cannot find proj.db

Chris Smemoe csmemoe at aquaveo.com
Thu Mar 30 10:20:44 PDT 2023


Elena,

 

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.

 

I haven’t had to do these things as much with the python/conda distributions
of the commandline programs for whatever reason.

 

HTH,

 

Chris

 

From: gdal-dev [mailto:gdal-dev-bounces at lists.osgeo.org] On Behalf Of Elena
Ruiz
Sent: Thursday, March 30, 2023 6:02 AM
To: gdal-dev at lists.osgeo.org
Subject: [gdal-dev] Cannot find proj.db

 

Hello, 

I am using GDAL 3.6.2 on Windows 11 and am having problems with the
following error:

 

ERROR 1: PROJ: proj_create_from_database: Cannot find proj.db

 

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  .

 

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

ERROR 1: PROJ: proj_create_from_database: Cannot find proj.db

ERROR 1: Translating source or target SRS failed:

EPSG:4326

 

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?

 

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

Creating output file that is 1003P x 1201L.

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.

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.

...10...20...30...40...50...60...70...80...90...100 - done.

 

Thank you and regards

  _____  


  <https://www.aplitop.com/descargas/firma1.jpg> 

Elena Ruiz 
Sofware Development & Technical Support
Tel. +34 952 43 97 71 
eruiz at aplitop.com
Sumatra, 9 - 29190 Málaga (Spain)
www.aplitop.com

 <https://www.facebook.com/AplitopSL/>     <https://twitter.com/aplitop>
<https://www.linkedin.com/company/aplitop>
<https://www.youtube.com/user/aplitop> 

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







-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20230330/71a1a62b/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.jpg
Type: image/jpeg
Size: 718 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20230330/71a1a62b/attachment-0003.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.jpg
Type: image/jpeg
Size: 712 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20230330/71a1a62b/attachment-0004.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image006.jpg
Type: image/jpeg
Size: 737 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20230330/71a1a62b/attachment-0005.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image008.png
Type: image/png
Size: 672 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20230330/71a1a62b/attachment-0001.png>


More information about the gdal-dev mailing list