PostGIS  2.2.8dev-r@@SVN_REVISION@@

◆ wkt_dimensionality()

static uint8_t wkt_dimensionality ( char *  dimensionality)
static

Definition at line 61 of file lwin_wkt.c.

References FLAGS_SET_M, and FLAGS_SET_Z.

Referenced by wkt_parser_circularstring_new(), wkt_parser_collection_finalize(), wkt_parser_curvepolygon_finalize(), wkt_parser_linestring_new(), wkt_parser_point_new(), wkt_parser_polygon_finalize(), and wkt_parser_triangle_new().

62 {
63  int i = 0;
64  uint8_t flags = 0;
65 
66  if( ! dimensionality )
67  return flags;
68 
69  /* If there's an explicit dimensionality, we use that */
70  for( i = 0; i < strlen(dimensionality); i++ )
71  {
72  if( (dimensionality[i] == 'Z') || (dimensionality[i] == 'z') )
73  FLAGS_SET_Z(flags,1);
74  else if( (dimensionality[i] == 'M') || (dimensionality[i] == 'm') )
75  FLAGS_SET_M(flags,1);
76  /* only a space is accepted in between */
77  else if( ! isspace(dimensionality[i]) ) break;
78  }
79  return flags;
80 }
#define FLAGS_SET_Z(flags, value)
Definition: liblwgeom.h:130
#define FLAGS_SET_M(flags, value)
Definition: liblwgeom.h:131
Here is the caller graph for this function: