1

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\PostgreSQL13円\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"
Kadir Şahbaz
78.6k57 gold badges260 silver badges407 bronze badges
asked Oct 22, 2020 at 18:44

1 Answer 1

1

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

See proj documentation

answered Oct 22, 2020 at 19:10
1
  • Thank you, that worked! Commented Oct 22, 2020 at 22:34

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.