PostGIS  3.4.0dev-r@@SVN_REVISION@@

◆ do_median_dims_check()

static void do_median_dims_check ( char *  wkt,
int  expected_dims 
)
static

Definition at line 1375 of file cu_algorithm.c.

1376 {
1378  LWPOINT* result = lwgeom_median(g, 1e-8, 100, LW_FALSE);
1379 
1380  CU_ASSERT_EQUAL(expected_dims, lwgeom_ndims((LWGEOM*) result));
1381 
1382  lwgeom_free(g);
1384 }
char result[OUT_DOUBLE_BUFFER_SIZE]
Definition: cu_print.c:262
#define LW_FALSE
Definition: liblwgeom.h:94
int lwgeom_ndims(const LWGEOM *geom)
Return the number of dimensions (2, 3, 4) in a geometry.
Definition: lwgeom.c:955
void lwpoint_free(LWPOINT *pt)
Definition: lwpoint.c:213
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1155
#define LW_PARSER_CHECK_NONE
Definition: liblwgeom.h:2114
LWGEOM * lwgeom_from_wkt(const char *wkt, const char check)
Definition: lwin_wkt.c:905
LWPOINT * lwgeom_median(const LWGEOM *g, double tol, uint32_t maxiter, char fail_if_not_converged)

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

Referenced by test_median_handles_3d_correctly().

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