PostGIS  2.3.8dev-r@@SVN_REVISION@@

◆ getPoint2d_p_ro()

int getPoint2d_p_ro ( const POINTARRAY pa,
int  n,
POINT2D **  point 
)

New function to read doubles directly from the double* coordinate array of an aligned lwgeom POINTARRAY (built by de-serializing a GSERIALIZED).

New function to read doubles directly from the double* coordinate array of an aligned lwgeom POINTARRAY (built by de-serializing a GSERIALIZED).

Definition at line 2473 of file lwgeodetic.c.

References getPoint_internal(), and LW_SUCCESS.

2474 {
2475  uint8_t *pa_ptr = NULL;
2476  assert(pa);
2477  assert(n >= 0);
2478  assert(n < pa->npoints);
2479 
2480  pa_ptr = getPoint_internal(pa, n);
2481  /* printf( "pa_ptr[0]: %g\n", *((double*)pa_ptr)); */
2482  *point = (POINT2D*)pa_ptr;
2483 
2484  return LW_SUCCESS;
2485 }
#define LW_SUCCESS
Definition: liblwgeom.h:79
uint8_t * getPoint_internal(const POINTARRAY *pa, int n)
Definition: ptarray.c:1713
Here is the call graph for this function: