2

I ran into this problem in PostGIS:

raster2pgsql -c -I -C -s 4326  -N -9999  -M -Y  -F ./test2/*.tif  rdem2 > rdem2.sql

Processing 84/84: ./test2/dem2_4326_06_14.tif

ERROR: diff_rastinfo: Could not run raster alignment test

Does someone have any ideas about possible reasons for this problem ?

2
  • Could you explain a bit more about what data you are trying to import? There could be known issues with known sources of data which can help shed light on your challenges.
    – ragnvald
    Commented Apr 21, 2015 at 12:55
  • Do you see the error if you do not request to apply constraints? Remove -C and try without it.
    – mloskot
    Commented Sep 22, 2017 at 6:46

1 Answer 1

1

I think that error might happen if your proj files used by GDAL can not be found. Alignment relies on that as I recall.

What does:

SELECT postgis_full_version();

return. If it returns GDAL_DATA can not be found, then that's the problem. Since that is where it looks for the coordinate reference files.

1
  • I should add, if that is the problem, you need to set the environment variable -- GDAL_DATA and it should point at the folder installed by gdal that contains files like compdcs.csv, gcs.csv. On linux I think its in share/gdal and on windows it gets installed in PostgreSQL install folder in a folder called gdal-data
    – Regina Obe
    Commented Apr 21, 2015 at 17:00

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.