PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ buildarea4b()

static void buildarea4b ( void  )
static

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

189 {
190  LWGEOM *gin, *gout, *gexp;
191 
193 
194  gin = lwgeom_from_wkt(
195 "MULTILINESTRING((0 0, 20 0, 20 20, 0 20, 0 0),(2 2, 18 2, 18 18, 2 18, 2 2), (8 8, 8 9, 8 10, 8 11, 8 12, 9 12, 10 12, 11 12, 12 12, 12 11, 12 10, 12 9, 12 8, 11 8, 10 8, 9 8, 8 8))",
197  CU_ASSERT(gin != NULL);
198 
199  gexp = lwgeom_from_wkt(
200 "MULTIPOLYGON(((0 0,0 20,20 20,20 0,0 0),(2 2,18 2,18 18,2 18,2 2)),((8 8,8 9,8 10,8 11,8 12,9 12,10 12,11 12,12 12,12 11,12 10,12 9,12 8,11 8,10 8,9 8,8 8)))",
202  CU_ASSERT(gexp != NULL);
203 
204  gout = lwgeom_buildarea(gin);
205  CU_ASSERT(gout != NULL);
206 
207  check_geom_equal(gout, gexp);
208 
209  lwgeom_free(gout);
210  lwgeom_free(gexp);
211  lwgeom_free(gin);
212 
213 }
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: