UNPKG

proj4

Version:

Proj4js is a JavaScript library to transform point coordinates from one coordinate system to another, including datum transformations.

15 lines (12 loc) 286 B
import adjust_lon from './adjust_lon'; export default function (zone, lon) { if (zone === undefined) { zone = Math.floor((adjust_lon(lon) + Math.PI) * 30 / Math.PI) + 1; if (zone < 0) { return 0; } else if (zone > 60) { return 60; } } return zone; }