PostGIS  2.1.10dev-r@@SVN_REVISION@@
static uint8_t* lwpoint_to_wkb_buf ( const LWPOINT pt,
uint8_t *  buf,
uint8_t  variant 
)
static

Definition at line 390 of file lwout_wkb.c.

References endian_to_wkb_buf(), integer_to_wkb_buf(), LWDEBUGF, lwgeom_wkb_needs_srid(), lwgeom_wkb_type(), LWPOINT::point, ptarray_to_wkb_buf(), LWPOINT::srid, and WKB_NO_NPOINTS.

Referenced by lwgeom_to_wkb_buf().

391 {
392  /* Set the endian flag */
393  LWDEBUGF(4, "Entering function, buf = %p", buf);
394  buf = endian_to_wkb_buf(buf, variant);
395  LWDEBUGF(4, "Endian set, buf = %p", buf);
396  /* Set the geometry type */
397  buf = integer_to_wkb_buf(lwgeom_wkb_type((LWGEOM*)pt, variant), buf, variant);
398  LWDEBUGF(4, "Type set, buf = %p", buf);
399  /* Set the optional SRID for extended variant */
400  if ( lwgeom_wkb_needs_srid((LWGEOM*)pt, variant) )
401  {
402  buf = integer_to_wkb_buf(pt->srid, buf, variant);
403  LWDEBUGF(4, "SRID set, buf = %p", buf);
404  }
405  /* Set the coordinates */
406  buf = ptarray_to_wkb_buf(pt->point, buf, variant | WKB_NO_NPOINTS);
407  LWDEBUGF(4, "Pointarray set, buf = %p", buf);
408  return buf;
409 }
static int lwgeom_wkb_needs_srid(const LWGEOM *geom, uint8_t variant)
Definition: lwout_wkb.c:47
static uint32_t lwgeom_wkb_type(const LWGEOM *geom, uint8_t variant)
Definition: lwout_wkb.c:66
POINTARRAY * point
Definition: liblwgeom.h:367
static uint8_t * integer_to_wkb_buf(const int ival, uint8_t *buf, uint8_t variant)
Definition: lwout_wkb.c:180
int32_t srid
Definition: liblwgeom.h:366
static uint8_t * ptarray_to_wkb_buf(const POINTARRAY *pa, uint8_t *buf, uint8_t variant)
Definition: lwout_wkb.c:332
#define WKB_NO_NPOINTS
Definition: liblwgeom.h:1773
static uint8_t * endian_to_wkb_buf(uint8_t *buf, uint8_t variant)
Definition: lwout_wkb.c:148
#define LWDEBUGF(level, msg,...)
Definition: lwgeom_log.h:55

Here is the call graph for this function:

Here is the caller graph for this function: