PostGIS  2.3.8dev-r@@SVN_REVISION@@

◆ lwgeom_ndims()

int lwgeom_ndims ( const LWGEOM geom)

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

Definition at line 863 of file lwgeom.c.

References LWGEOM::flags, and FLAGS_NDIMS.

Referenced by do_median_dims_check(), lwgeom_write_to_buffer(), RASTER_asRaster(), RASTER_clip(), RASTER_nearestValue(), and RASTER_setPixelValuesGeomval().

864 {
865  if ( ! geom ) return 0;
866  return FLAGS_NDIMS(geom->flags);
867 }
uint8_t flags
Definition: liblwgeom.h:396
#define FLAGS_NDIMS(flags)
Definition: liblwgeom.h:151
Here is the caller graph for this function: