Skip to main content
Runs Getis and Ord’s G Local (Gi or Gi*) statistic on the geometry given the weights and level. Getis and Ord’s Gi and Gi* statistics are used to identify data points with locally high values (hot spots) and low values (cold spots) in a spatial dataset. The ST_WeightedDistanceBand and ST_BinaryDistanceBand functions can be used to generate the weights column.

Signatures

ST_GLocal(geom: Geometry, weights: Struct, level: Int)

Parameters

geom
Geometry
required
The input geometry.
weights
Struct
required
The weights value.
level
Integer
required
The level value.

Return type

A struct containing the result fields.

Example

ST_GLocal(myVariable, ST_BinaryDistanceBandColumn(geometry, 1.0, true, true, false, struct(myVariable, geometry)), true)
{0.5238095238095238, 0.4444444444444444, 0.001049802637104223, 2.4494897427831814, 0.00715293921771476}