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 Answer 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– Neha Sharma2017年05月15日 09:24:53 +00:00Commented 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?adegolyer– adegolyer2019年05月06日 20:42:52 +00:00Commented May 6, 2019 at 20:42
Explore related questions
See similar questions with these tags.