PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ buildarea4()

static void buildarea4 ( void  )
static

Definition at line 152 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().

153 {
154  LWGEOM *gin, *gout, *gexp;
155 
157 
158  gin = lwgeom_from_wkt(
159 "MULTILINESTRING((0 0, 20 0, 20 20, 0 20, 0 0),(2 2, 18 2, 18 18, 2 18, 2 2),(8 8, 8 12, 12 12, 12 8, 8 8))",
161  CU_ASSERT(gin != NULL);
162 
163  gexp = lwgeom_from_wkt(
164 "MULTIPOLYGON(((0 0,0 20,20 20,20 0,0 0),(2 2,18 2,18 18,2 18,2 2)),((8 8,8 12,12 12,12 8,8 8)))",
166  CU_ASSERT(gexp != NULL);
167 
168  gout = lwgeom_buildarea(gin);
169  CU_ASSERT(gout != NULL);
170 
171  check_geom_equal(gout, gexp);
172 
173  lwgeom_free(gout);
174  lwgeom_free(gexp);
175  lwgeom_free(gin);
176 
177 }
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1099
LWGEOM * lwgeom_from_wkt(const char *wkt, const char check)
Definition: lwin_wkt.c:904
#define LW_PARSER_CHECK_NONE
Definition: liblwgeom.h:2013
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: