tethys-feature-service/node_modules/proj4/lib/common/adjust_zone.js

15 lines
285 B
JavaScript
Raw Permalink Normal View History

2023-10-02 13:04:02 +00:00
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;
}