PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ do_test_chaikin()

static void do_test_chaikin ( char *  geom_txt,
char *  expected,
int  n_iterations,
int  preserve_end_points 
)
static

Definition at line 21 of file cu_chaikin.c.

22{
23 LWGEOM *geom_in, *geom_out;
24 char *out_txt;
25 geom_in = lwgeom_from_wkt(geom_txt, LW_PARSER_CHECK_NONE);
26 geom_out = lwgeom_chaikin(geom_in, n_iterations, preserve_end_points);
27 out_txt = lwgeom_to_wkt(geom_out, WKT_EXTENDED, 3, NULL);
28 if(strcmp(expected, out_txt))
29 printf("%s is not equal to %s\n", expected, out_txt);
30 ASSERT_STRING_EQUAL(expected, out_txt);
31 lwfree(out_txt);
32 lwgeom_free(geom_in);
33 lwgeom_free(geom_out);
34 return;
35}
#define ASSERT_STRING_EQUAL(o, e)
void lwgeom_free(LWGEOM *geom)
Definition lwgeom.c:1246
#define LW_PARSER_CHECK_NONE
Definition liblwgeom.h:2149
#define WKT_EXTENDED
Definition liblwgeom.h:2221
char * lwgeom_to_wkt(const LWGEOM *geom, uint8_t variant, int precision, size_t *size_out)
WKT emitter function.
Definition lwout_wkt.c:708
void lwfree(void *mem)
Definition lwutil.c:248
LWGEOM * lwgeom_from_wkt(const char *wkt, const char check)
Definition lwin_wkt.c:940
LWGEOM * lwgeom_chaikin(const LWGEOM *igeom, int n_iterations, int preserve_endpoint)
Definition lwchaikins.c:182

References ASSERT_STRING_EQUAL, LW_PARSER_CHECK_NONE, lwfree(), lwgeom_chaikin(), lwgeom_free(), lwgeom_from_wkt(), lwgeom_to_wkt(), and WKT_EXTENDED.

Referenced by do_test_chaikin_lines(), and do_test_chaikin_polygons().

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