Review complete; more comments on the PR (but I'll reply to your comments above here).
- I think you can make this work for more types of catalogs by using CatalogT<Record> instead of SortedCatalogT<Record>. That should also be non-ambiguous.
- I very much agree that it'd be good to add Value typedefs to the FunctorKeys. I'd be supportive of either doing that on this ticket or making that a separate ticket.
- I think it is hard to do this generically and make that usable from Python. The more Pythonic thing to do might be to find a way to make ColumnView return Point or Coord columns in a form that's compatible with SkyWcs/Transform, and have a faster, easier way to turn a list of Records or a list of pairs of Records into a Catalog. That's all well beyond the scope of this ticket, of course.
Please have a look. I used overloads to factor out common code, but it's messier than I'd like. Suggestions for cleanup would be most welcome. Issues:
I would prefer to have something like public versions of getValue and setValue that worked for all catalog types, key types and match lists (allowing the two functions this ticket is about to be written in Python and be fairly efficient). But the number of instantiations required for that seems prohibitive.
The pull request (which is against
DM-10765) is here: https://github.com/lsst/afw/pull/313