PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ test_geos_offsetcurve()

static void test_geos_offsetcurve ( void  )
static

Definition at line 95 of file cu_geos.c.

96 {
97  char* ewkt;
98  char* out_ewkt;
99  LWGEOM* geom1;
100  LWGEOM* geom2;
101 
102  ewkt = "MULTILINESTRING((-10 0, -10 100), (0 -5, 0 0))";
103  geom1 = lwgeom_from_wkt(ewkt, LW_PARSER_CHECK_NONE);
104  geom2 = lwgeom_offsetcurve(geom1, 2, 10, 1, 1);
105  out_ewkt = lwgeom_to_ewkt((LWGEOM*)geom2);
106  ASSERT_STRING_EQUAL(out_ewkt, "MULTILINESTRING((-12 0,-12 100),(-2 -5,-2 0))");
107  lwfree(out_ewkt);
108  lwgeom_free(geom1);
109  lwgeom_free(geom2);
110 }
#define ASSERT_STRING_EQUAL(o, e)
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1144
#define LW_PARSER_CHECK_NONE
Definition: liblwgeom.h:2005
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:556
void lwfree(void *mem)
Definition: lwutil.c:244
LWGEOM * lwgeom_from_wkt(const char *wkt, const char check)
Definition: lwin_wkt.c:904

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: