548{
552
553
561
563
564
567 CU_ASSERT_DOUBLE_EQUAL(point.
x, 0, 0.0001);
568 CU_ASSERT_DOUBLE_EQUAL(point.
y, 0, 0.001);
569 CU_ASSERT_DOUBLE_EQUAL(point.
z, 0, 0.001);
571
572
575 CU_ASSERT_DOUBLE_EQUAL(point.
x, 2, 0.0001);
576 CU_ASSERT_DOUBLE_EQUAL(point.
y, 2, 0.001);
577 CU_ASSERT_DOUBLE_EQUAL(point.
z, 2, 0.001);
579
580
583 CU_ASSERT_DOUBLE_EQUAL(point.
x, 1, 0.0001);
584 CU_ASSERT_DOUBLE_EQUAL(point.
y, 1, 0.001);
585 CU_ASSERT_DOUBLE_EQUAL(point.
z, 1, 0.001);
587
588
591 CU_ASSERT_DOUBLE_EQUAL(point.
x, 1.6, 0.0001);
592 CU_ASSERT_DOUBLE_EQUAL(point.
y, 1.6, 0.001);
593 CU_ASSERT_DOUBLE_EQUAL(point.
z, 1.6, 0.001);
595
597}
LWPOINT * lwline_interpolate_point_3d(const LWLINE *line, double distance)
Interpolate one point along a line in 3D.
int lwpoint_getPoint4d_p(const LWPOINT *point, POINT4D *out)
LWGEOM * lwpoint_as_lwgeom(const LWPOINT *obj)
void lwpoint_free(LWPOINT *pt)
#define LW_PARSER_CHECK_NONE
int lwgeom_has_z(const LWGEOM *geom)
Return LW_TRUE if geometry has Z ordinates.
LWLINE * lwgeom_as_lwline(const LWGEOM *lwgeom)
#define LW_TRUE
Return types for functions with status returns.
LWLINE * lwline_construct_empty(int32_t srid, char hasz, char hasm)
int lwgeom_has_m(const LWGEOM *geom)
Return LW_TRUE if geometry has M ordinates.
LWGEOM * lwgeom_from_wkt(const char *wkt, const char check)
void lwline_free(LWLINE *line)
int lwpoint_is_empty(const LWPOINT *point)