PostGIS  3.0.6dev-r@@SVN_REVISION@@

◆ lwgeom_to_points()

LWMPOINT* lwgeom_to_points ( const LWGEOM lwgeom,
uint32_t  npoints,
int32_t  seed 
)

Definition at line 1724 of file liblwgeom/lwgeom_geos.c.

1725 {
1726  switch (lwgeom_get_type(lwgeom))
1727  {
1728  case MULTIPOLYGONTYPE:
1729  return lwmpoly_to_points((LWMPOLY*)lwgeom, npoints, seed);
1730  case POLYGONTYPE:
1731  return lwpoly_to_points((LWPOLY*)lwgeom, npoints, seed);
1732  default:
1733  lwerror("%s: unsupported geometry type '%s'", __func__, lwtype_name(lwgeom_get_type(lwgeom)));
1734  return NULL;
1735  }
1736 }
LWMPOINT * lwmpoly_to_points(const LWMPOLY *lwmpoly, uint32_t npoints, int32_t seed)
LWMPOINT * lwpoly_to_points(const LWPOLY *lwpoly, uint32_t npoints, int32_t seed)
#define MULTIPOLYGONTYPE
Definition: liblwgeom.h:121
#define POLYGONTYPE
Definition: liblwgeom.h:118
const char * lwtype_name(uint8_t type)
Return the type name string associated with a type number (e.g.
Definition: lwutil.c:216
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
Definition: lwutil.c:190
static uint32_t lwgeom_get_type(const LWGEOM *geom)
Return LWTYPE number.
Definition: lwinline.h:135

References lwerror(), lwgeom_get_type(), lwmpoly_to_points(), lwpoly_to_points(), lwtype_name(), MULTIPOLYGONTYPE, and POLYGONTYPE.

Referenced by ST_GeneratePoints(), and test_point_density().

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