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

◆ test_ptarray_append_point()

static void test_ptarray_append_point ( void  )
static

Definition at line 37 of file cu_ptarray.c.

38{
39 LWLINE *line;
40 char *wkt;
41 POINT4D p;
42
43 line = lwgeom_as_lwline(lwgeom_from_text("LINESTRING(0 0,1 1)"));
44 p.x = 1;
45 p.y = 1;
48 ASSERT_STRING_EQUAL(wkt,"LINESTRING(0 0,1 1,1 1)");
49 lwfree(wkt);
50
53 ASSERT_STRING_EQUAL(wkt,"LINESTRING(0 0,1 1,1 1)");
54 lwfree(wkt);
55
56 lwline_free(line);
57}
static char * lwgeom_to_text(const LWGEOM *geom)
Definition cu_ptarray.c:32
static LWGEOM * lwgeom_from_text(const char *str)
Definition cu_ptarray.c:24
#define ASSERT_STRING_EQUAL(o, e)
#define LW_FALSE
Definition liblwgeom.h:94
void lwfree(void *mem)
Definition lwutil.c:248
LWGEOM * lwline_as_lwgeom(const LWLINE *obj)
Definition lwgeom.c:367
LWLINE * lwgeom_as_lwline(const LWGEOM *lwgeom)
Definition lwgeom.c:207
int ptarray_append_point(POINTARRAY *pa, const POINT4D *pt, int allow_duplicates)
Append a point to the end of an existing POINTARRAY If allow_duplicate is LW_FALSE,...
Definition ptarray.c:147
#define LW_TRUE
Return types for functions with status returns.
Definition liblwgeom.h:93
void lwline_free(LWLINE *line)
Definition lwline.c:67
POINTARRAY * points
Definition liblwgeom.h:483
double x
Definition liblwgeom.h:414
double y
Definition liblwgeom.h:414

References ASSERT_STRING_EQUAL, LW_FALSE, LW_TRUE, lwfree(), lwgeom_as_lwline(), lwgeom_from_text(), lwgeom_to_text(), lwline_as_lwgeom(), lwline_free(), LWLINE::points, ptarray_append_point(), POINT4D::x, and POINT4D::y.

Referenced by ptarray_suite_setup().

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