PostGIS  3.7.0dev-r@@SVN_REVISION@@

◆ lwgeom_to_points()

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

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

1668 {
1669  switch (lwgeom_get_type(lwgeom))
1670  {
1671  case MULTIPOLYGONTYPE:
1672  return lwmpoly_to_points((LWMPOLY*)lwgeom, npoints, seed);
1673  case POLYGONTYPE:
1674  return lwpoly_to_points((LWPOLY*)lwgeom, npoints, seed);
1675  default:
1676  lwerror("%s: unsupported geometry type '%s'", __func__, lwtype_name(lwgeom_get_type(lwgeom)));
1677  return NULL;
1678  }
1679 }
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:107
#define POLYGONTYPE
Definition: liblwgeom.h:104
const char * lwtype_name(uint8_t type)
Return the type name string associated with a type number (e.g.
Definition: lwutil.c:216
void void lwerror(const char *fmt,...) __attribute__((format(printf
Write a notice out to the error handler.
static uint32_t lwgeom_get_type(const LWGEOM *geom)
Return LWTYPE number.
Definition: lwinline.h:141

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: