PostGIS  2.1.10dev-r@@SVN_REVISION@@
LWPOLY* lwpoly_segmentize2d ( LWPOLY poly,
double  dist 

Definition at line 210 of file lwpoly.c.

References lwalloc(), lwpoly_construct(), LWPOLY::nrings, ptarray_segmentize2d(), LWPOLY::rings, and LWPOLY::srid.

Referenced by lwgeom_segmentize2d().

211 {
212  POINTARRAY **newrings;
213  uint32_t i;
215  newrings = lwalloc(sizeof(POINTARRAY *)*poly->nrings);
216  for (i=0; i<poly->nrings; i++)
217  {
218  newrings[i] = ptarray_segmentize2d(poly->rings[i], dist);
219  }
220  return lwpoly_construct(poly->srid, NULL,
221  poly->nrings, newrings);
222 }
POINTARRAY * ptarray_segmentize2d(const POINTARRAY *ipa, double dist)
Returns a modified POINTARRAY so that no segment is longer than the given distance (computed using 2d...
Definition: ptarray.c:381
LWPOLY * lwpoly_construct(int srid, GBOX *bbox, uint32_t nrings, POINTARRAY **points)
Definition: lwpoly.c:29
Definition: liblwgeom.h:413
int nrings
Definition: liblwgeom.h:411
int32_t srid
Definition: liblwgeom.h:410
void * lwalloc(size_t size)
Definition: lwutil.c:175

Here is the call graph for this function:

Here is the caller graph for this function: