0

I am attempting to load a GeoTiff into a PostgreSQL database using the PostGIS extension raster2pgsql. When running the executable, I receive the following error: Error 1: PROJ: Cannot find proj.db. The only file with that name resides in the path C:\Program Files\PostgreSQL\13\share\contrib\postgis-3.0\proj. I've added that path to my Path variable in my environment settings, but running raster2pgsql still returns the same error. I then get a message saying the program raster2pgsql has stopped working.

This is the command I'm running in Command Prompt. I've put placeholder user/database names in quotes. If any syntax is incorrect or doesn't make sense please inform me:

raster2pgsql -I -C C:\Users\Administrator\Desktop\arcgis-data\ "tifname".tif | psql -h "hostname" -p 5432 -d "database name" -U "username"
1

I believe you need to specify the path to proj.db in an PROJ_LIB environment variable.

See proj documentation

  • Thank you, that worked! – Tony Oct 22 '20 at 22:34

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.