PostGIS  3.0.6dev-r@@SVN_REVISION@@

◆ test_lwgeom_voronoi_diagram()

static void test_lwgeom_voronoi_diagram ( void  )
static

Definition at line 47 of file cu_triangulate.c.

48 {
49  LWGEOM *in = lwgeom_from_wkt("MULTIPOINT(4 4, 5 5, 6 6)", LW_PARSER_CHECK_NONE);
50 
51  LWGEOM *out_boundaries = lwgeom_voronoi_diagram(in, NULL, 0, 0);
52  LWGEOM *out_lines = lwgeom_voronoi_diagram(in, NULL, 0, 1);
53 
54  /* For boundaries we get a generic LWCOLLECTION */
55  CU_ASSERT_EQUAL(COLLECTIONTYPE, lwgeom_get_type(out_boundaries));
56  /* For lines we get a MULTILINETYPE */
57  CU_ASSERT_EQUAL(MULTILINETYPE, lwgeom_get_type(out_lines));
58 
59  lwgeom_free(in);
60  lwgeom_free(out_boundaries);
61  lwgeom_free(out_lines);
62 }
#define COLLECTIONTYPE
Definition: liblwgeom.h:122
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1138
#define LW_PARSER_CHECK_NONE
Definition: liblwgeom.h:2060
#define MULTILINETYPE
Definition: liblwgeom.h:120
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.
LWGEOM * lwgeom_from_wkt(const char *wkt, const char check)
Definition: lwin_wkt.c:905
static uint32_t lwgeom_get_type(const LWGEOM *geom)
Return LWTYPE number.
Definition: lwinline.h:135

References COLLECTIONTYPE, LW_PARSER_CHECK_NONE, lwgeom_free(), lwgeom_from_wkt(), lwgeom_get_type(), lwgeom_voronoi_diagram(), and MULTILINETYPE.

Referenced by triangulate_suite_setup().

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