Reputation: 21
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
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"
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
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"
I also removed the PROJ_LIB
environment variable and attempted to set it to different directories, but the issue remains unresolved.
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