0

I am trying to import GeoTIFF file into spatially enabled PostgreSQL database. Using command:

 raster2pgsql -s 4326 -C -F -a path/to/geotiff/file public.table_name 
 | psql -d database_name -U postgres.

This commands is working absolutely fine in Windows (Postgres 9.1), but it is giving an error in linux (Redhat 7.2, Postgres 9.1/Postgres9.5). It gives the following error:

rt_raster_gdal_warp: could not create GDAL transformation object for output dataset creation context: SQL function "ST_transform" statement 1.

I have also tried setting PROJSO and PROJ_LIB environment variable with

export PROJSO=/path/to/ibproj.so

but it is still not working.

John Powell
13.7k5 gold badges49 silver badges62 bronze badges
asked May 3, 2017 at 6:58

1 Answer 1

1

Well the same issue has been faced by us few time back. Basically the isssue is with version mismatch. It is advisable that u shd check with higher version of GDAL GREATER THAN 1.11.1 specificaly on LINUX (RHEL or CENTOS) flavor. Once ur done with the installation a reboot is mandatory. Do not forgot to set GDAL_DATA, PROJSO env variable.

answered May 12, 2017 at 15:07
2
  • It solved my problem. Commented May 15, 2017 at 9:24
  • Philip: I'm having the same issue and am wondering if you can expand on your fix a bit? Did you roll back your gdal and proj? Commented May 6, 2019 at 20:42

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.