PostGIS  2.2.7dev-r@@SVN_REVISION@@
static void buildarea2 ( void  )
static

Definition at line 81 of file cu_buildarea.c.

References check_geom_equal, cu_error_msg_reset(), LW_PARSER_CHECK_NONE, lwgeom_buildarea(), lwgeom_free(), and lwgeom_from_wkt().

Referenced by buildarea_suite_setup().

82 {
83  LWGEOM *gin, *gout, *gexp;
84 
85  /* because i don't trust that much prior tests... ;) */
87 
88  gin = lwgeom_from_wkt(
89 "MULTILINESTRING((0 0, 10 0, 10 10, 0 10, 0 0),(10 10, 20 10, 20 0, 10 0, 10 10))",
91  CU_ASSERT(gin != NULL);
92 
93  gexp = lwgeom_from_wkt(
94 "POLYGON((0 0,0 10,10 10,20 10,20 0,10 0,0 0))",
96  CU_ASSERT(gexp != NULL);
97 
98  gout = lwgeom_buildarea(gin);
99  CU_ASSERT(gout != NULL);
100 
101  check_geom_equal(gout, gexp);
102 
103  lwgeom_free(gout);
104  lwgeom_free(gexp);
105  lwgeom_free(gin);
106 
107 }
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1050
LWGEOM * lwgeom_from_wkt(const char *wkt, const char check)
Definition: lwin_wkt.c:890
#define LW_PARSER_CHECK_NONE
Definition: liblwgeom.h:1869
void cu_error_msg_reset()
LWGEOM * lwgeom_buildarea(const LWGEOM *geom)
Take a geometry and return an areal geometry (Polygon or MultiPolygon).
#define check_geom_equal(gobt, gexp)
Definition: cu_buildarea.c:23

Here is the call graph for this function:

Here is the caller graph for this function: