MobilityDB 1.1

◆ geo_sel()

float8 geo_sel ( VariableStatData *  vardata,
const STBox box,
meosOper  oper 
)

Return an estimate of the selectivity of a spatiotemporal search box by looking at data in the ND_STATS structure.

The selectivity is a float in [0,1] that estimates the proportion of the rows in the table that will be returned as a result of the search box. To get our estimate, we need sum up the values * the proportion of each cell in the histogram that satisfies the operator wrt the search box, then divide by the number of features that generated the histogram.

Note
This function generalizes PostGIS function estimate_selectivity in file gserialized_estimate.c