PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ geom2d_brin_inclusion_merge()

Datum geom2d_brin_inclusion_merge ( PG_FUNCTION_ARGS  )

Definition at line 96 of file brin_2d.c.

97{
98 BOX2DF *box_key = (BOX2DF *) PG_GETARG_POINTER(0);
99 BOX2DF *box_geom = (BOX2DF *) PG_GETARG_POINTER(1);
100
101 /*
102 * Check if the stored bounding box already contains the geometry's one.
103 *
104 * If not, enlarge the stored box2df to make it contains the current
105 * geometry.
106 */
107 if (!box2df_contains(box_key, box_geom))
108 {
109 box_key->xmin = Min(box_key->xmin, box_geom->xmin);
110 box_key->xmax = Max(box_key->xmax, box_geom->xmax);
111 box_key->ymin = Min(box_key->ymin, box_geom->ymin);
112 box_key->ymax = Max(box_key->ymax, box_geom->ymax);
113 }
114
115 PG_RETURN_POINTER(box_key);
116}
bool box2df_contains(const BOX2DF *a, const BOX2DF *b)

References box2df_contains().

Here is the call graph for this function: