PostGIS  3.4.0dev-r@@SVN_REVISION@@

◆ LWGEOM_to_BOX2DF()

Datum LWGEOM_to_BOX2DF ( PG_FUNCTION_ARGS  )

Definition at line 154 of file lwgeom_box.c.

155 {
156  GBOX gbox;
157  if (gserialized_datum_get_gbox_p(PG_GETARG_DATUM(0), &gbox) == LW_FAILURE)
158  PG_RETURN_NULL();
159 
160  /* Strip out higher dimensions */
161  FLAGS_SET_Z(gbox.flags, 0);
162  FLAGS_SET_M(gbox.flags, 0);
163  PG_RETURN_POINTER(gbox_copy(&gbox));
164 }
GBOX * gbox_copy(const GBOX *box)
Return a copy of the GBOX, based on dimensionality of flags.
Definition: gbox.c:426
int gserialized_datum_get_gbox_p(Datum gsdatum, GBOX *gbox)
Given a GSERIALIZED datum, as quickly as possible (peaking into the top of the memory) return the gbo...
#define LW_FAILURE
Definition: liblwgeom.h:96
#define FLAGS_SET_M(flags, value)
Definition: liblwgeom.h:173
#define FLAGS_SET_Z(flags, value)
Definition: liblwgeom.h:172
lwflags_t flags
Definition: liblwgeom.h:353

References GBOX::flags, FLAGS_SET_M, FLAGS_SET_Z, gbox_copy(), gserialized_datum_get_gbox_p(), and LW_FAILURE.

Here is the call graph for this function: