PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ wkt_dimensionality()

static uint8_t wkt_dimensionality ( char *  dimensionality)
static

Definition at line 75 of file lwin_wkt.c.

76 {
77  size_t i = 0;
78  uint8_t flags = 0;
79 
80  if( ! dimensionality )
81  return flags;
82 
83  /* If there's an explicit dimensionality, we use that */
84  for( i = 0; i < strlen(dimensionality); i++ )
85  {
86  if( (dimensionality[i] == 'Z') || (dimensionality[i] == 'z') )
87  FLAGS_SET_Z(flags,1);
88  else if( (dimensionality[i] == 'M') || (dimensionality[i] == 'm') )
89  FLAGS_SET_M(flags,1);
90  /* only a space is accepted in between */
91  else if( ! isspace(dimensionality[i]) ) break;
92  }
93  return flags;
94 }
#define FLAGS_SET_M(flags, value)
Definition: liblwgeom.h:147
#define FLAGS_SET_Z(flags, value)
Definition: liblwgeom.h:146
unsigned char uint8_t
Definition: uthash.h:79

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().

Here is the caller graph for this function: