makeClusterGrid

fun makeClusterGrid(focusAreaPrecision: Double, buildings: List<Building>, geometryFactory: GeometryFactory, transformer: CRSTransformer): List<Cell>

Group buildings into routing cells with bisecting-k-Means clustering for faster sampling. The resolution of the routing grid is cut in half with every 10km distance from the focus area.

Return

routing cells

Parameters

focusAreaPrecision

determines at what average distance between point and associated centroid the algorithm stops. This value will only count for buildings in the focus area. Buildings in the buffer area are clustered to cells with less precision.

buildings

the buildings for which routing cells are determined

geometryFactory

geometry factory to use to create new geometries

transformer

CRS transformer to use