Definition at line 368 of file lwpoly.c.
References lwalloc(), lwerror(), lwpoly_construct(), POINTARRAY::npoints, LWLINE::points, ptarray_clone_deep(), ptarray_is_closed_2d(), and LWLINE::srid.
Referenced by lwgeom_force_sfs(), and LWGEOM_makepoly().
373 int srid = shell->
srid;
377 lwerror(
"lwpoly_from_lwlines: shell must have at least 4 points");
379 lwerror(
"lwpoly_from_lwlines: shell must be closed");
382 for (nrings=1; nrings<=nholes; nrings++)
384 const LWLINE *hole = holes[nrings-1];
386 if ( hole->
srid != srid )
387 lwerror(
"lwpoly_from_lwlines: mixed SRIDs in input lines");
390 lwerror(
"lwpoly_from_lwlines: holes must have at least 4 points");
392 lwerror(
"lwpoly_from_lwlines: holes must be closed");
int ptarray_is_closed_2d(const POINTARRAY *pa)
LWPOLY * lwpoly_construct(int srid, GBOX *bbox, uint32_t nrings, POINTARRAY **points)
POINTARRAY * ptarray_clone_deep(const POINTARRAY *ptarray)
Deep clone a pointarray (also clones serialized pointlist)
void * lwalloc(size_t size)
void lwerror(const char *fmt,...)
Write a notice out to the error handler.