14 #include "CUnit/Basic.h"
38 exp_wkt =
"GEOMETRYCOLLECTION(POLYGON((5 5,20 0,10 0,5 5)))";
39 if (strcmp(wkt, exp_wkt))
40 fprintf(stderr,
"\nExp: %s\nObt: %s\n", exp_wkt, wkt);
42 CU_ASSERT_STRING_EQUAL(wkt, exp_wkt);
74 CU_ASSERT_TRUE(
gbox_same(clipping_extent, output_extent));
112 CU_pSuite suite = CU_add_suite(
"triangulate", NULL, NULL);
static void test_lwgeom_voronoi_diagram(void)
void triangulate_suite_setup(void)
static void test_lwgeom_voronoi_diagram_expected_empty(void)
static void test_lwgeom_voronoi_diagram_custom_envelope(void)
static void assert_empty_diagram(char *wkt, double tolerance)
static void test_lwgeom_delaunay_triangulation(void)
int gbox_same(const GBOX *g1, const GBOX *g2)
Check if 2 given Gbox are the same.
void cu_error_msg_reset()
#define PG_ADD_TEST(suite, testfunc)
LWGEOM * lwgeom_delaunay_triangulation(const LWGEOM *geom, double tolerance, int32_t edgeOnly)
Take vertices of a geometry and build a delaunay triangulation on them.
void lwgeom_free(LWGEOM *geom)
#define LW_PARSER_CHECK_NONE
char * lwgeom_to_ewkt(const LWGEOM *lwgeom)
Return an alloced string.
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_normalize(const LWGEOM *geom)
int lwgeom_is_collection(const LWGEOM *lwgeom)
Determine whether a LWGEOM can contain sub-geometries or not.
const GBOX * lwgeom_get_bbox(const LWGEOM *lwgeom)
Get a non-empty geometry bounding box, computing and caching it if not already there.
LWGEOM * lwgeom_from_wkt(const char *wkt, const char check)
static uint32_t lwgeom_get_type(const LWGEOM *geom)
Return LWTYPE number.