My first idea was that a function like spatial_median could also be useful on its own that's why I made it public. But until this really is the case I changed it to private for now in commit d13371239b6b069e05f2054d16f00f7832fc8f5a.