51 {
"GEOMETRYZM", 0, 1, 1 },
52 {
"GEOMETRYZ", 0, 1, 0 },
53 {
"GEOMETRYM", 0, 0, 1 },
54 {
"GEOMETRY", 0, 0, 0 },
127 #define GEOMTYPE_STRUCT_ARRAY_LEN (sizeof geomtype_struct_array/sizeof(struct geomtype_struct)) 136 const char dumb_upper_map[128] =
"................................................0123456789.......ABCDEFGHIJKLMNOPQRSTUVWXYZ......ABCDEFGHIJKLMNOPQRSTUVWXYZ.....";
140 if ( in < 0 || in > 127 )
166 int tmpstartpos, tmpendpos;
181 for (i = 0; i < strlen(str); i++)
190 tmpendpos = strlen(str) - 1;
191 for (i = strlen(str) - 1; i >= 0; i--)
201 tmpstr =
lwalloc(tmpendpos - tmpstartpos + 2);
202 for (i = tmpstartpos; i <= tmpendpos; i++)
206 tmpstr[i - tmpstartpos] =
'\0';
211 if (!strcmp(tmpstr, geomtype_struct_array[i].
typename))
213 *type = geomtype_struct_array[i].
type;
214 *z = geomtype_struct_array[i].
z;
215 *m = geomtype_struct_array[i].
m;
int geometry_type_from_string(const char *str, uint8_t *type, int *z, int *m)
Calculate type integer and dimensional flags from string input.
#define POLYHEDRALSURFACETYPE
#define FLAGS_SET_GEODETIC(flags, value)
#define FLAGS_SET_Z(flags, value)
const char dumb_upper_map[128]
struct geomtype_struct geomtype_struct_array[]
uint8_t gflags(int hasz, int hasm, int geodetic)
Construct a new flags char.
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
void * lwalloc(size_t size)
static char dump_toupper(int in)
#define GEOMTYPE_STRUCT_ARRAY_LEN
#define FLAGS_SET_M(flags, value)