PostGIS  3.0.6dev-r@@SVN_REVISION@@

◆ test_lwgeom_voronoi_diagram_custom_envelope()

static void test_lwgeom_voronoi_diagram_custom_envelope ( void  )
static

Definition at line 65 of file cu_triangulate.c.

66 {
67  LWGEOM *in = lwgeom_from_wkt("MULTIPOINT(4 4, 5 5, 6 6)", LW_PARSER_CHECK_NONE);
68  LWGEOM *for_extent = lwgeom_from_wkt("LINESTRING (-10 -10, 10 10)", LW_PARSER_CHECK_NONE);
69  const GBOX *clipping_extent = lwgeom_get_bbox(for_extent);
70 
71  LWGEOM *out = lwgeom_voronoi_diagram(in, clipping_extent, 0, 0);
72  const GBOX *output_extent = lwgeom_get_bbox(out);
73 
74  CU_ASSERT_TRUE(gbox_same(clipping_extent, output_extent));
75 
76  lwgeom_free(in);
77  lwgeom_free(for_extent);
78  lwgeom_free(out);
79 }
int gbox_same(const GBOX *g1, const GBOX *g2)
Check if 2 given Gbox are the same.
Definition: gbox.c:164
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1138
#define LW_PARSER_CHECK_NONE
Definition: liblwgeom.h:2060
LWGEOM * lwgeom_voronoi_diagram(const LWGEOM *g, const GBOX *env, double tolerance, int output_edges)
Take vertices of a geometry and build the Voronoi diagram.
const GBOX * lwgeom_get_bbox(const LWGEOM *lwgeom)
Get a non-empty geometry bounding box, computing and caching it if not already there.
Definition: lwgeom.c:725
LWGEOM * lwgeom_from_wkt(const char *wkt, const char check)
Definition: lwin_wkt.c:905

References gbox_same(), LW_PARSER_CHECK_NONE, lwgeom_free(), lwgeom_from_wkt(), lwgeom_get_bbox(), and lwgeom_voronoi_diagram().

Referenced by triangulate_suite_setup().

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