UNPKG

vgridjs

Version:

Vgrid DGGS JS

22 lines (20 loc) 735 B
/** * Quarternary Triangular Mesh (QTM) implementation in TypeScript * Original Python implementation by Paulo Raposo and Randall Brown * Based on Geoffrey Dutton's conception */ interface Vertex { lat: number; lon: number; } interface Facet { vertices: Vertex[]; orientation?: 'u' | 'd'; isNorth?: boolean; } declare function qtmIdToFacet(qtmId: string): Facet; declare function latlonToQtmId(lat: number, lon: number, resolution: number): string; declare function qtmIdToLatlon(qtmId: string): Vertex; declare function qtmParent(qtmId: string): string; declare function qtmChildren(qtmId: string, resolution?: number): string[]; export { latlonToQtmId, qtmChildren, qtmIdToFacet, qtmIdToLatlon, qtmParent };