PostGIS  2.2.8dev-r@@SVN_REVISION@@

◆ lwline_to_wkt_sb()

static void lwline_to_wkt_sb ( const LWLINE line,
stringbuffer_t sb,
int  precision,
uint8_t  variant 

Definition at line 136 of file lwout_wkt.c.

References dimension_qualifiers_to_wkt_sb(), empty_to_wkt_sb(), lwline_is_empty(), LWLINE::points, ptarray_to_wkt_sb(), stringbuffer_append(), and WKT_NO_TYPE.

Referenced by lwcompound_to_wkt_sb(), lwcurvepoly_to_wkt_sb(), lwgeom_to_wkt_sb(), lwmcurve_to_wkt_sb(), and lwmline_to_wkt_sb().

137 {
138  if ( ! (variant & WKT_NO_TYPE) )
139  {
140  stringbuffer_append(sb, "LINESTRING"); /* "LINESTRING" */
142  }
143  if ( lwline_is_empty(line) )
144  {
145  empty_to_wkt_sb(sb);
146  return;
147  }
150 }
uint8_t variant
Definition: cu_in_twkb.c:26
static void dimension_qualifiers_to_wkt_sb(const LWGEOM *geom, stringbuffer_t *sb, uint8_t variant)
Definition: lwout_wkt.c:25
uint8_t precision
Definition: cu_in_twkb.c:25
#define WKT_NO_TYPE
Well-Known Text (WKT) Output Variant Types.
static void ptarray_to_wkt_sb(const POINTARRAY *ptarray, stringbuffer_t *sb, int precision, uint8_t variant)
Definition: lwout_wkt.c:69
static void empty_to_wkt_sb(stringbuffer_t *sb)
Definition: lwout_wkt.c:55
int lwline_is_empty(const LWLINE *line)
Definition: lwline.c:496
void stringbuffer_append(stringbuffer_t *s, const char *a)
Append the specified string to the stringbuffer_t.
Definition: stringbuffer.c:127
Definition: liblwgeom.h:406
Here is the call graph for this function:
Here is the caller graph for this function: