PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ dimension_qualifiers_to_wkt_sb()

static void dimension_qualifiers_to_wkt_sb ( const LWGEOM geom,
stringbuffer_t sb,
uint8_t  variant 
)
static

Definition at line 39 of file lwout_wkt.c.

40 {
41 
42  /* Extended WKT: POINTM(0 0 0) */
43 #if 0
44  if ( (variant & WKT_EXTENDED) && ! (variant & WKT_IS_CHILD) && FLAGS_GET_M(geom->flags) && (!FLAGS_GET_Z(geom->flags)) )
45 #else
46  if ( (variant & WKT_EXTENDED) && FLAGS_GET_M(geom->flags) && (!FLAGS_GET_Z(geom->flags)) )
47 #endif
48  {
49  stringbuffer_append(sb, "M"); /* "M" */
50  return;
51  }
52 
53  /* ISO WKT: POINT ZM (0 0 0 0) */
54  if ( (variant & WKT_ISO) && (FLAGS_NDIMS(geom->flags) > 2) )
55  {
56  stringbuffer_append(sb, " ");
57  if ( FLAGS_GET_Z(geom->flags) )
58  stringbuffer_append(sb, "Z");
59  if ( FLAGS_GET_M(geom->flags) )
60  stringbuffer_append(sb, "M");
61  stringbuffer_append(sb, " ");
62  }
63 }
static uint8_t variant
Definition: cu_in_twkb.c:26
#define WKT_EXTENDED
Definition: liblwgeom.h:2077
#define FLAGS_GET_Z(flags)
Macros for manipulating the 'flags' byte.
Definition: liblwgeom.h:140
#define FLAGS_NDIMS(flags)
Definition: liblwgeom.h:152
#define WKT_ISO
Definition: liblwgeom.h:2075
#define FLAGS_GET_M(flags)
Definition: liblwgeom.h:141
#define WKT_IS_CHILD
void stringbuffer_append(stringbuffer_t *s, const char *a)
Append the specified string to the stringbuffer_t.
Definition: stringbuffer.c:134
uint8_t flags
Definition: liblwgeom.h:400

References LWGEOM::flags, FLAGS_GET_M, FLAGS_GET_Z, FLAGS_NDIMS, stringbuffer_append(), variant, WKT_EXTENDED, WKT_IS_CHILD, and WKT_ISO.

Referenced by lwcircstring_to_wkt_sb(), lwcollection_to_wkt_sb(), lwcompound_to_wkt_sb(), lwcurvepoly_to_wkt_sb(), lwline_to_wkt_sb(), lwmcurve_to_wkt_sb(), lwmline_to_wkt_sb(), lwmpoint_to_wkt_sb(), lwmpoly_to_wkt_sb(), lwmsurface_to_wkt_sb(), lwpoint_to_wkt_sb(), lwpoly_to_wkt_sb(), lwpsurface_to_wkt_sb(), lwtin_to_wkt_sb(), and lwtriangle_to_wkt_sb().

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