PostGIS  2.2.7dev-r@@SVN_REVISION@@
static void lwpsurface_to_wkt_sb ( const LWPSURFACE psurf,
stringbuffer_t sb,
int  precision,
uint8_t  variant 
)
static

Definition at line 554 of file lwout_wkt.c.

References dimension_qualifiers_to_wkt_sb(), empty_to_wkt_sb(), LWPSURFACE::geoms, lwpoly_to_wkt_sb(), LWPSURFACE::ngeoms, stringbuffer_append(), WKT_IS_CHILD, and WKT_NO_TYPE.

Referenced by lwgeom_to_wkt_sb().

555 {
556  int i = 0;
557 
558  if ( ! (variant & WKT_NO_TYPE) )
559  {
560  stringbuffer_append(sb, "POLYHEDRALSURFACE"); /* "POLYHEDRALSURFACE" */
562  }
563  if ( psurf->ngeoms < 1 )
564  {
565  empty_to_wkt_sb(sb);
566  return;
567  }
568 
569  variant = variant | WKT_IS_CHILD; /* Inform the sub-geometries they are childre */
570 
571  stringbuffer_append(sb, "(");
572  for ( i = 0; i < psurf->ngeoms; i++ )
573  {
574  if ( i > 0 )
575  stringbuffer_append(sb, ",");
576  /* We don't want type strings on our subgeoms */
577  lwpoly_to_wkt_sb(psurf->geoms[i], sb, precision, variant | WKT_NO_TYPE );
578  }
579  stringbuffer_append(sb, ")");
580 }
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
LWPOLY ** geoms
Definition: liblwgeom.h:558
static void lwpoly_to_wkt_sb(const LWPOLY *poly, stringbuffer_t *sb, int precision, uint8_t variant)
Definition: lwout_wkt.c:155
#define WKT_IS_CHILD
uint8_t precision
Definition: cu_in_twkb.c:25
#define WKT_NO_TYPE
Well-Known Text (WKT) Output Variant Types.
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:127
int ngeoms
Definition: liblwgeom.h:556

Here is the call graph for this function:

Here is the caller graph for this function: