PostGIS  2.1.10dev-r@@SVN_REVISION@@
static void test_lwgeom_segmentize2d ( void  )
static

Definition at line 403 of file cu_measures.c.

References LW_PARSER_CHECK_NONE, lwfree(), lwgeom_free(), lwgeom_from_wkt(), lwgeom_segmentize2d(), and lwgeom_to_ewkt().

Referenced by measures_suite_setup().

404 {
405  LWGEOM *linein = lwgeom_from_wkt("LINESTRING(0 0,10 0)", LW_PARSER_CHECK_NONE);
406  LWGEOM *lineout = lwgeom_segmentize2d(linein, 5);
407  char *strout = lwgeom_to_ewkt(lineout);
408  CU_ASSERT_STRING_EQUAL(strout, "LINESTRING(0 0,5 0,10 0)");
409  lwfree(strout);
410  lwgeom_free(linein);
411  lwgeom_free(lineout);
412 }
void lwfree(void *mem)
Definition: lwutil.c:190
char * lwgeom_to_ewkt(const LWGEOM *lwgeom)
Return an alloced string.
Definition: lwgeom.c:425
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1006
LWGEOM * lwgeom_from_wkt(const char *wkt, const char check)
Definition: lwin_wkt.c:844
#define LW_PARSER_CHECK_NONE
Definition: liblwgeom.h:1706
LWGEOM * lwgeom_segmentize2d(LWGEOM *line, double dist)
Definition: lwgeom.c:624

Here is the call graph for this function:

Here is the caller graph for this function: