PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ endian_to_wkb_buf()

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

Definition at line 164 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().

165 {
166  if ( variant & WKB_HEX )
167  {
168  buf[0] = '0';
169  buf[1] = ((variant & WKB_NDR) ? '1' : '0');
170  return buf + 2;
171  }
172  else
173  {
174  buf[0] = ((variant & WKB_NDR) ? 1 : 0);
175  return buf + 1;
176  }
177 }
uint8_t variant
Definition: cu_in_twkb.c:26
#define WKB_NDR
Definition: liblwgeom.h:2077
#define WKB_HEX
Definition: liblwgeom.h:2079
Here is the caller graph for this function: