PostGIS  3.0.6dev-r@@SVN_REVISION@@

◆ test_geos_offsetcurve()

static void test_geos_offsetcurve ( void  )
static

Definition at line 107 of file cu_geos.c.

108 {
109  char* ewkt;
110  char* out_ewkt;
111  LWGEOM* geom1;
112  LWGEOM* geom2;
113 
114  ewkt = "MULTILINESTRING((-10 0, -10 100), (0 -5, 0 0))";
115  geom1 = lwgeom_from_wkt(ewkt, LW_PARSER_CHECK_NONE);
116  geom2 = lwgeom_offsetcurve(geom1, 2, 10, 1, 1);
117  out_ewkt = lwgeom_to_ewkt((LWGEOM*)geom2);
118  ASSERT_STRING_EQUAL(out_ewkt, "MULTILINESTRING((-12 0,-12 100),(-2 -5,-2 0))");
119  lwfree(out_ewkt);
120  lwgeom_free(geom1);
121  lwgeom_free(geom2);
122 }
#define ASSERT_STRING_EQUAL(o, e)
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1138
#define LW_PARSER_CHECK_NONE
Definition: liblwgeom.h:2060
LWGEOM * lwgeom_offsetcurve(const LWGEOM *geom, double size, int quadsegs, int joinStyle, double mitreLimit)
char * lwgeom_to_ewkt(const LWGEOM *lwgeom)
Return an alloced string.
Definition: lwgeom.c:547
void lwfree(void *mem)
Definition: lwutil.c:242
LWGEOM * lwgeom_from_wkt(const char *wkt, const char check)
Definition: lwin_wkt.c:905

References ASSERT_STRING_EQUAL, LW_PARSER_CHECK_NONE, lwfree(), lwgeom_free(), lwgeom_from_wkt(), lwgeom_offsetcurve(), and lwgeom_to_ewkt().

Referenced by geos_suite_setup().

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