var __create = Object.create; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __getProtoOf = Object.getPrototypeOf; var __hasOwnProp = Object.prototype.hasOwnProperty; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( // If the importer is in node compatibility mode or this is not an ESM // file that has been converted to a CommonJS file using a Babel- // compatible transform (i.e. "__esModule" has not been set), then set // "default" to the CommonJS "module.exports" for node compatibility. isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod )); var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // dist/index.js var dist_exports = {}; __export(dist_exports, { Proj4Projection: () => Proj4Projection }); module.exports = __toCommonJS(dist_exports); // dist/lib/proj4-projection.js var import_proj4 = __toESM(require("proj4"), 1); var Proj4Projection = class { /** Define aliases for one or more projections */ static defineProjectionAliases(aliases) { const aliasArray = []; for (const alias in aliases) { aliasArray.push([alias, aliases[alias]]); } import_proj4.default.defs(aliasArray); } constructor({ from = "WGS84", to = "WGS84" }) { this._projection = (0, import_proj4.default)(from, to); if (!this._projection) { throw new Error("Invalid projection"); } this.project = this.project.bind(this); this.unproject = this.unproject.bind(this); } /** Project a coordinate project from first to second coordinate system */ project(coord) { return this._projection.forward(coord); } /** Project a coordinate project from second to first coordinate system */ unproject(coord) { return this._projection.inverse(coord); } }; //# sourceMappingURL=index.cjs.map