PostGIS  2.2.8dev-r@@SVN_REVISION@@

◆ ptarray_set_point4d()

void ptarray_set_point4d ( POINTARRAY pa,
int  n,
const POINT4D p4d 
)

Definition at line 536 of file lwgeom_api.c.

References POINTARRAY::flags, FLAGS_GET_ZM, getPoint_internal(), and POINT4D::m.

Referenced by circstring_from_pa(), linestring_from_pa(), lwcircstring_setPoint4d(), LWGEOM_line_interpolate_point(), lwgeom_project_spheroid(), lwline_clip_to_ordinate_range(), lwline_from_lwmpoint(), lwline_measured_from_lwline(), lwline_setPoint4d(), lwt_AddPoint(), ptarray_affine(), ptarray_flip_coordinates(), ptarray_force_geodetic(), ptarray_from_GEOSCoordSeq(), ptarray_from_SFCGAL(), ptarray_insert_point(), ptarray_nudge_geodetic(), ptarray_scale(), ptarray_swap_ordinates(), ptarray_transform(), rt_raster_get_convex_hull(), rt_raster_get_envelope_geom(), rt_raster_get_perimeter(), rt_raster_pixel_as_polygon(), rt_util_envelope_to_lwpoly(), test_lwline_clip_big(), and test_lwline_crossing_short_lines().

537 {
538  uint8_t *ptr;
539  assert(n >= 0 && n < pa->npoints);
540  ptr=getPoint_internal(pa, n);
541  switch ( FLAGS_GET_ZM(pa->flags) )
542  {
543  case 3:
544  memcpy(ptr, p4d, sizeof(POINT4D));
545  break;
546  case 2:
547  memcpy(ptr, p4d, sizeof(POINT3DZ));
548  break;
549  case 1:
550  memcpy(ptr, p4d, sizeof(POINT2D));
551  ptr+=sizeof(POINT2D);
552  memcpy(ptr, &(p4d->m), sizeof(double));
553  break;
554  case 0:
555  memcpy(ptr, p4d, sizeof(POINT2D));
556  break;
557  }
558 }
double m
Definition: liblwgeom.h:336
#define FLAGS_GET_ZM(flags)
Definition: liblwgeom.h:137
uint8_t flags
Definition: liblwgeom.h:353
uint8_t * getPoint_internal(const POINTARRAY *pa, int n)
Definition: ptarray.c:1706
Here is the call graph for this function:
Here is the caller graph for this function: