A computer-implemented method for fitting a first set of data points to a second set of data points, where the data points in the first set and in the second set describe spatial coordinates captured by one or more sensors, the method comprising; obtaining first and second sets of data points; defining a common data structure comprising cells organized hierarchically in N levels i=1,2,...,N, where i=1 is a trunk level of the common data structure and wherein each cell is associated with a respective cell range of data point values, where a cell range partitions a space of the spatial coordinates; associating data points in the first set and in the second set with cells at an initialization level equal to or above the trunk level of the common data structure based on cell ranges and on data point values; and, for each level j, starting from initialization level: (a) determining at least one cell feature for one or more cells and for each data set based on data points associated with respective cells; (b) determining a level-transform Tj for level j based on differences between respective cell features determined at level j, to fit the second data set to the first data set at level j by reducing differences between cell features, wherein the level-transform is a geometric linear transformation; (c) associating data points in the first set, and data points transformed by level-transform Tj in the second set, with cells at a next level j+1 of the common data structure based on cell ranges at level j+1; until a stopping criterion is fulfilled, and; (d) fitting the first set of data points to the second set of data points by accumulating the determined level-transforms Tj, wherein accumulating the determined level-transforms Tj for each level j comprises multiplying matrices representing linear transforms for each respective level j. obtaining first and second sets of data points; defining a common data structure comprising cells organized hierarchically in N levels i=1,2,...,N, where i=1 is a trunk level of the common data structure and wherein each cell is associated with a respective cell range of data point values, where a cell range partitions a space of the spatial coordinates; associating data points in the first set and in the second set with cells at an initialization level equal to or above the trunk level of the common data structure based on cell ranges and on data point values; and, for each level j, starting from initialization level: (a) determining at least one cell feature for one or more cells and for each data set based on data points associated with respective cells; (b) determining a level-transform Tj for level j based on differences between respective cell features determined at level j, to fit the second data set to the first data set at level j by reducing differences between cell features, wherein the level-transform is a geometric linear transformation; (c) associating data points in the first set, and data points transformed by level-transform Tj in the second set, with cells at a next level j+1 of the common data structure based on cell ranges at level j+1; until a stopping criterion is fulfilled, and; (d) fitting the first set of data points to the second set of data points by accumulating the determined level-transforms Tj, wherein accumulating the determined level-transforms Tj for each level j comprises multiplying matrices representing linear transforms for each respective level j. (a) determining at least one cell feature for one or more cells and for each data set based on data points associated with respective cells; (b) determining a level-transform Tj for level j based on differences between respective cell features determined at level j, to fit the second data set to the first data set at level j by reducing differences between cell features, wherein the level-transform is a geometric linear transformation; (c) associating data points in the first set, and data points transformed by level-transform Tj in the second set, with cells at a next level j+1 of the common data structure based on cell ranges at level j+1; until a stopping criterion is fulfilled, and; (d) fitting the first set of data points to the second set of data points by accumulating the determined level-transforms Tj, wherein accumulating the determined level-transforms Tj for each level j comprises multiplying matrices representing linear transforms for each respective level j.