PostGIS  2.1.10dev-r@@SVN_REVISION@@
static uint8_t* lwline_to_wkb_buf ( const LWLINE line,
uint8_t *  buf,
uint8_t  variant 
)
static

Definition at line 428 of file lwout_wkb.c.

References endian_to_wkb_buf(), integer_to_wkb_buf(), lwgeom_wkb_needs_srid(), lwgeom_wkb_type(), LWLINE::points, ptarray_to_wkb_buf(), and LWLINE::srid.

Referenced by lwgeom_to_wkb_buf().

429 {
430  /* Set the endian flag */
431  buf = endian_to_wkb_buf(buf, variant);
432  /* Set the geometry type */
433  buf = integer_to_wkb_buf(lwgeom_wkb_type((LWGEOM*)line, variant), buf, variant);
434  /* Set the optional SRID for extended variant */
435  if ( lwgeom_wkb_needs_srid((LWGEOM*)line, variant) )
436  buf = integer_to_wkb_buf(line->srid, buf, variant);
437  /* Set the coordinates */
438  buf = ptarray_to_wkb_buf(line->points, buf, variant);
439  return buf;
440 }
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
int32_t srid
Definition: liblwgeom.h:377
static uint8_t * integer_to_wkb_buf(const int ival, uint8_t *buf, uint8_t variant)
Definition: lwout_wkb.c:180
static uint8_t * ptarray_to_wkb_buf(const POINTARRAY *pa, uint8_t *buf, uint8_t variant)
Definition: lwout_wkb.c:332
static uint8_t * endian_to_wkb_buf(uint8_t *buf, uint8_t variant)
Definition: lwout_wkb.c:148
POINTARRAY * points
Definition: liblwgeom.h:378

Here is the call graph for this function:

Here is the caller graph for this function: