PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ gbox_same()

int gbox_same ( const GBOX g1,
const GBOX g2 
)

Check if 2 given Gbox are the same.

Definition at line 171 of file g_box.c.

172 {
173  if (FLAGS_GET_ZM(g1->flags) != FLAGS_GET_ZM(g2->flags))
174  return LW_FALSE;
175 
176  if (!gbox_same_2d(g1, g2)) return LW_FALSE;
177 
178  if (FLAGS_GET_Z(g1->flags) && (g1->zmin != g2->zmin || g1->zmax != g2->zmax))
179  return LW_FALSE;
180  if (FLAGS_GET_M(g1->flags) && (g1->mmin != g2->mmin || g1->mmax != g2->mmax))
181  return LW_FALSE;
182 
183  return LW_TRUE;
184 }
int gbox_same_2d(const GBOX *g1, const GBOX *g2)
Check if 2 given GBOX are the same in x and y.
Definition: g_box.c:186
#define LW_FALSE
Definition: liblwgeom.h:77
#define FLAGS_GET_Z(flags)
Macros for manipulating the 'flags' byte.
Definition: liblwgeom.h:140
#define FLAGS_GET_M(flags)
Definition: liblwgeom.h:141
#define FLAGS_GET_ZM(flags)
Definition: liblwgeom.h:153
#define LW_TRUE
Return types for functions with status returns.
Definition: liblwgeom.h:76
double zmax
Definition: liblwgeom.h:300
double zmin
Definition: liblwgeom.h:299
double mmax
Definition: liblwgeom.h:302
double mmin
Definition: liblwgeom.h:301
uint8_t flags
Definition: liblwgeom.h:294

References GBOX::flags, FLAGS_GET_M, FLAGS_GET_Z, FLAGS_GET_ZM, gbox_same_2d(), LW_FALSE, LW_TRUE, GBOX::mmax, GBOX::mmin, GBOX::zmax, and GBOX::zmin.

Referenced by _lwt_FindFaceContainingRing(), lwgeom_same(), lwt_ChangeEdgeGeom(), test_gserialized_peek_gbox_p_gets_correct_box(), test_lwgeom_from_gserialized(), and test_lwgeom_voronoi_diagram_custom_envelope().

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