PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ ptarray_copy_point()

void ptarray_copy_point ( POINTARRAY pa,
uint32_t  from,
uint32_t  to 
)

Definition at line 394 of file lwgeom_api.c.

395{
396 int ndims = FLAGS_NDIMS(pa->flags);
397 switch (ndims)
398 {
399 case 2:
400 {
401 POINT2D *p_from = (POINT2D*)(getPoint_internal(pa, from));
402 POINT2D *p_to = (POINT2D*)(getPoint_internal(pa, to));
403 *p_to = *p_from;
404 return;
405 }
406 case 3:
407 {
408 POINT3D *p_from = (POINT3D*)(getPoint_internal(pa, from));
409 POINT3D *p_to = (POINT3D*)(getPoint_internal(pa, to));
410 *p_to = *p_from;
411 return;
412 }
413 case 4:
414 {
415 POINT4D *p_from = (POINT4D*)(getPoint_internal(pa, from));
416 POINT4D *p_to = (POINT4D*)(getPoint_internal(pa, to));
417 *p_to = *p_from;
418 return;
419 }
420 default:
421 {
422 lwerror("%s: unsupported number of dimensions - %d", __func__, ndims);
423 return;
424 }
425 }
426 return;
427}
#define FLAGS_NDIMS(flags)
Definition liblwgeom.h:179
void void lwerror(const char *fmt,...) __attribute__((format(printf
Write a notice out to the error handler.
static uint8_t * getPoint_internal(const POINTARRAY *pa, uint32_t n)
Definition lwinline.h:75
lwflags_t flags
Definition liblwgeom.h:431

References POINTARRAY::flags, FLAGS_NDIMS, getPoint_internal(), and lwerror().

Referenced by lwgeom_simplify_in_place().

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