[GIS] Error Finding proj.db using GDAL 3.0 With MapInfo v.15

cgdalmapinfovisual studio

I am using GDAL 3.0, MapInfo v.15, Visual Studio 2015, and c#.

Recently I updated from Gdal 2.2 -> 3.0. Since then when I use aerials to create a pdf report and then upload to S3, I receive the following error message originating from DeliverablesManager.exe when running the app in MapInfo:

 Sorry, an error occurred:
 System.ApplicationException: Error occurred while converting TargetProperty.TAB to GeoJSON: 
 ERROR 1: PROJ: createGeodeticReferenceFrame: Cannot find proj.db 
 ERROR 1: PROJ: proj_create_from_database: Cannot find proj.db

I have confirmed proj.db exists in the Program Files GDAL folder. I have confirmed the application in Visual Studio is pointing the projlib environmental variable to the projlib folder which contains the proj.db. I have confirmed the proj_6_0.dll and proj.exe exist in the GDAL folder.

I did notice MapInfo contains proj4.dll, not proj6.dll which leads me to question whether or not GDAL 3.0 can run with MapInfo v15. I did add proj.db and proj_6_0_.dll to the MapInfo folder containing proj6.dll (C:\Program Files (x86)\MapInfo\Professional\UT\reproject\Exceptions) and restarted my computer but the error persists.

Best Answer

In my case I have solved it by setting the environment variable PROJ_LIB which has to point to the directory where the file proj.db is located.

Related Question