Job of layer_bars to set scale
Initial sketch of distance based matching.
Needs a lot of tests!
Use new distance approach in layer_guess