PostGIS  3.7.0dev-r@@SVN_REVISION@@

◆ lwt_LoadPolygon()

static void lwt_LoadPolygon ( LWT_TOPOLOGY topo,
const LWPOLY poly,
double  tol 
)
static

Definition at line 7527 of file lwgeom_topo.c.

7528 {
7529  uint32_t i;
7530 
7531  /* Add each ring as an edge */
7532  for ( i=0; i<poly->nrings; ++i )
7533  {
7534  LWLINE *line;
7535  POINTARRAY *pa;
7536 
7537  /* TODO: avoid the clone here */
7538  pa = ptarray_clone(poly->rings[i]);
7539  line = lwline_construct(topo->srid, NULL, pa);
7540  lwt_LoadLine(topo, line, tol);
7541  lwline_free(line);
7542  }
7543 }
LWLINE * lwline_construct(int32_t srid, GBOX *bbox, POINTARRAY *points)
Definition: lwline.c:42
void lwline_free(LWLINE *line)
Definition: lwline.c:67
POINTARRAY * ptarray_clone(const POINTARRAY *ptarray)
Clone a POINTARRAY object.
Definition: ptarray.c:674
static void lwt_LoadLine(LWT_TOPOLOGY *topo, LWLINE *line, double tol)
Definition: lwgeom_topo.c:7516
POINTARRAY ** rings
Definition: liblwgeom.h:519
uint32_t nrings
Definition: liblwgeom.h:524

References lwline_construct(), lwline_free(), lwt_LoadLine(), LWPOLY::nrings, ptarray_clone(), LWPOLY::rings, and LWT_TOPOLOGY_T::srid.

Referenced by _lwt_LoadGeometryRecursive(), and lwt_AddPolygon().

Here is the call graph for this function:
Here is the caller graph for this function: