PostGIS  2.1.10dev-r@@SVN_REVISION@@
static void dimension_qualifiers_to_wkt_sb ( const LWGEOM geom,
stringbuffer_t sb,
uint8_t  variant 
)
static

Definition at line 25 of file lwout_wkt.c.

References LWGEOM::flags, FLAGS_GET_M, FLAGS_GET_Z, FLAGS_NDIMS, stringbuffer_append(), 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().

26 {
27 
28  /* Extended WKT: POINTM(0 0 0) */
29 #if 0
30  if ( (variant & WKT_EXTENDED) && ! (variant & WKT_IS_CHILD) && FLAGS_GET_M(geom->flags) && (!FLAGS_GET_Z(geom->flags)) )
31 #else
32  if ( (variant & WKT_EXTENDED) && FLAGS_GET_M(geom->flags) && (!FLAGS_GET_Z(geom->flags)) )
33 #endif
34  {
35  stringbuffer_append(sb, "M"); /* "M" */
36  return;
37  }
38 
39  /* ISO WKT: POINT ZM (0 0 0 0) */
40  if ( (variant & WKT_ISO) && (FLAGS_NDIMS(geom->flags) > 2) )
41  {
42  stringbuffer_append(sb, " ");
43  if ( FLAGS_GET_Z(geom->flags) )
44  stringbuffer_append(sb, "Z");
45  if ( FLAGS_GET_M(geom->flags) )
46  stringbuffer_append(sb, "M");
47  stringbuffer_append(sb, " ");
48  }
49 }
uint8_t flags
Definition: liblwgeom.h:353
#define WKT_ISO
Definition: liblwgeom.h:1776
#define WKT_IS_CHILD
#define FLAGS_GET_Z(flags)
Macros for manipulating the 'flags' byte.
Definition: liblwgeom.h:106
void stringbuffer_append(stringbuffer_t *s, const char *a)
Append the specified string to the stringbuffer_t.
Definition: stringbuffer.c:128
#define WKT_EXTENDED
Definition: liblwgeom.h:1778
#define FLAGS_GET_M(flags)
Definition: liblwgeom.h:107
#define FLAGS_NDIMS(flags)
Definition: liblwgeom.h:118

Here is the call graph for this function:

Here is the caller graph for this function: