2

I start using GDAL 3.0.0 using conda build. I successfully installed GDAL on my laptop (Windows 10) and I am trying to ingest MapInfo tab file into Elasticsearch index. I understood that I have to create mapping first before ingesting it into Elasticsearch.

ogr2ogr -progress -lco MAPPING="D:\mymappings\map.text" -f "ElasticSearch" http://localhost:9700 "D:\MIProTab.tab"

But when I try to execute the above command then it is giving me the following error:

C:\Users\ABCD>ogr2ogr -progress -lco MAPPING="D:\mymappings\map.text" -f "ElasticSearch" http://localhost:9700 "D:\MIProTab.tab"
ERROR 1: PROJ: pj_obj_create: Cannot find proj.db
ERROR 1: PROJ: createGeodeticReferenceFrame: Cannot find proj.db
ERROR 1: PROJ: proj_as_wkt: Cannot find proj.db
ERROR 1: PROJ: proj_create_from_wkt: Cannot find proj.db
ERROR 1: PROJ: createGeodeticReferenceFrame: Cannot find proj.db
ERROR 1: PROJ: proj_create_from_database: Cannot find proj.db
ERROR 1: PROJ: proj_as_wkt: Cannot find proj.db
ERROR 1: PROJ: proj_create_from_wkt: Cannot find proj.db
ERROR 1: PROJ: proj_create_from_wkt: Cannot find proj.db
ERROR 1: PROJ: proj_as_wkt: Cannot find proj.db
ERROR 1: PROJ: proj_as_wkt: Cannot find proj.db
0...10...20...30...40...50...60...70...80...90...100 - done.

C:\Users\ABCD>

I checked other's solution where it is mentioned to have gdal.dll to be present on the same directory where ogr2ogr is present. Also, I have set the environment variable "PROJ_LIB" but all went in vain. What is wrong here?

  • 1
    GDAL needs to find the file "proj.db" that contains all the definitions for the coordinate systems. I do not know where conda is placing in the zip file from gisinternals.com it seems to be in …\bin\proj6\share. – user30184 Jun 26 at 11:07
  • this location is not present there. I also downloaded the GDAL core from gisinternals.com and try to run the same above command. But it doesn't work out. – Praveen Kumar Jun 26 at 12:30
  • Do you get the same error about missing proj.db? – user30184 Jun 26 at 12:50
  • How did you install GDAL the first time? – Marcelo Villa Jun 26 at 15:30
  • I installed anaconda/minconda python and then i use "conda" installer. – Praveen Kumar Jun 28 at 6:42
1

I set the PROJ_LIB environment variable to point to the PROJ.4 data directory (where proj.db lives) and this problem has been solved,hope that is useful to you.

  • Sorry. but it didn't solve my problem. – Praveen Kumar Jul 1 at 5:34
  • Yes this solved my problem. Of course you have to restart the software (including shells such as cmd boxes) to load this new environment setting into the ogr2ogr environment. – anneb 2 days ago
0

Check your environment_variable:

setx GDAL_DATA "C:\Program Files\GDAL\gdal-data"
setx GDAL_DRIVER_PATH "C:\Program Files\GDAL\gdalplugins"
setx PROJ_LIB "C:\Program Files\GDAL\projlib"
setx PYTHONPATH "C:\Program Files\GDAL\"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.