PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ getPoint2d_p_ro()

int getPoint2d_p_ro ( const POINTARRAY pa,
uint32_t  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 2875 of file lwgeodetic.c.

2876 {
2877  uint8_t *pa_ptr = NULL;
2878  assert(pa);
2879  assert(n < pa->npoints);
2880 
2881  pa_ptr = getPoint_internal(pa, n);
2882  /* printf( "pa_ptr[0]: %g\n", *((double*)pa_ptr)); */
2883  *point = (POINT2D*)pa_ptr;
2884 
2885  return LW_SUCCESS;
2886 }
uint8_t * getPoint_internal(const POINTARRAY *pa, uint32_t n)
Definition: ptarray.c:1750
#define LW_SUCCESS
Definition: liblwgeom.h:80
unsigned char uint8_t
Definition: uthash.h:79

References getPoint_internal(), and LW_SUCCESS.

Here is the call graph for this function: