PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ assert_empty_diagram()

static void assert_empty_diagram ( char *  wkt,
double  tolerance 
)
static

Definition at line 86 of file cu_triangulate.c.

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

Referenced by test_lwgeom_voronoi_diagram_expected_empty().

87 {
89  LWGEOM* out = lwgeom_voronoi_diagram(in, NULL, 0, 0);
90 
91  CU_ASSERT_TRUE(lwgeom_is_collection(out));
92  CU_ASSERT_EQUAL(COLLECTIONTYPE, lwgeom_get_type(out));
93 
94  lwgeom_free(in);
95  lwgeom_free(out);
96 }
int lwgeom_is_collection(const LWGEOM *lwgeom)
Determine whether a LWGEOM can contain sub-geometries or not.
Definition: lwgeom.c:1040
uint32_t lwgeom_get_type(const LWGEOM *geom)
Return LWTYPE number.
Definition: lwgeom.c:878
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1099
LWGEOM * lwgeom_from_wkt(const char *wkt, const char check)
Definition: lwin_wkt.c:904
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.
#define LW_PARSER_CHECK_NONE
Definition: liblwgeom.h:2013
#define COLLECTIONTYPE
Definition: liblwgeom.h:91
Here is the call graph for this function:
Here is the caller graph for this function: