Please use StatAnalysis::categoryFromBoundaries2D instead of this function.