135 if (pj_is_latlong(srcpj))
to_rad(pt) ;
137 LWDEBUGF(4,
"transforming POINT(%f %f) from '%s' to '%s'",
138 orig_pt.
x, orig_pt.
y, pj_get_def(srcpj,0), pj_get_def(dstpj,0));
140 if (pj_transform(srcpj, dstpj, 1, 0, &(pt->
x), &(pt->
y), &(pt->
z)) != 0)
142 int pj_errno_val = *pj_get_errno_ref();
143 if (pj_errno_val == -38)
145 lwnotice(
"PostGIS was unable to transform the point because either no grid"
146 " shift files were found, or the point does not lie within the "
147 "range for which the grid shift is defined. Refer to the "
148 "ST_Transform() section of the PostGIS manual for details on how "
149 "to configure PostGIS to alter this behaviour.");
150 lwerror(
"transform: couldn't project point (%g %g %g): %s (%d)",
151 orig_pt.
x, orig_pt.
y, orig_pt.
z,
152 pj_strerrno(pj_errno_val), pj_errno_val);
156 lwerror(
"transform: couldn't project point (%g %g %g): %s (%d)",
157 orig_pt.
x, orig_pt.
y, orig_pt.
z,
158 pj_strerrno(pj_errno_val), pj_errno_val);
163 if (pj_is_latlong(dstpj))
to_dec(pt);
#define LWDEBUGF(level, msg,...)
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
void lwnotice(const char *fmt,...)
Write a notice out to the notice handler.