No, the R-tree is created internally and destroyed afterwards so if you want to keep it you have to create the rtree by yourself.So I could use comparable_distance after converting my rings to linestring or multi linestring ? Would the R-tree of the linestirng be kept between each call ? (in case I can't do all in a single call)