PostGIS  2.5.7dev-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 #if POSTGIS_GEOS_VERSION >= 35
68  LWGEOM* in = lwgeom_from_wkt("MULTIPOINT(4 4, 5 5, 6 6)", LW_PARSER_CHECK_NONE);
69  LWGEOM* for_extent = lwgeom_from_wkt("LINESTRING (-10 -10, 10 10)", LW_PARSER_CHECK_NONE);
70  const GBOX* clipping_extent = lwgeom_get_bbox(for_extent);
71 
72  LWGEOM* out = lwgeom_voronoi_diagram(in, clipping_extent, 0, 0);
73  const GBOX* output_extent = lwgeom_get_bbox(out);
74 
75  CU_ASSERT_TRUE(gbox_same(clipping_extent, output_extent));
76 
77  lwgeom_free(in);
78  lwgeom_free(for_extent);
79  lwgeom_free(out);
80 #endif /* POSTGIS_GEOS_VERSION >= 35 */
81 }
int gbox_same(const GBOX *g1, const GBOX *g2)
Check if 2 given Gbox are the same.
Definition: g_box.c:171
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1144
#define LW_PARSER_CHECK_NONE
Definition: liblwgeom.h:2005
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:734
LWGEOM * lwgeom_from_wkt(const char *wkt, const char check)
Definition: lwin_wkt.c:904

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: