PostGIS  2.2.8dev-r@@SVN_REVISION@@

◆ endian_to_wkb_buf()

static uint8_t* endian_to_wkb_buf ( uint8_t *  buf,
uint8_t  variant 
)
static

Definition at line 150 of file lwout_wkb.c.

References WKB_HEX, and WKB_NDR.

Referenced by empty_to_wkb_buf(), lwcollection_to_wkb_buf(), lwline_to_wkb_buf(), lwpoint_to_wkb_buf(), lwpoly_to_wkb_buf(), and lwtriangle_to_wkb_buf().

151 {
152  if ( variant & WKB_HEX )
153  {
154  buf[0] = '0';
155  buf[1] = ((variant & WKB_NDR) ? '1' : '0');
156  return buf + 2;
157  }
158  else
159  {
160  buf[0] = ((variant & WKB_NDR) ? 1 : 0);
161  return buf + 1;
162  }
163 }
uint8_t variant
Definition: cu_in_twkb.c:26
#define WKB_NDR
Definition: liblwgeom.h:1933
#define WKB_HEX
Definition: liblwgeom.h:1935
Here is the caller graph for this function: