PostGIS  3.7.0dev-r@@SVN_REVISION@@

◆ test_ptarray_simplify()

static void test_ptarray_simplify ( void  )
static

Definition at line 1815 of file cu_algorithm.c.

1816 {
1817  LWGEOM *geom1 = lwgeom_from_wkt("LINESTRING (2 2,3 2,4 1,3 2, 4 4)", LW_PARSER_CHECK_NONE);
1818  LWGEOM *geom2 = lwgeom_from_wkt("LINESTRING (2 2,3 2,4 1,3 2, 4 4)", LW_PARSER_CHECK_NONE);
1819  LWLINE *line1 = (LWLINE*)geom1;
1820  double tolerance = 0.0;
1821  int minpts = 2;
1822  ptarray_simplify_in_place(line1->points, tolerance, minpts);
1823  ASSERT_LWGEOM_EQUAL(geom1, geom2);
1824  lwgeom_free(geom1);
1825  lwgeom_free(geom2);
1826 }
#define ASSERT_LWGEOM_EQUAL(o, e)
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1218
#define LW_PARSER_CHECK_NONE
Definition: liblwgeom.h:2146
LWGEOM * lwgeom_from_wkt(const char *wkt, const char check)
Definition: lwin_wkt.c:940
void ptarray_simplify_in_place(POINTARRAY *pa, double tolerance, uint32_t minpts)
Definition: ptarray.c:1721
POINTARRAY * points
Definition: liblwgeom.h:483

References ASSERT_LWGEOM_EQUAL, LW_PARSER_CHECK_NONE, lwgeom_free(), lwgeom_from_wkt(), LWLINE::points, and ptarray_simplify_in_place().

Referenced by algorithms_suite_setup().

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