PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ lwmline_to_wkt_sb()

static void lwmline_to_wkt_sb ( const LWMLINE mline,
stringbuffer_t sb,
int  precision,
uint8_t  variant 
)
static

Definition at line 250 of file lwout_wkt.c.

251 {
252  uint32_t i = 0;
253 
254  if ( ! (variant & WKT_NO_TYPE) )
255  {
256  stringbuffer_append(sb, "MULTILINESTRING"); /* "MULTILINESTRING" */
258  }
259  if ( mline->ngeoms < 1 )
260  {
261  empty_to_wkt_sb(sb);
262  return;
263  }
264 
265  stringbuffer_append(sb, "(");
266  variant = variant | WKT_IS_CHILD; /* Inform the sub-geometries they are childre */
267  for ( i = 0; i < mline->ngeoms; i++ )
268  {
269  if ( i > 0 )
270  stringbuffer_append(sb, ",");
271  /* We don't want type strings on our subgeoms */
272  lwline_to_wkt_sb(mline->geoms[i], sb, precision, variant | WKT_NO_TYPE );
273  }
274  stringbuffer_append(sb, ")");
275 }
static uint8_t variant
Definition: cu_in_twkb.c:26
static uint8_t precision
Definition: cu_in_twkb.c:25
#define WKT_IS_CHILD
#define WKT_NO_TYPE
Well-Known Text (WKT) Output Variant Types.
static void dimension_qualifiers_to_wkt_sb(const LWGEOM *geom, stringbuffer_t *sb, uint8_t variant)
Definition: lwout_wkt.c:39
static void empty_to_wkt_sb(stringbuffer_t *sb)
Definition: lwout_wkt.c:69
static void lwline_to_wkt_sb(const LWLINE *line, stringbuffer_t *sb, int precision, uint8_t variant)
Definition: lwout_wkt.c:156
void stringbuffer_append(stringbuffer_t *s, const char *a)
Append the specified string to the stringbuffer_t.
Definition: stringbuffer.c:134
LWLINE ** geoms
Definition: liblwgeom.h:486
uint32_t ngeoms
Definition: liblwgeom.h:484
unsigned int uint32_t
Definition: uthash.h:78

References dimension_qualifiers_to_wkt_sb(), empty_to_wkt_sb(), LWMLINE::geoms, lwline_to_wkt_sb(), LWMLINE::ngeoms, precision, stringbuffer_append(), variant, WKT_IS_CHILD, and WKT_NO_TYPE.

Referenced by lwgeom_to_wkt_sb().

Here is the call graph for this function:
Here is the caller graph for this function: