PostGIS  3.7.0dev-r@@SVN_REVISION@@

◆ ST_MMax()

Datum ST_MMax ( PG_FUNCTION_ARGS  )

Definition at line 478 of file lwgeom_box3d.c.

479 {
480  GBOX gbox;
481  GSERIALIZED *gser = PG_GETARG_GSERIALIZED_P(0);
482 
483  if (gserialized_get_gbox_p(gser, &gbox) != LW_TRUE)
484  PG_RETURN_NULL();
485 
486  if (!FLAGS_GET_M(gbox.flags))
487  PG_RETURN_NULL();
488 
489  PG_RETURN_FLOAT8(Max(gbox.mmin, gbox.mmax));
490 }
int gserialized_get_gbox_p(const GSERIALIZED *g, GBOX *gbox)
Read the box from the GSERIALIZED or calculate it if necessary.
Definition: gserialized.c:94
#define FLAGS_GET_M(flags)
Definition: liblwgeom.h:166
#define LW_TRUE
Return types for functions with status returns.
Definition: liblwgeom.h:93
double mmax
Definition: liblwgeom.h:361
double mmin
Definition: liblwgeom.h:360
lwflags_t flags
Definition: liblwgeom.h:353

References GBOX::flags, FLAGS_GET_M, gserialized_get_gbox_p(), LW_TRUE, GBOX::mmax, and GBOX::mmin.

Here is the call graph for this function: