This topic describes the ST_GeneratePoints function. This function generates a specified number of pseudo-random points within the input geometry object.
Syntax
geometry ST_GeneratePoints(g geometry , npoints numeric);
Parameters
Parameter | Description |
---|---|
geometry | The geometry object that you want to specify. |
numeric | The number of pseudo-random points. |
Examples
Results returned by using the default parameter settings:
select ST_GeneratePoints('POLYGON((0 0,1 0,1 1,0 1,0 0))'::geometry,30);