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

◆ test_force_4d()

static void test_force_4d ( void  )
static

Definition at line 91 of file cu_force_dims.c.

92{
93 LWGEOM *geom;
94 LWGEOM *geom4d;
95 char *wkt_out;
96
97 geom = lwgeom_from_wkt("POINT(1 2)", LW_PARSER_CHECK_NONE);
98 geom4d = lwgeom_force_4d(geom, 3, 4);
99 wkt_out = lwgeom_to_ewkt(geom4d);
100 ASSERT_STRING_EQUAL("POINT(1 2 3 4)", wkt_out);
101 lwgeom_free(geom);
102 lwgeom_free(geom4d);
103 lwfree(wkt_out);
104}
#define ASSERT_STRING_EQUAL(o, e)
void lwgeom_free(LWGEOM *geom)
Definition lwgeom.c:1246
#define LW_PARSER_CHECK_NONE
Definition liblwgeom.h:2149
char * lwgeom_to_ewkt(const LWGEOM *lwgeom)
Return an allocated string.
Definition lwgeom.c:593
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_force_4d(const LWGEOM *geom, double zval, double mval)
Definition lwgeom.c:839

References ASSERT_STRING_EQUAL, LW_PARSER_CHECK_NONE, lwfree(), lwgeom_force_4d(), lwgeom_free(), lwgeom_from_wkt(), and lwgeom_to_ewkt().

Referenced by force_dims_suite_setup().

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