PostGIS 3.0.6dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ lwmpoint_to_wkt_sb()

static void lwmpoint_to_wkt_sb ( const LWMPOINT mpoint,
stringbuffer_t sb,
int  precision,
uint8_t  variant 
)
static

Definition at line 222 of file lwout_wkt.c.

223{
224 uint32_t i = 0;
225 if ( ! (variant & WKT_NO_TYPE) )
226 {
227 stringbuffer_append(sb, "MULTIPOINT"); /* "MULTIPOINT" */
229 }
230 if ( mpoint->ngeoms < 1 )
231 {
232 empty_to_wkt_sb(sb);
233 return;
234 }
235 stringbuffer_append(sb, "(");
236 variant = variant | WKT_IS_CHILD; /* Inform the sub-geometries they are childre */
237 for ( i = 0; i < mpoint->ngeoms; i++ )
238 {
239 if ( i > 0 )
240 stringbuffer_append(sb, ",");
241 /* We don't want type strings or parens on our subgeoms */
243 }
244 stringbuffer_append(sb, ")");
245}
static uint8_t variant
Definition cu_in_twkb.c:26
static uint8_t precision
Definition cu_in_twkb.c:25
#define WKT_NO_PARENS
#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 lwpoint_to_wkt_sb(const LWPOINT *pt, stringbuffer_t *sb, int precision, uint8_t variant)
Definition lwout_wkt.c:136
static void stringbuffer_append(stringbuffer_t *s, const char *a)
Append the specified string to the stringbuffer_t.
uint32_t ngeoms
Definition liblwgeom.h:524
LWPOINT ** geoms
Definition liblwgeom.h:519

References dimension_qualifiers_to_wkt_sb(), empty_to_wkt_sb(), LWMPOINT::geoms, lwpoint_to_wkt_sb(), LWMPOINT::ngeoms, precision, stringbuffer_append(), variant, WKT_IS_CHILD, WKT_NO_PARENS, 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: