PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ buildarea7()

static void buildarea7 ( void  )
static

Definition at line 298 of file cu_buildarea.c.

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

Referenced by buildarea_suite_setup().

299 {
300  LWGEOM *gin, *gout, *gexp;
301 
303 
304  gin = lwgeom_from_wkt(
305 "MULTILINESTRING( (0 0, 70 0, 70 70, 0 70, 0 0), (10 10, 10 60, 40 60, 40 10, 10 10), (20 20, 20 30, 30 30, 30 20, 20 20), (20 30, 30 30, 30 50, 20 50, 20 30), (50 20, 60 20, 60 40, 50 40, 50 20), (50 40, 60 40, 60 60, 50 60, 50 40), (80 0, 110 0, 110 70, 80 70, 80 0), (90 60, 100 60, 100 50, 90 50, 90 60))",
307  CU_ASSERT(gin != NULL);
308 
309  gexp = lwgeom_from_wkt(
310 "MULTIPOLYGON(((80 0,80 70,110 70,110 0,80 0),(90 60,90 50,100 50,100 60,90 60)),((20 20,20 30,20 50,30 50,30 30,30 20,20 20)),((0 0,0 70,70 70,70 0,0 0),(10 10,40 10,40 60,10 60,10 10),(50 20,60 20,60 40,60 60,50 60,50 40,50 20)))",
312  CU_ASSERT(gexp != NULL);
313 
314  gout = lwgeom_buildarea(gin);
315  CU_ASSERT(gout != NULL);
316 
317  check_geom_equal(gout, gexp);
318 
319  lwgeom_free(gout);
320  lwgeom_free(gexp);
321  lwgeom_free(gin);
322 
323 }
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: