PostGIS  3.0.6dev-r@@SVN_REVISION@@

◆ gserialized_ndims()

int gserialized_ndims ( const GSERIALIZED g)

Return the number of dimensions (2, 3, 4) in a geometry.

Definition at line 207 of file gserialized.c.

208 {
209  if (GFLAGS_GET_VERSION(g->gflags))
210  return gserialized2_ndims(g);
211  else
212  return gserialized1_ndims(g);
213 }
int gserialized1_ndims(const GSERIALIZED *gser)
Return the number of dimensions (2, 3, 4) in a geometry.
Definition: gserialized1.c:104
int gserialized2_ndims(const GSERIALIZED *g)
Return the number of dimensions (2, 3, 4) in a geometry.
Definition: gserialized2.c:166
#define GFLAGS_GET_VERSION(gflags)
Definition: gserialized.c:12
uint8_t gflags
Definition: liblwgeom.h:432

References GSERIALIZED::gflags, GFLAGS_GET_VERSION, gserialized1_ndims(), and gserialized2_ndims().

Referenced by LWGEOM_force_2d(), LWGEOM_force_3dm(), LWGEOM_force_3dz(), LWGEOM_force_4d(), and LWGEOM_ndims().

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