- /* For NAD grid-shift errors, display an error message with an additional hint */
- pj_errno_ref = pj_get_errno_ref();
+ /* Force a reset of pj_errno to avoid future errors */
+ *pj_errno_ref = 0;
- if (*pj_errno_ref != 0)
- {
- if (*pj_errno_ref == -38)
+ if (pj_errno_val == -38)
{
lwnotice("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.");
lwerror("transform: couldn't project point (%g %g %g): %s (%d)",