PostGIS  2.1.10dev-r@@SVN_REVISION@@
static void lwtriangle_to_wkt_sb ( const LWTRIANGLE tri,
stringbuffer_t sb,
int  precision,
uint8_t  variant 
)
static

Definition at line 504 of file lwout_wkt.c.

References dimension_qualifiers_to_wkt_sb(), empty_to_wkt_sb(), lwtriangle_is_empty(), LWTRIANGLE::points, ptarray_to_wkt_sb(), stringbuffer_append(), and WKT_NO_TYPE.

Referenced by lwgeom_to_wkt_sb(), and lwtin_to_wkt_sb().

505 {
506  if ( ! (variant & WKT_NO_TYPE) )
507  {
508  stringbuffer_append(sb, "TRIANGLE"); /* "TRIANGLE" */
509  dimension_qualifiers_to_wkt_sb((LWGEOM*)tri, sb, variant);
510  }
511  if ( lwtriangle_is_empty(tri) )
512  {
513  empty_to_wkt_sb(sb);
514  return;
515  }
516 
517  stringbuffer_append(sb, "("); /* Triangles have extraneous brackets */
518  ptarray_to_wkt_sb(tri->points, sb, precision, variant);
519  stringbuffer_append(sb, ")");
520 }
POINTARRAY * points
Definition: liblwgeom.h:389
static void dimension_qualifiers_to_wkt_sb(const LWGEOM *geom, stringbuffer_t *sb, uint8_t variant)
Definition: lwout_wkt.c:25
int lwtriangle_is_empty(const LWTRIANGLE *triangle)
Definition: lwtriangle.c:162
#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
void stringbuffer_append(stringbuffer_t *s, const char *a)
Append the specified string to the stringbuffer_t.
Definition: stringbuffer.c:128

Here is the call graph for this function:

Here is the caller graph for this function: