This is documentation for an unreleased version. For the latest API, see version 6.0.0.
Version: Next
parseCoordinateValue
Callable
parseCoordinateValue(value: string | number | null | undefined, descriptor: ResolvedCoordinateDescriptor): number
Reads one value in the units its column declares, which is what the sky transform expects: it
applies getDegreesPerCatalogUnit on the way into AST, so scaling here as well would
apply that scale twice.
Decimal columns return values in their declared units. A value carrying its own h/d marker is
converted from that explicit unit back to the declared unit, so the transform still applies
exactly one scale. Sexagesimal columns are the exception, and have to be: hms and dms name a
notation, not a scale that could be multiplied, so those values are converted to degrees here --
getDegreesPerCatalogUnit reports 1 degree per unit for them.
Pure: everything needed to read the value is in the descriptor, so this never re-reads units or
inspects the column name.
Reads one value in the units its column declares, which is what the sky transform expects: it applies getDegreesPerCatalogUnit on the way into AST, so scaling here as well would apply that scale twice.
Decimal columns return values in their declared units. A value carrying its own h/d marker is converted from that explicit unit back to the declared unit, so the transform still applies exactly one scale. Sexagesimal columns are the exception, and have to be:
hmsanddmsname a notation, not a scale that could be multiplied, so those values are converted to degrees here -- getDegreesPerCatalogUnit reports 1 degree per unit for them.Pure: everything needed to read the value is in the descriptor, so this never re-reads units or inspects the column name.