vue-chrts 2.1.0-beta-2 → 2.1.0-beta-4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/AreaChart/AreaChart.js +127 -107
- package/dist/components/AreaChart/types.d.ts +34 -1
- package/dist/components/BarChart/BarChart.js +76 -65
- package/dist/components/BarChart/types.d.ts +9 -1
- package/dist/components/BubbleChart/BubbleChart.js +55 -45
- package/dist/components/BubbleChart/types.d.ts +9 -1
- package/dist/components/DagreGraph/DagreGraph.js +33 -24
- package/dist/components/DagreGraph/types.d.ts +5 -1
- package/dist/components/DonutChart/DonutChart.js +69 -59
- package/dist/components/DonutChart/types.d.ts +14 -2
- package/dist/components/DualChart/DualChart.js +56 -46
- package/dist/components/DualChart/types.d.ts +10 -1
- package/dist/components/GanttChart/GanttChart.js +58 -48
- package/dist/components/GanttChart/types.d.ts +9 -1
- package/dist/components/LineChart/LineChart.js +17 -9
- package/dist/components/Maps/DottedMap/DottedMap.js +170 -0
- package/dist/components/Maps/DottedMap/DottedMap.vue.d.ts +52 -0
- package/dist/components/Maps/DottedMap/DottedMap2.js +4 -0
- package/dist/components/Maps/DottedMap/MapLegend.vue.d.ts +6 -0
- package/dist/components/Maps/DottedMap/MapZoomControls.js +44 -0
- package/dist/components/Maps/DottedMap/MapZoomControls.vue.d.ts +13 -0
- package/dist/components/Maps/DottedMap/MapZoomControls2.js +4 -0
- package/dist/components/Maps/DottedMap/core.js +122 -0
- package/dist/components/Maps/DottedMap/core.vue.d.ts +36 -0
- package/dist/components/Maps/DottedMap/core2.js +4 -0
- package/dist/components/Maps/DottedMap/mapUtils.d.ts +49 -0
- package/dist/components/Maps/DottedMap/mapUtils.js +130 -0
- package/dist/components/Maps/DottedMap/pins.d.ts +9 -0
- package/dist/components/Maps/DottedMap/pins.js +58 -0
- package/dist/components/Maps/DottedMap/regions.d.ts +4 -0
- package/dist/components/Maps/DottedMap/regions.js +66 -0
- package/dist/components/Maps/DottedMap/types.d.ts +127 -0
- package/dist/components/Maps/DottedMap/useMapPanZoom.d.ts +22 -0
- package/dist/components/Maps/DottedMap/useMapPanZoom.js +41 -0
- package/dist/components/Maps/TopoJSONMap/TopoJSONMap.js +170 -0
- package/dist/components/Maps/TopoJSONMap/TopoJSONMap.vue.d.ts +30 -0
- package/dist/components/Maps/TopoJSONMap/TopoJSONMap2.js +4 -0
- package/dist/components/Maps/TopoJSONMap/data.d.ts +13 -0
- package/dist/components/Maps/TopoJSONMap/types.d.ts +40 -0
- package/dist/components/Maps/types.d.ts +48 -0
- package/dist/components/SankeyChart/SankeyChart.js +50 -40
- package/dist/components/SankeyChart/SankeyChart.vue.d.ts +1 -1
- package/dist/components/SankeyChart/types.d.ts +14 -1
- package/dist/components/Tooltip.js +32 -27
- package/dist/data/countries.geo.json.js +9 -0
- package/dist/index.d.ts +6 -3
- package/dist/index.js +27 -23
- package/dist/node_modules/.pnpm/@turf_boolean-point-in-polygon@7.3.1/node_modules/@turf/boolean-point-in-polygon/dist/esm/index.js +28 -0
- package/dist/node_modules/.pnpm/@turf_invariant@7.3.1/node_modules/@turf/invariant/dist/esm/index.js +20 -0
- package/dist/node_modules/.pnpm/mgrs@1.0.0/node_modules/mgrs/mgrs.js +222 -0
- package/dist/node_modules/.pnpm/point-in-polygon-hao@1.2.4/node_modules/point-in-polygon-hao/dist/esm/index.js +25 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/Point.js +24 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/Proj.js +46 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/adjust_axis.js +31 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/checkSanity.js +15 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/adjust_lat.js +8 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/adjust_lon.js +8 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/adjust_zone.js +13 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/asinhy.js +9 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/asinz.js +6 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/clens.js +8 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/clens_cmplx.js +10 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/cosh.js +7 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/e0fn.js +6 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/e1fn.js +6 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/e2fn.js +6 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/e3fn.js +6 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/gN.js +7 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/gatg.js +8 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/hypot.js +8 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/imlfn.js +11 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/iqsfnz.js +13 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/log1py.js +7 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/mlfn.js +6 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/msfnz.js +7 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/phi2z.js +10 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/pj_enfn.js +10 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/pj_inv_mlfn.js +14 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/pj_mlfn.js +6 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/qsfnz.js +7 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/sign.js +6 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/sinh.js +7 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/srat.js +6 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/toPoint.js +10 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/tsfnz.js +8 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/vincenty.js +33 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/constants/Datum.js +1278 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/constants/Ellipsoid.js +226 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/constants/PrimeMeridian.js +17 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/constants/units.js +25 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/constants/values.js +22 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/core.js +65 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/datum.js +8 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/datumUtils.js +82 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/datum_transform.js +94 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/defs.js +39 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/deriveConstants.js +30 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/extend.js +12 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/global.js +9 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/index.js +25 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/match.js +11 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/nadgrid.js +128 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/parseCode.js +47 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projString.js +119 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/aea.js +43 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/aeqd.js +36 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/bonne.js +55 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/cass.js +52 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/cea.js +36 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/eqc.js +27 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/eqdc.js +48 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/eqearth.js +30 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/etmerc.js +54 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/gauss.js +27 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/geocent.js +26 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/geos.js +49 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/gnom.js +28 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/krovak.js +31 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/laea.js +134 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/lcc.js +61 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/longlat.js +19 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/merc.js +49 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/mill.js +26 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/moll.js +37 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/nzmg.js +48 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/ob_tran.js +173 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/omerc.js +58 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/ortho.js +28 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/poly.js +68 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/qsc.js +67 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/robin.js +104 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/sinu.js +47 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/somerc.js +34 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/stere.js +46 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/sterea.js +33 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/tmerc.js +60 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/tpers.js +110 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/utm.js +22 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/vandg.js +34 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections.js +34 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/transform.js +49 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/projs.js +38 -0
- package/dist/node_modules/.pnpm/robust-predicates@3.0.2/node_modules/robust-predicates/esm/orient2d.js +23 -0
- package/dist/node_modules/.pnpm/robust-predicates@3.0.2/node_modules/robust-predicates/esm/util.js +30 -0
- package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/PROJJSONBuilder2015.js +9 -0
- package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/PROJJSONBuilder2019.js +20 -0
- package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/PROJJSONBuilderBase.js +171 -0
- package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/buildPROJJSON.js +11 -0
- package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/detectWKTVersion.js +7 -0
- package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/index.js +104 -0
- package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/parser.js +117 -0
- package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/process.js +89 -0
- package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/transformPROJJSON.js +73 -0
- package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/util.js +12 -0
- package/dist/types.d.ts +60 -13
- package/dist/types.js +4 -6
- package/dist/utils/geoJsonToGrid.d.ts +14 -0
- package/dist/utils/index.d.ts +1 -0
- package/package.json +8 -2
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
var s = {};
|
|
2
|
+
function O(r, t, a) {
|
|
3
|
+
return t instanceof ArrayBuffer ? A(r, t, a) : { ready: C(r, t) };
|
|
4
|
+
}
|
|
5
|
+
function A(r, t, a) {
|
|
6
|
+
var d = !0;
|
|
7
|
+
a !== void 0 && a.includeErrorFields === !1 && (d = !1);
|
|
8
|
+
var o = new DataView(t), u = x(o), l = P(o, u), e = R(o, l, u, d), n = { header: l, subgrids: e };
|
|
9
|
+
return s[r] = n, n;
|
|
10
|
+
}
|
|
11
|
+
async function C(r, t) {
|
|
12
|
+
for (var a = [], d = await t.getImageCount(), o = d - 1; o >= 0; o--) {
|
|
13
|
+
var u = await t.getImage(o), l = await u.readRasters(), e = l, n = [u.getWidth(), u.getHeight()], g = u.getBoundingBox().map(m), f = [u.fileDirectory.ModelPixelScale[0], u.fileDirectory.ModelPixelScale[1]].map(m), c = g[0] + (n[0] - 1) * f[0], N = g[3] - (n[1] - 1) * f[1], y = e[0], M = e[1], F = [];
|
|
14
|
+
for (let p = n[1] - 1; p >= 0; p--)
|
|
15
|
+
for (let h = n[0] - 1; h >= 0; h--) {
|
|
16
|
+
var S = p * n[0] + h;
|
|
17
|
+
F.push([-i(M[S]), i(y[S])]);
|
|
18
|
+
}
|
|
19
|
+
a.push({
|
|
20
|
+
del: f,
|
|
21
|
+
lim: n,
|
|
22
|
+
ll: [-c, N],
|
|
23
|
+
cvs: F
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
var I = {
|
|
27
|
+
header: {
|
|
28
|
+
nSubgrids: d
|
|
29
|
+
},
|
|
30
|
+
subgrids: a
|
|
31
|
+
};
|
|
32
|
+
return s[r] = I, I;
|
|
33
|
+
}
|
|
34
|
+
function V(r) {
|
|
35
|
+
if (r === void 0)
|
|
36
|
+
return null;
|
|
37
|
+
var t = r.split(",");
|
|
38
|
+
return t.map(G);
|
|
39
|
+
}
|
|
40
|
+
function G(r) {
|
|
41
|
+
if (r.length === 0)
|
|
42
|
+
return null;
|
|
43
|
+
var t = r[0] === "@";
|
|
44
|
+
return t && (r = r.slice(1)), r === "null" ? { name: "null", mandatory: !t, grid: null, isNull: !0 } : {
|
|
45
|
+
name: r,
|
|
46
|
+
mandatory: !t,
|
|
47
|
+
grid: s[r] || null,
|
|
48
|
+
isNull: !1
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
function m(r) {
|
|
52
|
+
return r * Math.PI / 180;
|
|
53
|
+
}
|
|
54
|
+
function i(r) {
|
|
55
|
+
return r / 3600 * Math.PI / 180;
|
|
56
|
+
}
|
|
57
|
+
function x(r) {
|
|
58
|
+
var t = r.getInt32(8, !1);
|
|
59
|
+
return t === 11 ? !1 : (t = r.getInt32(8, !0), t !== 11 && console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian"), !0);
|
|
60
|
+
}
|
|
61
|
+
function P(r, t) {
|
|
62
|
+
return {
|
|
63
|
+
nFields: r.getInt32(8, t),
|
|
64
|
+
nSubgridFields: r.getInt32(24, t),
|
|
65
|
+
nSubgrids: r.getInt32(40, t),
|
|
66
|
+
shiftType: v(r, 56, 64).trim(),
|
|
67
|
+
fromSemiMajorAxis: r.getFloat64(120, t),
|
|
68
|
+
fromSemiMinorAxis: r.getFloat64(136, t),
|
|
69
|
+
toSemiMajorAxis: r.getFloat64(152, t),
|
|
70
|
+
toSemiMinorAxis: r.getFloat64(168, t)
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
function v(r, t, a) {
|
|
74
|
+
return String.fromCharCode.apply(null, new Uint8Array(r.buffer.slice(t, a)));
|
|
75
|
+
}
|
|
76
|
+
function R(r, t, a, d) {
|
|
77
|
+
for (var o = 176, u = [], l = 0; l < t.nSubgrids; l++) {
|
|
78
|
+
var e = j(r, o, a), n = D(r, o, e, a, d), g = Math.round(
|
|
79
|
+
1 + (e.upperLongitude - e.lowerLongitude) / e.longitudeInterval
|
|
80
|
+
), f = Math.round(
|
|
81
|
+
1 + (e.upperLatitude - e.lowerLatitude) / e.latitudeInterval
|
|
82
|
+
);
|
|
83
|
+
u.push({
|
|
84
|
+
ll: [i(e.lowerLongitude), i(e.lowerLatitude)],
|
|
85
|
+
del: [i(e.longitudeInterval), i(e.latitudeInterval)],
|
|
86
|
+
lim: [g, f],
|
|
87
|
+
count: e.gridNodeCount,
|
|
88
|
+
cvs: T(n)
|
|
89
|
+
});
|
|
90
|
+
var c = 16;
|
|
91
|
+
d === !1 && (c = 8), o += 176 + e.gridNodeCount * c;
|
|
92
|
+
}
|
|
93
|
+
return u;
|
|
94
|
+
}
|
|
95
|
+
function T(r) {
|
|
96
|
+
return r.map(function(t) {
|
|
97
|
+
return [i(t.longitudeShift), i(t.latitudeShift)];
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
function j(r, t, a) {
|
|
101
|
+
return {
|
|
102
|
+
name: v(r, t + 8, t + 16).trim(),
|
|
103
|
+
parent: v(r, t + 24, t + 24 + 8).trim(),
|
|
104
|
+
lowerLatitude: r.getFloat64(t + 72, a),
|
|
105
|
+
upperLatitude: r.getFloat64(t + 88, a),
|
|
106
|
+
lowerLongitude: r.getFloat64(t + 104, a),
|
|
107
|
+
upperLongitude: r.getFloat64(t + 120, a),
|
|
108
|
+
latitudeInterval: r.getFloat64(t + 136, a),
|
|
109
|
+
longitudeInterval: r.getFloat64(t + 152, a),
|
|
110
|
+
gridNodeCount: r.getInt32(t + 168, a)
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
function D(r, t, a, d, o) {
|
|
114
|
+
var u = t + 176, l = 16;
|
|
115
|
+
o === !1 && (l = 8);
|
|
116
|
+
for (var e = [], n = 0; n < a.gridNodeCount; n++) {
|
|
117
|
+
var g = {
|
|
118
|
+
latitudeShift: r.getFloat32(u + n * l, d),
|
|
119
|
+
longitudeShift: r.getFloat32(u + n * l + 4, d)
|
|
120
|
+
};
|
|
121
|
+
o !== !1 && (g.latitudeAccuracy = r.getFloat32(u + n * l + 8, d), g.longitudeAccuracy = r.getFloat32(u + n * l + 12, d)), e.push(g);
|
|
122
|
+
}
|
|
123
|
+
return e;
|
|
124
|
+
}
|
|
125
|
+
export {
|
|
126
|
+
O as default,
|
|
127
|
+
V as getNadgrids
|
|
128
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import i from "./defs.js";
|
|
2
|
+
import f from "../../../../wkt-parser@1.5.2/node_modules/wkt-parser/index.js";
|
|
3
|
+
import u from "./projString.js";
|
|
4
|
+
import e from "./match.js";
|
|
5
|
+
function o(r) {
|
|
6
|
+
return typeof r == "string";
|
|
7
|
+
}
|
|
8
|
+
function s(r) {
|
|
9
|
+
return r in i;
|
|
10
|
+
}
|
|
11
|
+
function a(r) {
|
|
12
|
+
return r.indexOf("+") !== 0 && r.indexOf("[") !== -1 || typeof r == "object" && !("srsCode" in r);
|
|
13
|
+
}
|
|
14
|
+
var p = ["3857", "900913", "3785", "102113"];
|
|
15
|
+
function m(r) {
|
|
16
|
+
var t = e(r, "authority");
|
|
17
|
+
if (t) {
|
|
18
|
+
var n = e(t, "epsg");
|
|
19
|
+
return n && p.indexOf(n) > -1;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
function j(r) {
|
|
23
|
+
var t = e(r, "extension");
|
|
24
|
+
if (t)
|
|
25
|
+
return e(t, "proj4");
|
|
26
|
+
}
|
|
27
|
+
function v(r) {
|
|
28
|
+
return r[0] === "+";
|
|
29
|
+
}
|
|
30
|
+
function k(r) {
|
|
31
|
+
if (o(r)) {
|
|
32
|
+
if (s(r))
|
|
33
|
+
return i[r];
|
|
34
|
+
if (a(r)) {
|
|
35
|
+
var t = f(r);
|
|
36
|
+
if (m(t))
|
|
37
|
+
return i["EPSG:3857"];
|
|
38
|
+
var n = j(t);
|
|
39
|
+
return n ? u(n) : t;
|
|
40
|
+
}
|
|
41
|
+
if (v(r))
|
|
42
|
+
return u(r);
|
|
43
|
+
} else return "projName" in r ? r : f(r);
|
|
44
|
+
}
|
|
45
|
+
export {
|
|
46
|
+
k as default
|
|
47
|
+
};
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { D2R as r } from "./constants/values.js";
|
|
2
|
+
import c from "./constants/PrimeMeridian.js";
|
|
3
|
+
import m from "./constants/units.js";
|
|
4
|
+
import p from "./match.js";
|
|
5
|
+
function x(f) {
|
|
6
|
+
var n = {}, l = f.split("+").map(function(t) {
|
|
7
|
+
return t.trim();
|
|
8
|
+
}).filter(function(t) {
|
|
9
|
+
return t;
|
|
10
|
+
}).reduce(function(t, o) {
|
|
11
|
+
var u = o.split("=");
|
|
12
|
+
return u.push(!0), t[u[0].toLowerCase()] = u[1], t;
|
|
13
|
+
}, {}), a, e, i, s = {
|
|
14
|
+
proj: "projName",
|
|
15
|
+
datum: "datumCode",
|
|
16
|
+
rf: function(t) {
|
|
17
|
+
n.rf = parseFloat(t);
|
|
18
|
+
},
|
|
19
|
+
lat_0: function(t) {
|
|
20
|
+
n.lat0 = t * r;
|
|
21
|
+
},
|
|
22
|
+
lat_1: function(t) {
|
|
23
|
+
n.lat1 = t * r;
|
|
24
|
+
},
|
|
25
|
+
lat_2: function(t) {
|
|
26
|
+
n.lat2 = t * r;
|
|
27
|
+
},
|
|
28
|
+
lat_ts: function(t) {
|
|
29
|
+
n.lat_ts = t * r;
|
|
30
|
+
},
|
|
31
|
+
lon_0: function(t) {
|
|
32
|
+
n.long0 = t * r;
|
|
33
|
+
},
|
|
34
|
+
lon_1: function(t) {
|
|
35
|
+
n.long1 = t * r;
|
|
36
|
+
},
|
|
37
|
+
lon_2: function(t) {
|
|
38
|
+
n.long2 = t * r;
|
|
39
|
+
},
|
|
40
|
+
alpha: function(t) {
|
|
41
|
+
n.alpha = parseFloat(t) * r;
|
|
42
|
+
},
|
|
43
|
+
gamma: function(t) {
|
|
44
|
+
n.rectified_grid_angle = parseFloat(t) * r;
|
|
45
|
+
},
|
|
46
|
+
lonc: function(t) {
|
|
47
|
+
n.longc = t * r;
|
|
48
|
+
},
|
|
49
|
+
x_0: function(t) {
|
|
50
|
+
n.x0 = parseFloat(t);
|
|
51
|
+
},
|
|
52
|
+
y_0: function(t) {
|
|
53
|
+
n.y0 = parseFloat(t);
|
|
54
|
+
},
|
|
55
|
+
k_0: function(t) {
|
|
56
|
+
n.k0 = parseFloat(t);
|
|
57
|
+
},
|
|
58
|
+
k: function(t) {
|
|
59
|
+
n.k0 = parseFloat(t);
|
|
60
|
+
},
|
|
61
|
+
a: function(t) {
|
|
62
|
+
n.a = parseFloat(t);
|
|
63
|
+
},
|
|
64
|
+
b: function(t) {
|
|
65
|
+
n.b = parseFloat(t);
|
|
66
|
+
},
|
|
67
|
+
r: function(t) {
|
|
68
|
+
n.a = n.b = parseFloat(t);
|
|
69
|
+
},
|
|
70
|
+
r_a: function() {
|
|
71
|
+
n.R_A = !0;
|
|
72
|
+
},
|
|
73
|
+
zone: function(t) {
|
|
74
|
+
n.zone = parseInt(t, 10);
|
|
75
|
+
},
|
|
76
|
+
south: function() {
|
|
77
|
+
n.utmSouth = !0;
|
|
78
|
+
},
|
|
79
|
+
towgs84: function(t) {
|
|
80
|
+
n.datum_params = t.split(",").map(function(o) {
|
|
81
|
+
return parseFloat(o);
|
|
82
|
+
});
|
|
83
|
+
},
|
|
84
|
+
to_meter: function(t) {
|
|
85
|
+
n.to_meter = parseFloat(t);
|
|
86
|
+
},
|
|
87
|
+
units: function(t) {
|
|
88
|
+
n.units = t;
|
|
89
|
+
var o = p(m, t);
|
|
90
|
+
o && (n.to_meter = o.to_meter);
|
|
91
|
+
},
|
|
92
|
+
from_greenwich: function(t) {
|
|
93
|
+
n.from_greenwich = t * r;
|
|
94
|
+
},
|
|
95
|
+
pm: function(t) {
|
|
96
|
+
var o = p(c, t);
|
|
97
|
+
n.from_greenwich = (o || parseFloat(t)) * r;
|
|
98
|
+
},
|
|
99
|
+
nadgrids: function(t) {
|
|
100
|
+
t === "@null" ? n.datumCode = "none" : n.nadgrids = t;
|
|
101
|
+
},
|
|
102
|
+
axis: function(t) {
|
|
103
|
+
var o = "ewnsud";
|
|
104
|
+
t.length === 3 && o.indexOf(t.substr(0, 1)) !== -1 && o.indexOf(t.substr(1, 1)) !== -1 && o.indexOf(t.substr(2, 1)) !== -1 && (n.axis = t);
|
|
105
|
+
},
|
|
106
|
+
approx: function() {
|
|
107
|
+
n.approx = !0;
|
|
108
|
+
},
|
|
109
|
+
over: function() {
|
|
110
|
+
n.over = !0;
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
for (a in l)
|
|
114
|
+
e = l[a], a in s ? (i = s[a], typeof i == "function" ? i(e) : n[i] = e) : n[a] = e;
|
|
115
|
+
return typeof n.datumCode == "string" && n.datumCode !== "WGS84" && (n.datumCode = n.datumCode.toLowerCase()), n.projStr = f, n;
|
|
116
|
+
}
|
|
117
|
+
export {
|
|
118
|
+
x as default
|
|
119
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import m from "../common/msfnz.js";
|
|
2
|
+
import e from "../common/qsfnz.js";
|
|
3
|
+
import M from "../common/adjust_lon.js";
|
|
4
|
+
import f from "../common/asinz.js";
|
|
5
|
+
import { EPSLN as l } from "../constants/values.js";
|
|
6
|
+
function p() {
|
|
7
|
+
Math.abs(this.lat1 + this.lat2) < l || (this.temp = this.b / this.a, this.es = 1 - Math.pow(this.temp, 2), this.e3 = Math.sqrt(this.es), this.sin_po = Math.sin(this.lat1), this.cos_po = Math.cos(this.lat1), this.t1 = this.sin_po, this.con = this.sin_po, this.ms1 = m(this.e3, this.sin_po, this.cos_po), this.qs1 = e(this.e3, this.sin_po), this.sin_po = Math.sin(this.lat2), this.cos_po = Math.cos(this.lat2), this.t2 = this.sin_po, this.ms2 = m(this.e3, this.sin_po, this.cos_po), this.qs2 = e(this.e3, this.sin_po), this.sin_po = Math.sin(this.lat0), this.cos_po = Math.cos(this.lat0), this.t3 = this.sin_po, this.qs0 = e(this.e3, this.sin_po), Math.abs(this.lat1 - this.lat2) > l ? this.ns0 = (this.ms1 * this.ms1 - this.ms2 * this.ms2) / (this.qs2 - this.qs1) : this.ns0 = this.con, this.c = this.ms1 * this.ms1 + this.ns0 * this.qs1, this.rh = this.a * Math.sqrt(this.c - this.ns0 * this.qs0) / this.ns0);
|
|
8
|
+
}
|
|
9
|
+
function v(s) {
|
|
10
|
+
var a = s.x, n = s.y;
|
|
11
|
+
this.sin_phi = Math.sin(n), this.cos_phi = Math.cos(n);
|
|
12
|
+
var t = e(this.e3, this.sin_phi), i = this.a * Math.sqrt(this.c - this.ns0 * t) / this.ns0, h = this.ns0 * M(a - this.long0, this.over), o = i * Math.sin(h) + this.x0, r = this.rh - i * Math.cos(h) + this.y0;
|
|
13
|
+
return s.x = o, s.y = r, s;
|
|
14
|
+
}
|
|
15
|
+
function q(s) {
|
|
16
|
+
var a, n, t, i, h, o;
|
|
17
|
+
return s.x -= this.x0, s.y = this.rh - s.y + this.y0, this.ns0 >= 0 ? (a = Math.sqrt(s.x * s.x + s.y * s.y), t = 1) : (a = -Math.sqrt(s.x * s.x + s.y * s.y), t = -1), i = 0, a !== 0 && (i = Math.atan2(t * s.x, t * s.y)), t = a * this.ns0 / this.a, this.sphere ? o = Math.asin((this.c - t * t) / (2 * this.ns0)) : (n = (this.c - t * t) / this.ns0, o = this.phi1z(this.e3, n)), h = M(i / this.ns0 + this.long0, this.over), s.x = h, s.y = o, s;
|
|
18
|
+
}
|
|
19
|
+
function u(s, a) {
|
|
20
|
+
var n, t, i, h, o, r = f(0.5 * a);
|
|
21
|
+
if (s < l)
|
|
22
|
+
return r;
|
|
23
|
+
for (var c = s * s, _ = 1; _ <= 25; _++)
|
|
24
|
+
if (n = Math.sin(r), t = Math.cos(r), i = s * n, h = 1 - i * i, o = 0.5 * h * h / t * (a / (1 - c) - n / h + 0.5 / s * Math.log((1 - i) / (1 + i))), r = r + o, Math.abs(o) <= 1e-7)
|
|
25
|
+
return r;
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
var x = ["Albers_Conic_Equal_Area", "Albers_Equal_Area", "Albers", "aea"];
|
|
29
|
+
const g = {
|
|
30
|
+
init: p,
|
|
31
|
+
forward: v,
|
|
32
|
+
inverse: q,
|
|
33
|
+
names: x,
|
|
34
|
+
phi1z: u
|
|
35
|
+
};
|
|
36
|
+
export {
|
|
37
|
+
g as default,
|
|
38
|
+
v as forward,
|
|
39
|
+
p as init,
|
|
40
|
+
q as inverse,
|
|
41
|
+
x as names,
|
|
42
|
+
u as phi1z
|
|
43
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import u from "../common/adjust_lon.js";
|
|
2
|
+
import { HALF_PI as M, EPSLN as l } from "../constants/values.js";
|
|
3
|
+
import b from "../common/mlfn.js";
|
|
4
|
+
import q from "../common/e0fn.js";
|
|
5
|
+
import z from "../common/e1fn.js";
|
|
6
|
+
import w from "../common/e2fn.js";
|
|
7
|
+
import A from "../common/e3fn.js";
|
|
8
|
+
import E from "../common/asinz.js";
|
|
9
|
+
import d from "../common/imlfn.js";
|
|
10
|
+
import { vincentyDirect as I, vincentyInverse as L } from "../common/vincenty.js";
|
|
11
|
+
function P() {
|
|
12
|
+
this.sin_p12 = Math.sin(this.lat0), this.cos_p12 = Math.cos(this.lat0), this.f = this.es / (1 + Math.sqrt(1 - this.es));
|
|
13
|
+
}
|
|
14
|
+
function j(t) {
|
|
15
|
+
var i = t.x, a = t.y, c = Math.sin(t.y), m = Math.cos(t.y), s = u(i - this.long0, this.over), h, y, r, o, n, e, f, x, g, v, _;
|
|
16
|
+
return this.sphere ? Math.abs(this.sin_p12 - 1) <= l ? (t.x = this.x0 + this.a * (M - a) * Math.sin(s), t.y = this.y0 - this.a * (M - a) * Math.cos(s), t) : Math.abs(this.sin_p12 + 1) <= l ? (t.x = this.x0 + this.a * (M + a) * Math.sin(s), t.y = this.y0 + this.a * (M + a) * Math.cos(s), t) : (g = this.sin_p12 * c + this.cos_p12 * m * Math.cos(s), f = Math.acos(g), x = f ? f / Math.sin(f) : 1, t.x = this.x0 + this.a * x * m * Math.sin(s), t.y = this.y0 + this.a * x * (this.cos_p12 * c - this.sin_p12 * m * Math.cos(s)), t) : (h = q(this.es), y = z(this.es), r = w(this.es), o = A(this.es), Math.abs(this.sin_p12 - 1) <= l ? (n = this.a * b(h, y, r, o, M), e = this.a * b(h, y, r, o, a), t.x = this.x0 + (n - e) * Math.sin(s), t.y = this.y0 - (n - e) * Math.cos(s), t) : Math.abs(this.sin_p12 + 1) <= l ? (n = this.a * b(h, y, r, o, M), e = this.a * b(h, y, r, o, a), t.x = this.x0 + (n + e) * Math.sin(s), t.y = this.y0 + (n + e) * Math.cos(s), t) : Math.abs(i) < l && Math.abs(a - this.lat0) < l ? (t.x = t.y = 0, t) : (v = L(this.lat0, this.long0, a, i, this.a, this.f), _ = v.azi1, t.x = v.s12 * Math.sin(_), t.y = v.s12 * Math.cos(_), t));
|
|
17
|
+
}
|
|
18
|
+
function k(t) {
|
|
19
|
+
t.x -= this.x0, t.y -= this.y0;
|
|
20
|
+
var i, a, c, m, s, h, y, r, o, n, e, f, x, g, v, _;
|
|
21
|
+
return this.sphere ? (i = Math.sqrt(t.x * t.x + t.y * t.y), i > 2 * M * this.a ? void 0 : (a = i / this.a, c = Math.sin(a), m = Math.cos(a), s = this.long0, Math.abs(i) <= l ? h = this.lat0 : (h = E(m * this.sin_p12 + t.y * c * this.cos_p12 / i), y = Math.abs(this.lat0) - M, Math.abs(y) <= l ? this.lat0 >= 0 ? s = u(this.long0 + Math.atan2(t.x, -t.y), this.over) : s = u(this.long0 - Math.atan2(-t.x, t.y), this.over) : s = u(this.long0 + Math.atan2(t.x * c, i * this.cos_p12 * m - t.y * this.sin_p12 * c), this.over)), t.x = s, t.y = h, t)) : (r = q(this.es), o = z(this.es), n = w(this.es), e = A(this.es), Math.abs(this.sin_p12 - 1) <= l ? (f = this.a * b(r, o, n, e, M), i = Math.sqrt(t.x * t.x + t.y * t.y), x = f - i, h = d(x / this.a, r, o, n, e), s = u(this.long0 + Math.atan2(t.x, -1 * t.y), this.over), t.x = s, t.y = h, t) : Math.abs(this.sin_p12 + 1) <= l ? (f = this.a * b(r, o, n, e, M), i = Math.sqrt(t.x * t.x + t.y * t.y), x = i - f, h = d(x / this.a, r, o, n, e), s = u(this.long0 + Math.atan2(t.x, t.y), this.over), t.x = s, t.y = h, t) : (g = Math.atan2(t.x, t.y), v = Math.sqrt(t.x * t.x + t.y * t.y), _ = I(this.lat0, this.long0, g, v, this.a, this.f), t.x = _.lon2, t.y = _.lat2, t));
|
|
22
|
+
}
|
|
23
|
+
var D = ["Azimuthal_Equidistant", "aeqd"];
|
|
24
|
+
const Q = {
|
|
25
|
+
init: P,
|
|
26
|
+
forward: j,
|
|
27
|
+
inverse: k,
|
|
28
|
+
names: D
|
|
29
|
+
};
|
|
30
|
+
export {
|
|
31
|
+
Q as default,
|
|
32
|
+
j as forward,
|
|
33
|
+
P as init,
|
|
34
|
+
k as inverse,
|
|
35
|
+
D as names
|
|
36
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import m from "../common/adjust_lat.js";
|
|
2
|
+
import e from "../common/adjust_lon.js";
|
|
3
|
+
import f from "../common/hypot.js";
|
|
4
|
+
import M from "../common/pj_enfn.js";
|
|
5
|
+
import x from "../common/pj_inv_mlfn.js";
|
|
6
|
+
import y from "../common/pj_mlfn.js";
|
|
7
|
+
import { HALF_PI as r } from "../constants/values.js";
|
|
8
|
+
var n = 1e-10;
|
|
9
|
+
function c() {
|
|
10
|
+
var t;
|
|
11
|
+
if (this.phi1 = this.lat1, Math.abs(this.phi1) < n)
|
|
12
|
+
throw new Error();
|
|
13
|
+
this.es ? (this.en = M(this.es), this.m1 = y(
|
|
14
|
+
this.phi1,
|
|
15
|
+
this.am1 = Math.sin(this.phi1),
|
|
16
|
+
t = Math.cos(this.phi1),
|
|
17
|
+
this.en
|
|
18
|
+
), this.am1 = t / (Math.sqrt(1 - this.es * this.am1 * this.am1) * this.am1), this.inverse = v, this.forward = l) : (Math.abs(this.phi1) + n >= r ? this.cphi1 = 0 : this.cphi1 = 1 / Math.tan(this.phi1), this.inverse = _, this.forward = u);
|
|
19
|
+
}
|
|
20
|
+
function l(t) {
|
|
21
|
+
var a = e(t.x - (this.long0 || 0), this.over), i = t.y, s, h, o;
|
|
22
|
+
return s = this.am1 + this.m1 - y(i, h = Math.sin(i), o = Math.cos(i), this.en), h = o * a / (s * Math.sqrt(1 - this.es * h * h)), t.x = s * Math.sin(h), t.y = this.am1 - s * Math.cos(h), t.x = this.a * t.x + (this.x0 || 0), t.y = this.a * t.y + (this.y0 || 0), t;
|
|
23
|
+
}
|
|
24
|
+
function v(t) {
|
|
25
|
+
t.x = (t.x - (this.x0 || 0)) / this.a, t.y = (t.y - (this.y0 || 0)) / this.a;
|
|
26
|
+
var a, i, s, h;
|
|
27
|
+
if (i = f(t.x, t.y = this.am1 - t.y), h = x(this.am1 + this.m1 - i, this.es, this.en), (a = Math.abs(h)) < r)
|
|
28
|
+
a = Math.sin(h), s = i * Math.atan2(t.x, t.y) * Math.sqrt(1 - this.es * a * a) / Math.cos(h);
|
|
29
|
+
else if (Math.abs(a - r) <= n)
|
|
30
|
+
s = 0;
|
|
31
|
+
else
|
|
32
|
+
throw new Error();
|
|
33
|
+
return t.x = e(s + (this.long0 || 0), this.over), t.y = m(h), t;
|
|
34
|
+
}
|
|
35
|
+
function u(t) {
|
|
36
|
+
var a = e(t.x - (this.long0 || 0), this.over), i = t.y, s, h;
|
|
37
|
+
return h = this.cphi1 + this.phi1 - i, Math.abs(h) > n ? (t.x = h * Math.sin(s = a * Math.cos(i) / h), t.y = this.cphi1 - h * Math.cos(s)) : t.x = t.y = 0, t.x = this.a * t.x + (this.x0 || 0), t.y = this.a * t.y + (this.y0 || 0), t;
|
|
38
|
+
}
|
|
39
|
+
function _(t) {
|
|
40
|
+
t.x = (t.x - (this.x0 || 0)) / this.a, t.y = (t.y - (this.y0 || 0)) / this.a;
|
|
41
|
+
var a, i, s = f(t.x, t.y = this.cphi1 - t.y);
|
|
42
|
+
if (i = this.cphi1 + this.phi1 - s, Math.abs(i) > r)
|
|
43
|
+
throw new Error();
|
|
44
|
+
return Math.abs(Math.abs(i) - r) <= n ? a = 0 : a = s * Math.atan2(t.x, t.y) / Math.cos(i), t.x = e(a + (this.long0 || 0), this.over), t.y = m(i), t;
|
|
45
|
+
}
|
|
46
|
+
var b = ["bonne", "Bonne (Werner lat_1=90)"];
|
|
47
|
+
const A = {
|
|
48
|
+
init: c,
|
|
49
|
+
names: b
|
|
50
|
+
};
|
|
51
|
+
export {
|
|
52
|
+
A as default,
|
|
53
|
+
c as init,
|
|
54
|
+
b as names
|
|
55
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import y from "../common/mlfn.js";
|
|
2
|
+
import g from "../common/e0fn.js";
|
|
3
|
+
import _ from "../common/e1fn.js";
|
|
4
|
+
import w from "../common/e2fn.js";
|
|
5
|
+
import b from "../common/e3fn.js";
|
|
6
|
+
import c from "../common/gN.js";
|
|
7
|
+
import u from "../common/adjust_lon.js";
|
|
8
|
+
import j from "../common/adjust_lat.js";
|
|
9
|
+
import C from "../common/imlfn.js";
|
|
10
|
+
import { HALF_PI as x, EPSLN as L } from "../constants/values.js";
|
|
11
|
+
function N() {
|
|
12
|
+
this.sphere || (this.e0 = g(this.es), this.e1 = _(this.es), this.e2 = w(this.es), this.e3 = b(this.es), this.ml0 = this.a * y(this.e0, this.e1, this.e2, this.e3, this.lat0));
|
|
13
|
+
}
|
|
14
|
+
function P(t) {
|
|
15
|
+
var o, n, i = t.x, s = t.y;
|
|
16
|
+
if (i = u(i - this.long0, this.over), this.sphere)
|
|
17
|
+
o = this.a * Math.asin(Math.cos(s) * Math.sin(i)), n = this.a * (Math.atan2(Math.tan(s), Math.cos(i)) - this.lat0);
|
|
18
|
+
else {
|
|
19
|
+
var m = Math.sin(s), f = Math.cos(s), h = c(this.a, this.e, m), r = Math.tan(s) * Math.tan(s), v = i * Math.cos(s), e = v * v, a = this.es * f * f / (1 - this.es), M = this.a * y(this.e0, this.e1, this.e2, this.e3, s);
|
|
20
|
+
o = h * v * (1 - e * r * (1 / 6 - (8 - r + 8 * a) * e / 120)), n = M - this.ml0 + h * m / f * e * (0.5 + (5 - r + 6 * a) * e / 24);
|
|
21
|
+
}
|
|
22
|
+
return t.x = o + this.x0, t.y = n + this.y0, t;
|
|
23
|
+
}
|
|
24
|
+
function S(t) {
|
|
25
|
+
t.x -= this.x0, t.y -= this.y0;
|
|
26
|
+
var o = t.x / this.a, n = t.y / this.a, i, s;
|
|
27
|
+
if (this.sphere) {
|
|
28
|
+
var m = n + this.lat0;
|
|
29
|
+
i = Math.asin(Math.sin(m) * Math.cos(o)), s = Math.atan2(Math.tan(o), Math.cos(m));
|
|
30
|
+
} else {
|
|
31
|
+
var f = this.ml0 / this.a + n, h = C(f, this.e0, this.e1, this.e2, this.e3);
|
|
32
|
+
if (Math.abs(Math.abs(h) - x) <= L)
|
|
33
|
+
return t.x = this.long0, t.y = x, n < 0 && (t.y *= -1), t;
|
|
34
|
+
var r = c(this.a, this.e, Math.sin(h)), v = r * r * r / this.a / this.a * (1 - this.es), e = Math.pow(Math.tan(h), 2), a = o * this.a / r, M = a * a;
|
|
35
|
+
i = h - r * Math.tan(h) / v * a * a * (0.5 - (1 + 3 * e) * a * a / 24), s = a * (1 - M * (e / 3 + (1 + 3 * e) * e * M / 15)) / Math.cos(h);
|
|
36
|
+
}
|
|
37
|
+
return t.x = u(s + this.long0, this.over), t.y = j(i), t;
|
|
38
|
+
}
|
|
39
|
+
var A = ["Cassini", "Cassini_Soldner", "cass"];
|
|
40
|
+
const J = {
|
|
41
|
+
init: N,
|
|
42
|
+
forward: P,
|
|
43
|
+
inverse: S,
|
|
44
|
+
names: A
|
|
45
|
+
};
|
|
46
|
+
export {
|
|
47
|
+
J as default,
|
|
48
|
+
P as forward,
|
|
49
|
+
N as init,
|
|
50
|
+
S as inverse,
|
|
51
|
+
A as names
|
|
52
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import r from "../common/adjust_lon.js";
|
|
2
|
+
import e from "../common/qsfnz.js";
|
|
3
|
+
import l from "../common/msfnz.js";
|
|
4
|
+
import f from "../common/iqsfnz.js";
|
|
5
|
+
function v() {
|
|
6
|
+
this.sphere || (this.k0 = l(this.e, Math.sin(this.lat_ts), Math.cos(this.lat_ts)));
|
|
7
|
+
}
|
|
8
|
+
function c(t) {
|
|
9
|
+
var i = t.x, s = t.y, h, a, o = r(i - this.long0, this.over);
|
|
10
|
+
if (this.sphere)
|
|
11
|
+
h = this.x0 + this.a * o * Math.cos(this.lat_ts), a = this.y0 + this.a * Math.sin(s) / Math.cos(this.lat_ts);
|
|
12
|
+
else {
|
|
13
|
+
var n = e(this.e, Math.sin(s));
|
|
14
|
+
h = this.x0 + this.a * this.k0 * o, a = this.y0 + this.a * n * 0.5 / this.k0;
|
|
15
|
+
}
|
|
16
|
+
return t.x = h, t.y = a, t;
|
|
17
|
+
}
|
|
18
|
+
function m(t) {
|
|
19
|
+
t.x -= this.x0, t.y -= this.y0;
|
|
20
|
+
var i, s;
|
|
21
|
+
return this.sphere ? (i = r(this.long0 + t.x / this.a / Math.cos(this.lat_ts), this.over), s = Math.asin(t.y / this.a * Math.cos(this.lat_ts))) : (s = f(this.e, 2 * t.y * this.k0 / this.a), i = r(this.long0 + t.x / (this.a * this.k0), this.over)), t.x = i, t.y = s, t;
|
|
22
|
+
}
|
|
23
|
+
var x = ["cea"];
|
|
24
|
+
const d = {
|
|
25
|
+
init: v,
|
|
26
|
+
forward: c,
|
|
27
|
+
inverse: m,
|
|
28
|
+
names: x
|
|
29
|
+
};
|
|
30
|
+
export {
|
|
31
|
+
d as default,
|
|
32
|
+
c as forward,
|
|
33
|
+
v as init,
|
|
34
|
+
m as inverse,
|
|
35
|
+
x as names
|
|
36
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import a from "../common/adjust_lon.js";
|
|
2
|
+
import r from "../common/adjust_lat.js";
|
|
3
|
+
function n() {
|
|
4
|
+
this.x0 = this.x0 || 0, this.y0 = this.y0 || 0, this.lat0 = this.lat0 || 0, this.long0 = this.long0 || 0, this.lat_ts = this.lat_ts || 0, this.title = this.title || "Equidistant Cylindrical (Plate Carre)", this.rc = Math.cos(this.lat_ts);
|
|
5
|
+
}
|
|
6
|
+
function o(t) {
|
|
7
|
+
var i = t.x, s = t.y, h = a(i - this.long0, this.over), l = r(s - this.lat0);
|
|
8
|
+
return t.x = this.x0 + this.a * h * this.rc, t.y = this.y0 + this.a * l, t;
|
|
9
|
+
}
|
|
10
|
+
function e(t) {
|
|
11
|
+
var i = t.x, s = t.y;
|
|
12
|
+
return t.x = a(this.long0 + (i - this.x0) / (this.a * this.rc), this.over), t.y = r(this.lat0 + (s - this.y0) / this.a), t;
|
|
13
|
+
}
|
|
14
|
+
var c = ["Equirectangular", "Equidistant_Cylindrical", "Equidistant_Cylindrical_Spherical", "eqc"];
|
|
15
|
+
const y = {
|
|
16
|
+
init: n,
|
|
17
|
+
forward: o,
|
|
18
|
+
inverse: e,
|
|
19
|
+
names: c
|
|
20
|
+
};
|
|
21
|
+
export {
|
|
22
|
+
y as default,
|
|
23
|
+
o as forward,
|
|
24
|
+
n as init,
|
|
25
|
+
e as inverse,
|
|
26
|
+
c as names
|
|
27
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import v from "../common/e0fn.js";
|
|
2
|
+
import c from "../common/e1fn.js";
|
|
3
|
+
import x from "../common/e2fn.js";
|
|
4
|
+
import y from "../common/e3fn.js";
|
|
5
|
+
import m from "../common/msfnz.js";
|
|
6
|
+
import r from "../common/mlfn.js";
|
|
7
|
+
import o from "../common/adjust_lon.js";
|
|
8
|
+
import M from "../common/adjust_lat.js";
|
|
9
|
+
import _ from "../common/imlfn.js";
|
|
10
|
+
import { EPSLN as l } from "../constants/values.js";
|
|
11
|
+
function u() {
|
|
12
|
+
Math.abs(this.lat1 + this.lat2) < l || (this.lat2 = this.lat2 || this.lat1, this.temp = this.b / this.a, this.es = 1 - Math.pow(this.temp, 2), this.e = Math.sqrt(this.es), this.e0 = v(this.es), this.e1 = c(this.es), this.e2 = x(this.es), this.e3 = y(this.es), this.sin_phi = Math.sin(this.lat1), this.cos_phi = Math.cos(this.lat1), this.ms1 = m(this.e, this.sin_phi, this.cos_phi), this.ml1 = r(this.e0, this.e1, this.e2, this.e3, this.lat1), Math.abs(this.lat1 - this.lat2) < l ? this.ns = this.sin_phi : (this.sin_phi = Math.sin(this.lat2), this.cos_phi = Math.cos(this.lat2), this.ms2 = m(this.e, this.sin_phi, this.cos_phi), this.ml2 = r(this.e0, this.e1, this.e2, this.e3, this.lat2), this.ns = (this.ms1 - this.ms2) / (this.ml2 - this.ml1)), this.g = this.ml1 + this.ms1 / this.ns, this.ml0 = r(this.e0, this.e1, this.e2, this.e3, this.lat0), this.rh = this.a * (this.g - this.ml0));
|
|
13
|
+
}
|
|
14
|
+
function g(t) {
|
|
15
|
+
var h = t.x, i = t.y, s;
|
|
16
|
+
if (this.sphere)
|
|
17
|
+
s = this.a * (this.g - i);
|
|
18
|
+
else {
|
|
19
|
+
var e = r(this.e0, this.e1, this.e2, this.e3, i);
|
|
20
|
+
s = this.a * (this.g - e);
|
|
21
|
+
}
|
|
22
|
+
var a = this.ns * o(h - this.long0, this.over), n = this.x0 + s * Math.sin(a), f = this.y0 + this.rh - s * Math.cos(a);
|
|
23
|
+
return t.x = n, t.y = f, t;
|
|
24
|
+
}
|
|
25
|
+
function d(t) {
|
|
26
|
+
t.x -= this.x0, t.y = this.rh - t.y + this.y0;
|
|
27
|
+
var h, i, s, e;
|
|
28
|
+
this.ns >= 0 ? (i = Math.sqrt(t.x * t.x + t.y * t.y), h = 1) : (i = -Math.sqrt(t.x * t.x + t.y * t.y), h = -1);
|
|
29
|
+
var a = 0;
|
|
30
|
+
if (i !== 0 && (a = Math.atan2(h * t.x, h * t.y)), this.sphere)
|
|
31
|
+
return e = o(this.long0 + a / this.ns, this.over), s = M(this.g - i / this.a), t.x = e, t.y = s, t;
|
|
32
|
+
var n = this.g - i / this.a;
|
|
33
|
+
return s = _(n, this.e0, this.e1, this.e2, this.e3), e = o(this.long0 + a / this.ns, this.over), t.x = e, t.y = s, t;
|
|
34
|
+
}
|
|
35
|
+
var q = ["Equidistant_Conic", "eqdc"];
|
|
36
|
+
const S = {
|
|
37
|
+
init: u,
|
|
38
|
+
forward: g,
|
|
39
|
+
inverse: d,
|
|
40
|
+
names: q
|
|
41
|
+
};
|
|
42
|
+
export {
|
|
43
|
+
S as default,
|
|
44
|
+
g as forward,
|
|
45
|
+
u as init,
|
|
46
|
+
d as inverse,
|
|
47
|
+
q as names
|
|
48
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import m from "../common/adjust_lon.js";
|
|
2
|
+
var h = 1.340264, r = -0.081106, n = 893e-6, e = 3796e-6, o = Math.sqrt(3) / 2;
|
|
3
|
+
function v() {
|
|
4
|
+
this.es = 0, this.long0 = this.long0 !== void 0 ? this.long0 : 0, this.x0 = this.x0 !== void 0 ? this.x0 : 0, this.y0 = this.y0 !== void 0 ? this.y0 : 0;
|
|
5
|
+
}
|
|
6
|
+
function M(a) {
|
|
7
|
+
var x = m(a.x - this.long0, this.over), y = a.y, i = Math.asin(o * Math.sin(y)), t = i * i, s = t * t * t;
|
|
8
|
+
return a.x = x * Math.cos(i) / (o * (h + 3 * r * t + s * (7 * n + 9 * e * t))), a.y = i * (h + r * t + s * (n + e * t)), a.x = this.a * a.x + this.x0, a.y = this.a * a.y + this.y0, a;
|
|
9
|
+
}
|
|
10
|
+
function q(a) {
|
|
11
|
+
a.x = (a.x - this.x0) / this.a, a.y = (a.y - this.y0) / this.a;
|
|
12
|
+
var x = 1e-9, y = 12, i = a.y, t, s, u, d, l, f;
|
|
13
|
+
for (f = 0; f < y && (t = i * i, s = t * t * t, u = i * (h + r * t + s * (n + e * t)) - a.y, d = h + 3 * r * t + s * (7 * n + 9 * e * t), i -= l = u / d, !(Math.abs(l) < x)); ++f)
|
|
14
|
+
;
|
|
15
|
+
return t = i * i, s = t * t * t, a.x = o * a.x * (h + 3 * r * t + s * (7 * n + 9 * e * t)) / Math.cos(i), a.y = Math.asin(Math.sin(i) / o), a.x = m(a.x + this.long0, this.over), a;
|
|
16
|
+
}
|
|
17
|
+
var c = ["eqearth", "Equal Earth", "Equal_Earth"];
|
|
18
|
+
const L = {
|
|
19
|
+
init: v,
|
|
20
|
+
forward: M,
|
|
21
|
+
inverse: q,
|
|
22
|
+
names: c
|
|
23
|
+
};
|
|
24
|
+
export {
|
|
25
|
+
L as default,
|
|
26
|
+
M as forward,
|
|
27
|
+
v as init,
|
|
28
|
+
q as inverse,
|
|
29
|
+
c as names
|
|
30
|
+
};
|