Prefer numeric degree RA/Dec fields in VOTable parsing#383
Conversation
| return fields; | ||
| } | ||
|
|
||
| function isUCDField(field, ucdField, oldUcdField) { |
There was a problem hiding this comment.
This seems to be the same code as in Catalog. Maybe put those definition in Catalog, export them so that they can be imported in ProgressiveCat as well.
| var isDouble = datatype === "double"; | ||
| var isDeg = unit === "deg"; | ||
|
|
||
| if (datatype && datatype !== "char" && datatype !== "unicodechar") { |
There was a problem hiding this comment.
this tests seems to prefer non char. the idea is to prefer numeric values I think (int, double, float, complex, boolean, short). Do we consider integer/complex/boolean to be legit for a position so that we increase the score comparatively to column position that would be in sexagesimal (char) ? I would just add a bonus for double/float.
| if (isDeg) { | ||
| score += 10; | ||
| } | ||
| if (isDouble && isDeg) { |
There was a problem hiding this comment.
Why this case ? Having isDouble + isDeg is already better than just isDouble or just isDeg (the two adds up to 30 but having one of them adds up to 10 or 20).
This fixed detection of position columns for NED cone search result (eg: https://ned.ipac.caltech.edu/NED::API/ConeSearchByPosition?RA=10.684793d&DEC=41.269065&CSYS=Equatorial&EQUINOX=J2000.0&SR=1&MAXREC=2 -