PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ test_lwgeom_voronoi_diagram()

static void test_lwgeom_voronoi_diagram ( void  )
static

Definition at line 46 of file cu_triangulate.c.

47 {
48 #if POSTGIS_GEOS_VERSION >= 35
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 #endif /* POSTGIS_GEOS_VERSION >= 35 */
63 }
#define COLLECTIONTYPE
Definition: liblwgeom.h:91
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1144
#define LW_PARSER_CHECK_NONE
Definition: liblwgeom.h:2005
#define MULTILINETYPE
Definition: liblwgeom.h:89
uint32_t lwgeom_get_type(const LWGEOM *geom)
Return LWTYPE number.
Definition: lwgeom.c:923
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:904

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: