PostGIS  2.3.7dev-r@@SVN_REVISION@@
static void do_median_dims_check ( char *  wkt,
int  expected_dims 

Definition at line 986 of file cu_algorithm.c.

References LW_FALSE, LW_PARSER_CHECK_NONE, lwgeom_free(), lwgeom_from_wkt(), lwgeom_median(), lwgeom_ndims(), and lwpoint_free().

Referenced by test_median_handles_3d_correctly().

987 {
989  LWPOINT* result = lwgeom_median(g, 1e-8, 100, LW_FALSE);
991  CU_ASSERT_EQUAL(expected_dims, lwgeom_ndims((LWGEOM*) result));
993  lwgeom_free(g);
994  lwpoint_free(result);
995 }
void lwpoint_free(LWPOINT *pt)
Definition: lwpoint.c:195
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1063
LWGEOM * lwgeom_from_wkt(const char *wkt, const char check)
Definition: lwin_wkt.c:904
int lwgeom_ndims(const LWGEOM *geom)
Return the number of dimensions (2, 3, 4) in a geometry.
Definition: lwgeom.c:863
Definition: liblwgeom.h:1985
#define LW_FALSE
Definition: liblwgeom.h:76
LWPOINT * lwgeom_median(const LWGEOM *g, double tol, uint32_t maxiter, char fail_if_not_converged)

Here is the call graph for this function:

Here is the caller graph for this function: