PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ lwpsurface_to_wkt_sb()

static void lwpsurface_to_wkt_sb ( const LWPSURFACE psurf,
stringbuffer_t sb,
int  precision,
uint8_t  variant 
)
static

Definition at line 574 of file lwout_wkt.c.

575 {
576  uint32_t i = 0;
577 
578  if ( ! (variant & WKT_NO_TYPE) )
579  {
580  stringbuffer_append(sb, "POLYHEDRALSURFACE"); /* "POLYHEDRALSURFACE" */
582  }
583  if ( psurf->ngeoms < 1 )
584  {
585  empty_to_wkt_sb(sb);
586  return;
587  }
588 
589  variant = variant | WKT_IS_CHILD; /* Inform the sub-geometries they are childre */
590 
591  stringbuffer_append(sb, "(");
592  for ( i = 0; i < psurf->ngeoms; i++ )
593  {
594  if ( i > 0 )
595  stringbuffer_append(sb, ",");
596  /* We don't want type strings on our subgeoms */
597  lwpoly_to_wkt_sb(psurf->geoms[i], sb, precision, variant | WKT_NO_TYPE );
598  }
599  stringbuffer_append(sb, ")");
600 }
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 lwpoly_to_wkt_sb(const LWPOLY *poly, stringbuffer_t *sb, int precision, uint8_t variant)
Definition: lwout_wkt.c:175
void stringbuffer_append(stringbuffer_t *s, const char *a)
Append the specified string to the stringbuffer_t.
Definition: stringbuffer.c:134
LWPOLY ** geoms
Definition: liblwgeom.h:577
uint32_t ngeoms
Definition: liblwgeom.h:575
unsigned int uint32_t
Definition: uthash.h:78

References dimension_qualifiers_to_wkt_sb(), empty_to_wkt_sb(), LWPSURFACE::geoms, lwpoly_to_wkt_sb(), LWPSURFACE::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: