/* * Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved. * This file is licensed to you under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. You may obtain a copy * of the License at https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS * OF ANY KIND, either express or implied. See the License for the specific language * governing permissions and limitations under the License. */ import { FormatOptions } from "../internal/format.js"; import { Axis, Hemisphere } from "../internal/ordinal.js"; //#region src/coordinates/latlon/decimal-degrees/formatter.d.ts /** Default number of decimal places for decimal-degrees formatting. */ declare const DECIMAL_DEGREES_PRECISION = 6; /** * Structured decimal-degrees parts for a single signed coordinate value. * * `degrees` is the non-negative magnitude rounded to the requested precision; * the signed value is recoverable from the axis and `hemisphere`. */ type DecimalDegreesParts = { degrees: number; hemisphere: Hemisphere; }; /** * Converts a single signed coordinate value into decimal-degrees parts. * * Returns the non-negative magnitude plus the hemisphere letter for the axis * (following geo's `>= 0` convention). Decimal degrees has no minutes/seconds * carry; the magnitude is simply rounded to the requested precision. * * @param value - The signed coordinate value. * @param axis - Whether the value is a latitude (`'lat'`) or longitude (`'lon'`). * @param precision - Decimal places for the magnitude (default `6`). * @returns The `{ degrees, hemisphere }` parts object. * * @remarks pure function * * @example * ```typescript * toDecimalDegreesParts(-122.4194, 'lon'); * // { degrees: 122.4194, hemisphere: 'W' } * ``` */ declare const toDecimalDegreesParts: (value: number, axis: Axis, precision?: number) => DecimalDegreesParts; /** * Formats latitude/longitude coordinates in decimal degrees notation. * * @param coordinates - Tuple of [latitude, longitude] values. * @param config - Optional formatting configuration. * @returns Formatted coordinate string in decimal degrees format. * * @example * ```typescript * formatDecimalDegrees([37.7749, -122.4194]); * // '37.774900° N, 122.419400° W' * ``` * * @example * ```typescript * formatDecimalDegrees([37.7749, -122.4194], { separator: ' / ' }); * // '37.774900° N / 122.419400° W' * ``` */ declare const formatDecimalDegrees: (coordinates: [number, number], config?: FormatOptions) => string; //#endregion export { DECIMAL_DEGREES_PRECISION, DecimalDegreesParts, formatDecimalDegrees, toDecimalDegreesParts }; //# sourceMappingURL=formatter.d.ts.map