PostGIS  2.5.0dev-r@@SVN_REVISION@@

◆ getPoint2d_p_ro()

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

This function can only be used on LWGEOM that is built on top of GSERIALIZED, otherwise alignment errors will ensue.

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 2775 of file lwgeodetic.c.

References getPoint_internal(), and LW_SUCCESS.

2776 {
2777  uint8_t *pa_ptr = NULL;
2778  assert(pa);
2779  assert(n < pa->npoints);
2781  pa_ptr = getPoint_internal(pa, n);
2782  /* printf( "pa_ptr[0]: %g\n", *((double*)pa_ptr)); */
2783  *point = (POINT2D*)pa_ptr;
2785  return LW_SUCCESS;
2786 }
#define LW_SUCCESS
Definition: liblwgeom.h:79
uint8_t * getPoint_internal(const POINTARRAY *pa, uint32_t n)
Definition: ptarray.c:1743
unsigned char uint8_t
Definition: uthash.h:79
Here is the call graph for this function: