import { Hemisphere, Point } from '@ngageoint/grid-js'; import { GridType } from './grid/GridType'; import { GridZone } from './gzd/GridZone'; import { UTM } from './utm/UTM'; /** * Military Grid Reference System Coordinate */ export declare class MGRS { /** * 100km grid square column (ā€˜e’) letters repeat every third zone */ private static readonly columnLetters; /** * 100km grid square row (ā€˜n’) letters repeat every other zone */ private static readonly rowLetters; /** * MGRS string pattern */ private static readonly mgrsPattern; /** * MGRS invalid string pattern (Svalbard) */ private static readonly mgrsInvalidPattern; /** * Zone number */ private readonly zone; /** * Band letter */ private readonly band; /** * Column letter */ private readonly column; /** * Row letter */ private readonly row; /** * Easting */ private readonly easting; /** * Northing */ private readonly northing; /** * Create * * @param zone * zone number * @param band * band letter * @param easting * easting * @param northing * northing * @return MGRS */ static create(zone: number, band: string, easting: number, northing: number, column?: string, row?: string): MGRS; /** * Constructor * * @param zone * zone number * @param band * band letter * @param column * column letter * @param row * row letter * @param easting * easting * @param northing * northing */ constructor(zone: number, band: string, column: string, row: string, easting: number, northing: number); /** * Get the zone number * * @return zone number */ getZone(): number; /** * Get the band letter * * @return band letter */ getBand(): string; /** * Get the column letter * * @return column letter */ getColumn(): string; /** * Get the row letter * * @return row letter */ getRow(): string; /** * Get the easting * * @return easting */ getEasting(): number; /** * Get the northing * * @return northing */ getNorthing(): number; /** * Get the hemisphere * * @return hemisphere */ getHemisphere(): Hemisphere; /** * Get the MGRS coordinate with specified grid precision * * @param type * grid type precision * @return MGRS coordinate */ coordinate(type?: GridType): string; /** * Get the easting and northing concatenated value in the grid type * precision * * @param type * grid type precision * @return easting and northing value */ getEastingAndNorthing(type: GridType): string; /** * Get the MGRS coordinate with the accuracy number of digits in the easting * and northing values. Accuracy must be inclusively between 0 * ({@link GridType#HUNDRED_KILOMETER}) and 5 ({@link GridType#METER}). * * @param accuracy * accuracy digits between 0 (inclusive) and 5 (inclusive) * @return MGRS coordinate */ coordinateFromAccuracy(accuracy: number): string; /** * Get the MGRS coordinate grid precision * * @return grid type precision */ precision(): GridType; /** * Get the MGRS coordinate accuracy number of digits * * @return accuracy digits */ accuracy(): number; /** * Get the two letter column and row 100k designator * * @return the two letter column and row 100k designator */ getColumnRowId(): string; /** * Get the GZD grid zone * * @return GZD grid zone */ getGridZone(): GridZone; /** * Convert to a point * * @return point */ toPoint(): Point; /** * Convert to UTM coordinate * * @return UTM */ toUTM(): UTM; /** * Get the UTM easting * * @return UTM easting */ getUTMEasting(): number; /** * Get the UTM northing * * @return UTM northing */ getUTMNorthing(): number; /** * {@inheritDoc} */ toString(): string; /** * Return whether the given string is valid MGRS string * * @param mgrs * potential MGRS string * @return true if MGRS string is valid, false otherwise */ static isMGRS(mgrs: string): boolean; /** * Removed spaces from the value * * @param value * value string * @return value without spaces */ private static removeSpaces; /** * Encodes a point as a MGRS string * * @param point * point * @return MGRS */ static from(point: Point): MGRS; /** * Parse a MGRS string * * @param mgrs * MGRS string * @return MGRS * @throws ParseException * upon failure to parse the MGRS string */ static parse(mgrs: string): MGRS; /** * Get the point on the western grid zone bounds point between the western * and eastern points * * @param gridZone * grid zone * @param west * western point * @param east * eastern point * @return western grid bounds point */ private static getWesternBoundsPoint; /** * Get the point on the southern grid zone bounds point between the southern * and northern points * * @param gridZone * grid zone * @param south * southern point * @param north * northern point * @return southern grid bounds point */ private static getSouthernBoundsPoint; /** * Parse the MGRS string for the precision * * @param mgrs * MGRS string * @return grid type precision * @throws ParseException * upon failure to parse the MGRS string */ static precision(mgrs: string): GridType; /** * Get the MGRS coordinate accuracy number of digits * * @param mgrs * MGRS string * @return accuracy digits * @throws ParseException * upon failure to parse the MGRS string */ static accuracy(mgrs: string): number; /** * Get the two letter column and row 100k designator for a given UTM * easting, northing and zone number value * * @param easting * easting * @param northing * northing * @param zoneNumber * zone number * @return the two letter column and row 100k designator */ static getColumnRowId(easting: number, northing: number, zoneNumber: number): string; /** * Get the column letter from the UTM * * @param utm * UTM * @return column letter */ static getColumnLetterFromUTM(utm: UTM): string; /** * Get the column letter from the zone number and easting * * @param zoneNumber * zone number * @param easting * easting * @return column letter */ static getColumnLetter(zoneNumber: number, easting: number): string; /** * Get the row letter from the UTM * * @param utm * UTM * @return row letter */ static getRowLetterFromUTM(utm: UTM): string; /** * Get the row letter from the zone number and northing * * @param zoneNumber * zone number * @param northing * northing * @return row letter */ static getRowLetter(zoneNumber: number, northing: number): string; /** * Get the column letters for the zone number * * @param zoneNumber * zone number * @return column letters */ private static getColumnLetters; /** * Get the row letters for the zone number * * @param zoneNumber * zone number * @return row letters */ private static getRowLetters; } //# sourceMappingURL=MGRS.d.ts.map