0

I have a database that was using postgis 2.2.1 extension on postgresql 9.5 database on server A. But, recently I have upgraded this to 2.5.5 and copied this database to new server B which also has postgis 2.5.5. Result of Postgis_full_version() on A is:

POSTGIS="2.5.5" [EXTENSION] PGSQL="95" GEOS="3.7.1-CAPI-1.11.1 27a5e771" PROJ="Rel. 4.9.2, 08 September 2015" GDAL="GDAL 1.11.3, released 2015/09/16" LIBXML="2.9.3" LIBJSON="0.11.99" LIBPROTOBUF="1.2.1" RASTER

and same for server B is:

POSTGIS="2.5.5" [EXTENSION] PGSQL="95" GEOS="3.8.0-CAPI-1.13.1 " PROJ="Rel. 6.3.1, February 10th, 2020" GDAL="GDAL 3.0.4, released 2020/01/28" LIBXML="2.9.10" LIBJSON="0.13.1" LIBPROTOBUF="1.3.3" RASTER

On server B, the database is throwing error when using ESPG 27200 in ST_transform queries but working for other ESPG projections.

For example, when I am executing query:

select st_asText(st_transform(st_geomfromtext('POINT(172 -43)', 4326), 27200));

I am getting this error:

NOTICE:  PostGIS was unable to transform the point because either no grid shift files were found, or the point does not lie within the range for which the grid shift is defined. Refer to the ST_Transform() section of the PostGIS manual for details on how to configure PostGIS to alter this behaviour.

ERROR:  transform: couldn't project point (172 -43 0): failed to load datum shift file (-38)
SQL state: XX000

Difference between server A and server B config is A is running on GDAL 1.11

I am a newbie to postgresql and postgis, so I am not sure how to fix the problem.

Jim Jones
  • 18,404
  • 3
  • 35
  • 44
rajnz18
  • 60
  • 5
  • 2
    Upgrade to a recent, supported PostgreSQL version. Few people will be interested in researching a problem on a dead version. – Laurenz Albe Aug 29 '22 at 06:16
  • PostgreSQL 9.5 is no longer supported. If there isn't any particular reason for using such an old version, it is imperative that you upgrade your system! You're not only missing new features but also making your database quite vulnerable. PostGIS 3.3 has just been released btw ;) – Jim Jones Aug 29 '22 at 08:03
  • 1
    Note the `proj` update too. You might want to read release notes for this (and the subsequent ones, should a bug have been found and fixed) – JGH Aug 29 '22 at 14:40
  • Thanks for your inputs. It seems upgrade to supported version is the path forward. @JGH I am looking at proj release notes and certainly there are breaking changes. Will follow the migration steps. – rajnz18 Aug 29 '22 at 22:09
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Aug 30 '22 at 06:19

0 Answers0