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

◆ 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))";
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:1246
#define LW_PARSER_CHECK_NONE
Definition liblwgeom.h:2149
char * lwgeom_to_ewkt(const LWGEOM *lwgeom)
Return an allocated string.
Definition lwgeom.c:593
void lwfree(void *mem)
Definition lwutil.c:248
LWGEOM * lwgeom_offsetcurve(const LWGEOM *geom, double size, int quadsegs, int joinStyle, double mitreLimit)
LWGEOM * lwgeom_from_wkt(const char *wkt, const char check)
Definition lwin_wkt.c:940

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: