PostGIS  3.4.0dev-r@@SVN_REVISION@@

◆ test_lwgeom_voronoi_diagram()

static void test_lwgeom_voronoi_diagram ( void  )
static

Definition at line 48 of file cu_triangulate.c.

49 {
50  LWGEOM *in = lwgeom_from_wkt("MULTIPOINT(4 4, 5 5, 6 6)", LW_PARSER_CHECK_NONE);
51 
52  LWGEOM *out_boundaries = lwgeom_voronoi_diagram(in, NULL, 0, 0);
53  LWGEOM *out_lines = lwgeom_voronoi_diagram(in, NULL, 0, 1);
54 
55  /* For boundaries we get a generic LWCOLLECTION */
56  CU_ASSERT_EQUAL(COLLECTIONTYPE, lwgeom_get_type(out_boundaries));
57  /* For lines we get a MULTILINETYPE */
58  CU_ASSERT_EQUAL(MULTILINETYPE, lwgeom_get_type(out_lines));
59 
60  lwgeom_free(in);
61  lwgeom_free(out_boundaries);
62  lwgeom_free(out_lines);
63 }
#define COLLECTIONTYPE
Definition: liblwgeom.h:108
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1155
#define LW_PARSER_CHECK_NONE
Definition: liblwgeom.h:2114
#define MULTILINETYPE
Definition: liblwgeom.h:106
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:145

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: