PostGIS  3.4.0dev-r@@SVN_REVISION@@

◆ 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  CU_ASSERT_STRING_EQUAL("POINT(1 2 3 4)", wkt_out);
101  lwgeom_free(geom);
102  lwgeom_free(geom4d);
103  lwfree(wkt_out);
104 }
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1155
#define LW_PARSER_CHECK_NONE
Definition: liblwgeom.h:2114
LWGEOM * lwgeom_force_4d(const LWGEOM *geom, double zval, double mval)
Definition: lwgeom.c:811
char * lwgeom_to_ewkt(const LWGEOM *lwgeom)
Return an alloced string.
Definition: lwgeom.c:565
void lwfree(void *mem)
Definition: lwutil.c:242
LWGEOM * lwgeom_from_wkt(const char *wkt, const char check)
Definition: lwin_wkt.c:905

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