irem cagbayir
irem cagbayir

Reputation: 21

"PROJ: proj_create_from_database" error when transferring a KML file to PostgreSQL using ogr2ogr

I am trying to import a KML file into a PostgreSQL database using the ogr2ogr tool, but I am encountering the following error:

ERROR 1: PROJ: proj_create_from_database: C:\Program Files\PostgreSQL\17\share\contrib\postgis-3.5\proj\proj.db contains DATABASE.LAYOUT.VERSION.MINOR = 2 whereas a number >= 4 is expected. It comes from another PROJ installation.
ERROR 1: Failed to process SRS definition: EPSG:4326

Command I used:

ogr2ogr -f "PostgreSQL" PG:"dbname=My_Maps01 user=postgres password=12341234" \
-nln "Test_KML" -append -t_srs "EPSG:4326" \
"D:\Atlas_MyMaps\4 Mesures - 2x E82 HH84.60m -TOTAL_.kml"

System Information:


Checks and Attempts:

  1. I found two different proj.db files on my system:

    C:\Program Files\PostgreSQL\17\share\contrib\postgis-3.5\proj\proj.db
    C:\Program Files\QGIS 3.34.15\share\proj\proj.db
    
  2. I tried setting the PROJ_DATA environment variable to both directories, but the error persists:

    setx PROJ_DATA "C:\Program Files\PostgreSQL\17\share\contrib\postgis-3.5\proj"
    
    setx PROJ_DATA "C:\Program Files\QGIS 3.34.15\share\proj"
    
  3. I also removed the PROJ_LIB environment variable and attempted to set it to different directories, but the issue remains unresolved.


Notes:

For others facing a similar issue, the following Stack Overflow discussions might be helpful:

I would appreciate any help in resolving this issue. Thanks in advance!

Upvotes: 2

Views: 41

Answers (0)

Related Questions