
Analytics Toolbox for BigQuery
random
This module contains functions to generate random geographies.
ST_GENERATEPOINTS
Description
Generates randomly placed points inside a polygon and returns them in an array of geographies.
The distribution of the generated points is spherically uniform (i.e. if the coordinates are interpreted as longitude and latitude on a sphere); this means that WGS84 coordinates will be only approximately uniformly distributed, since WGS84 is based on an ellipsoidal model.
geog
:GEOGRAPHY
a polygon; the random points generated will be inside this polygon.npoints
:INT64
number of points to generate.
Return type
ARRAY<GEOGRAPHY>
Example
|
|

This project has received funding from the European Union’s Horizon 2020 research and innovation programme under grant agreement No 960401.