PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ do_test_filterm()

static void do_test_filterm ( char *  geom_txt,
char *  expected,
double  min,
double  max 
)
static

Definition at line 21 of file cu_filterm.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_filter_m(geom_in,min, max, 1);
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
LWGEOM * lwgeom_filter_m(LWGEOM *geom, double min, double max, int returnm)
Definition: lwmval.c:221
#define WKT_EXTENDED
Definition: liblwgeom.h:2077
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_filter_m(), lwgeom_free(), lwgeom_from_wkt(), lwgeom_to_wkt(), and WKT_EXTENDED.

Referenced by do_test_filterm_collections(), and do_test_filterm_single_geometries().

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