PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ 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  CU_ASSERT_STRING_EQUAL(expected, out_txt)
31  lwfree(out_txt);
32  lwgeom_free(geom_in);
33  lwgeom_free(geom_out);
34  return;
35 }
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1144
#define LW_PARSER_CHECK_NONE
Definition: liblwgeom.h:2005
#define WKT_EXTENDED
Definition: liblwgeom.h:2077
LWGEOM * lwgeom_chaikin(const LWGEOM *igeom, int n_iterations, int preserve_endpoint)
Definition: lwchaikins.c:182
void lwfree(void *mem)
Definition: lwutil.c:244
char * lwgeom_to_wkt(const LWGEOM *geom, uint8_t variant, int precision, size_t *size_out)
WKT emitter function.
Definition: lwout_wkt.c:676
LWGEOM * lwgeom_from_wkt(const char *wkt, const char check)
Definition: lwin_wkt.c:904

References 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: