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.

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.

  • It solved my problem. – Neha Sharma May 15 '17 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? – adegolyer May 6 at 20:42

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.