PostGIS  3.0.6dev-r@@SVN_REVISION@@

◆ lwpoint_set_ordinate()

void lwpoint_set_ordinate ( POINT4D p,
char  ordinate,
double  value 
)
inline

Given a point, ordinate number and value, set that ordinate on the point.

Definition at line 283 of file lwlinearreferencing.c.

284 {
285  if (!p)
286  {
287  lwerror("Null input geometry.");
288  return;
289  }
290 
291  switch (ordinate)
292  {
293  case 'X':
294  p->x = value;
295  return;
296  case 'Y':
297  p->y = value;
298  return;
299  case 'Z':
300  p->z = value;
301  return;
302  case 'M':
303  p->m = value;
304  return;
305  }
306  lwerror("Cannot set %c ordinate.", ordinate);
307  return;
308 }
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
Definition: lwutil.c:190
int value
Definition: genraster.py:62
double m
Definition: liblwgeom.h:400
double x
Definition: liblwgeom.h:400
double z
Definition: liblwgeom.h:400
double y
Definition: liblwgeom.h:400

References lwerror(), POINT4D::m, genraster::value, POINT4D::x, POINT4D::y, and POINT4D::z.

Referenced by point_interpolate(), and test_lwpoint_set_ordinate().

Here is the call graph for this function:
Here is the caller graph for this function: