PostGIS  2.3.7dev-r@@SVN_REVISION@@
LWMPOINT* lwgeom_to_points ( const LWGEOM lwgeom,
int  npoints 

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

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

Referenced by ST_GeneratePoints(), and test_point_density().

1891 {
1892  switch(lwgeom_get_type(lwgeom))
1893  {
1895  return lwmpoly_to_points((LWMPOLY*)lwgeom, npoints);
1896  case POLYGONTYPE:
1897  return lwpoly_to_points((LWPOLY*)lwgeom, npoints);
1898  default:
1899  lwerror("%s: unsupported geometry type '%s'", __func__, lwtype_name(lwgeom_get_type(lwgeom)));
1900  return NULL;
1901  }
1902 }
LWMPOINT * lwpoly_to_points(const LWPOLY *lwpoly, int npoints)
uint32_t lwgeom_get_type(const LWGEOM *geom)
Return LWTYPE number.
Definition: lwgeom.c:842
Definition: liblwgeom.h:86
const char * lwtype_name(uint8_t type)
Return the type name string associated with a type number (e.g.
Definition: lwutil.c:216
LWMPOINT * lwmpoly_to_points(const LWMPOLY *lwmpoly, int npoints)
Definition: liblwgeom.h:89
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
Definition: lwutil.c:102

Here is the call graph for this function:

Here is the caller graph for this function: