templates and functions parameters changed in filters and rtree's functions to suit new distances predicates.