proj4rs 0.1.8 → 0.1.12
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/README.md +7 -1
- package/package.json +1 -1
- package/proj4.js +1 -1
- package/proj4rs.d.ts +7 -46
- package/proj4rs.js +2 -2
- package/proj4rs_bg.js +145 -206
- package/proj4rs_bg.wasm +0 -0
- package/proj4rs_bg.wasm.d.ts +25 -23
package/README.md
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
|
+
[](https://crates.io/crates/proj4rs)
|
|
1
2
|
[](https://crates.io/crates/proj4rs)
|
|
3
|
+
[](https://github.com/image-rs/imageproc/blob/master/LICENSE)
|
|
2
4
|
[](https://docs.rs/proj4rs/latest/proj4rs/)
|
|
3
5
|
[](https://docs.3liz.org/proj4rs/)
|
|
4
6
|
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
5
11
|
---
|
|
6
12
|
|
|
7
13
|
Rust library for transforming geographic point coordinates
|
|
@@ -101,4 +107,4 @@ Proj.transform(from, to, point);
|
|
|
101
107
|
|
|
102
108
|
## Contributing
|
|
103
109
|
|
|
104
|
-
You can contribute to this library by going on the [proj4rs](
|
|
110
|
+
You can contribute to this library by going on the [proj4rs](./CONTRIBUTING.md) repository
|
package/package.json
CHANGED
package/proj4.js
CHANGED
|
@@ -107,7 +107,7 @@ function transformer(from, to, coords) {
|
|
|
107
107
|
return [transformed.x, transformed.y];
|
|
108
108
|
}
|
|
109
109
|
} else {
|
|
110
|
-
keys = Object.keys(coords);
|
|
110
|
+
let keys = Object.keys(coords);
|
|
111
111
|
if (keys.length > 2) {
|
|
112
112
|
keys.forEach(function (key) {
|
|
113
113
|
if (key !== 'x' && key !== 'y' && (key !== 'z' || geocent)) {
|
package/proj4rs.d.ts
CHANGED
|
@@ -1,66 +1,27 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
* Read a binary NTv2 from Dataview.
|
|
5
|
-
*
|
|
6
|
-
* Note: only NTv2 file format are supported.
|
|
7
|
-
* @param {string} key
|
|
8
|
-
* @param {DataView} view
|
|
9
|
-
*/
|
|
10
|
-
export function add_nadgrid(key: string, view: DataView): void;
|
|
11
|
-
/**
|
|
12
|
-
* @param {Projection} src
|
|
13
|
-
* @param {Projection} dst
|
|
14
|
-
* @param {Point} point
|
|
15
|
-
*/
|
|
16
3
|
export function transform(src: Projection, dst: Projection, point: Point): void;
|
|
17
4
|
/**
|
|
18
|
-
|
|
5
|
+
* Read a binary NTv2 from Dataview.
|
|
6
|
+
*
|
|
7
|
+
* Note: only NTv2 file format are supported.
|
|
8
|
+
*/
|
|
9
|
+
export function add_nadgrid(key: string, view: DataView): void;
|
|
19
10
|
export class Point {
|
|
20
11
|
free(): void;
|
|
21
|
-
/**
|
|
22
|
-
* @param {number} x
|
|
23
|
-
* @param {number} y
|
|
24
|
-
* @param {number} z
|
|
25
|
-
*/
|
|
26
12
|
constructor(x: number, y: number, z: number);
|
|
27
|
-
/**
|
|
28
|
-
*/
|
|
29
13
|
x: number;
|
|
30
|
-
/**
|
|
31
|
-
*/
|
|
32
14
|
y: number;
|
|
33
|
-
/**
|
|
34
|
-
*/
|
|
35
15
|
z: number;
|
|
36
16
|
}
|
|
37
|
-
/**
|
|
38
|
-
*/
|
|
39
17
|
export class Projection {
|
|
40
18
|
free(): void;
|
|
41
|
-
/**
|
|
42
|
-
* @param {string} defn
|
|
43
|
-
*/
|
|
44
19
|
constructor(defn: string);
|
|
45
|
-
/**
|
|
46
|
-
*/
|
|
47
|
-
readonly axis: string;
|
|
48
|
-
/**
|
|
49
|
-
*/
|
|
50
20
|
readonly isGeocentric: boolean;
|
|
51
|
-
/**
|
|
52
|
-
*/
|
|
53
21
|
readonly isLatlon: boolean;
|
|
54
|
-
/**
|
|
55
|
-
*/
|
|
56
22
|
readonly isNormalizedAxis: boolean;
|
|
57
|
-
|
|
58
|
-
|
|
23
|
+
readonly axis: string;
|
|
24
|
+
readonly units: string;
|
|
59
25
|
readonly projName: string;
|
|
60
|
-
/**
|
|
61
|
-
*/
|
|
62
26
|
readonly to_meter: number;
|
|
63
|
-
/**
|
|
64
|
-
*/
|
|
65
|
-
readonly units: string;
|
|
66
27
|
}
|
package/proj4rs.js
CHANGED
package/proj4rs_bg.js
CHANGED
|
@@ -24,23 +24,6 @@ function getStringFromWasm0(ptr, len) {
|
|
|
24
24
|
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
const heap = new Array(128).fill(undefined);
|
|
28
|
-
|
|
29
|
-
heap.push(undefined, null, true, false);
|
|
30
|
-
|
|
31
|
-
let heap_next = heap.length;
|
|
32
|
-
|
|
33
|
-
function addHeapObject(obj) {
|
|
34
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
35
|
-
const idx = heap_next;
|
|
36
|
-
heap_next = heap[idx];
|
|
37
|
-
|
|
38
|
-
heap[idx] = obj;
|
|
39
|
-
return idx;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
function getObject(idx) { return heap[idx]; }
|
|
43
|
-
|
|
44
27
|
let WASM_VECTOR_LEN = 0;
|
|
45
28
|
|
|
46
29
|
const lTextEncoder = typeof TextEncoder === 'undefined' ? (0, module.require)('util').TextEncoder : TextEncoder;
|
|
@@ -112,82 +95,52 @@ function getDataViewMemory0() {
|
|
|
112
95
|
return cachedDataViewMemory0;
|
|
113
96
|
}
|
|
114
97
|
|
|
115
|
-
function
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
function takeObject(idx) {
|
|
122
|
-
const ret = getObject(idx);
|
|
123
|
-
dropObject(idx);
|
|
124
|
-
return ret;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
let stack_pointer = 128;
|
|
128
|
-
|
|
129
|
-
function addBorrowedObject(obj) {
|
|
130
|
-
if (stack_pointer == 1) throw new Error('out of js stack');
|
|
131
|
-
heap[--stack_pointer] = obj;
|
|
132
|
-
return stack_pointer;
|
|
133
|
-
}
|
|
134
|
-
/**
|
|
135
|
-
* Read a binary NTv2 from Dataview.
|
|
136
|
-
*
|
|
137
|
-
* Note: only NTv2 file format are supported.
|
|
138
|
-
* @param {string} key
|
|
139
|
-
* @param {DataView} view
|
|
140
|
-
*/
|
|
141
|
-
export function add_nadgrid(key, view) {
|
|
142
|
-
try {
|
|
143
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
144
|
-
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
145
|
-
const len0 = WASM_VECTOR_LEN;
|
|
146
|
-
wasm.add_nadgrid(retptr, ptr0, len0, addBorrowedObject(view));
|
|
147
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
148
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
149
|
-
if (r1) {
|
|
150
|
-
throw takeObject(r0);
|
|
151
|
-
}
|
|
152
|
-
} finally {
|
|
153
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
154
|
-
heap[stack_pointer++] = undefined;
|
|
155
|
-
}
|
|
98
|
+
function takeFromExternrefTable0(idx) {
|
|
99
|
+
const value = wasm.__wbindgen_export_0.get(idx);
|
|
100
|
+
wasm.__externref_table_dealloc(idx);
|
|
101
|
+
return value;
|
|
156
102
|
}
|
|
157
103
|
|
|
158
104
|
function _assertClass(instance, klass) {
|
|
159
105
|
if (!(instance instanceof klass)) {
|
|
160
106
|
throw new Error(`expected instance of ${klass.name}`);
|
|
161
107
|
}
|
|
162
|
-
return instance.ptr;
|
|
163
108
|
}
|
|
164
109
|
/**
|
|
165
|
-
* @param {Projection} src
|
|
166
|
-
* @param {Projection} dst
|
|
167
|
-
* @param {Point} point
|
|
168
|
-
*/
|
|
110
|
+
* @param {Projection} src
|
|
111
|
+
* @param {Projection} dst
|
|
112
|
+
* @param {Point} point
|
|
113
|
+
*/
|
|
169
114
|
export function transform(src, dst, point) {
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
115
|
+
_assertClass(src, Projection);
|
|
116
|
+
_assertClass(dst, Projection);
|
|
117
|
+
_assertClass(point, Point);
|
|
118
|
+
const ret = wasm.transform(src.__wbg_ptr, dst.__wbg_ptr, point.__wbg_ptr);
|
|
119
|
+
if (ret[1]) {
|
|
120
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Read a binary NTv2 from Dataview.
|
|
126
|
+
*
|
|
127
|
+
* Note: only NTv2 file format are supported.
|
|
128
|
+
* @param {string} key
|
|
129
|
+
* @param {DataView} view
|
|
130
|
+
*/
|
|
131
|
+
export function add_nadgrid(key, view) {
|
|
132
|
+
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
133
|
+
const len0 = WASM_VECTOR_LEN;
|
|
134
|
+
const ret = wasm.add_nadgrid(ptr0, len0, view);
|
|
135
|
+
if (ret[1]) {
|
|
136
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
183
137
|
}
|
|
184
138
|
}
|
|
185
139
|
|
|
186
140
|
const PointFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
187
141
|
? { register: () => {}, unregister: () => {} }
|
|
188
142
|
: new FinalizationRegistry(ptr => wasm.__wbg_point_free(ptr >>> 0, 1));
|
|
189
|
-
|
|
190
|
-
*/
|
|
143
|
+
|
|
191
144
|
export class Point {
|
|
192
145
|
|
|
193
146
|
__destroy_into_raw() {
|
|
@@ -202,49 +155,49 @@ export class Point {
|
|
|
202
155
|
wasm.__wbg_point_free(ptr, 0);
|
|
203
156
|
}
|
|
204
157
|
/**
|
|
205
|
-
|
|
206
|
-
|
|
158
|
+
* @returns {number}
|
|
159
|
+
*/
|
|
207
160
|
get x() {
|
|
208
161
|
const ret = wasm.__wbg_get_point_x(this.__wbg_ptr);
|
|
209
162
|
return ret;
|
|
210
163
|
}
|
|
211
164
|
/**
|
|
212
|
-
|
|
213
|
-
|
|
165
|
+
* @param {number} arg0
|
|
166
|
+
*/
|
|
214
167
|
set x(arg0) {
|
|
215
168
|
wasm.__wbg_set_point_x(this.__wbg_ptr, arg0);
|
|
216
169
|
}
|
|
217
170
|
/**
|
|
218
|
-
|
|
219
|
-
|
|
171
|
+
* @returns {number}
|
|
172
|
+
*/
|
|
220
173
|
get y() {
|
|
221
174
|
const ret = wasm.__wbg_get_point_y(this.__wbg_ptr);
|
|
222
175
|
return ret;
|
|
223
176
|
}
|
|
224
177
|
/**
|
|
225
|
-
|
|
226
|
-
|
|
178
|
+
* @param {number} arg0
|
|
179
|
+
*/
|
|
227
180
|
set y(arg0) {
|
|
228
181
|
wasm.__wbg_set_point_y(this.__wbg_ptr, arg0);
|
|
229
182
|
}
|
|
230
183
|
/**
|
|
231
|
-
|
|
232
|
-
|
|
184
|
+
* @returns {number}
|
|
185
|
+
*/
|
|
233
186
|
get z() {
|
|
234
187
|
const ret = wasm.__wbg_get_point_z(this.__wbg_ptr);
|
|
235
188
|
return ret;
|
|
236
189
|
}
|
|
237
190
|
/**
|
|
238
|
-
|
|
239
|
-
|
|
191
|
+
* @param {number} arg0
|
|
192
|
+
*/
|
|
240
193
|
set z(arg0) {
|
|
241
194
|
wasm.__wbg_set_point_z(this.__wbg_ptr, arg0);
|
|
242
195
|
}
|
|
243
196
|
/**
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
197
|
+
* @param {number} x
|
|
198
|
+
* @param {number} y
|
|
199
|
+
* @param {number} z
|
|
200
|
+
*/
|
|
248
201
|
constructor(x, y, z) {
|
|
249
202
|
const ret = wasm.point_new(x, y, z);
|
|
250
203
|
this.__wbg_ptr = ret >>> 0;
|
|
@@ -256,8 +209,7 @@ export class Point {
|
|
|
256
209
|
const ProjectionFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
257
210
|
? { register: () => {}, unregister: () => {} }
|
|
258
211
|
: new FinalizationRegistry(ptr => wasm.__wbg_projection_free(ptr >>> 0, 1));
|
|
259
|
-
|
|
260
|
-
*/
|
|
212
|
+
|
|
261
213
|
export class Projection {
|
|
262
214
|
|
|
263
215
|
__destroy_into_raw() {
|
|
@@ -272,170 +224,157 @@ export class Projection {
|
|
|
272
224
|
wasm.__wbg_projection_free(ptr, 0);
|
|
273
225
|
}
|
|
274
226
|
/**
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
const ptr0 = passStringToWasm0(defn, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
281
|
-
const len0 = WASM_VECTOR_LEN;
|
|
282
|
-
wasm.projection_new(retptr, ptr0, len0);
|
|
283
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
284
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
285
|
-
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
286
|
-
if (r2) {
|
|
287
|
-
throw takeObject(r1);
|
|
288
|
-
}
|
|
289
|
-
this.__wbg_ptr = r0 >>> 0;
|
|
290
|
-
ProjectionFinalization.register(this, this.__wbg_ptr, this);
|
|
291
|
-
return this;
|
|
292
|
-
} finally {
|
|
293
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
/**
|
|
297
|
-
* @returns {string}
|
|
298
|
-
*/
|
|
299
|
-
get projName() {
|
|
300
|
-
let deferred1_0;
|
|
301
|
-
let deferred1_1;
|
|
302
|
-
try {
|
|
303
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
304
|
-
wasm.projection_projName(retptr, this.__wbg_ptr);
|
|
305
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
306
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
307
|
-
deferred1_0 = r0;
|
|
308
|
-
deferred1_1 = r1;
|
|
309
|
-
return getStringFromWasm0(r0, r1);
|
|
310
|
-
} finally {
|
|
311
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
312
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
313
|
-
}
|
|
227
|
+
* @returns {boolean}
|
|
228
|
+
*/
|
|
229
|
+
get isGeocentric() {
|
|
230
|
+
const ret = wasm.projection_isGeocentric(this.__wbg_ptr);
|
|
231
|
+
return ret !== 0;
|
|
314
232
|
}
|
|
315
233
|
/**
|
|
316
|
-
|
|
317
|
-
|
|
234
|
+
* @returns {boolean}
|
|
235
|
+
*/
|
|
318
236
|
get isLatlon() {
|
|
319
237
|
const ret = wasm.projection_isLatlon(this.__wbg_ptr);
|
|
320
238
|
return ret !== 0;
|
|
321
239
|
}
|
|
322
240
|
/**
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
get
|
|
326
|
-
const ret = wasm.
|
|
241
|
+
* @returns {boolean}
|
|
242
|
+
*/
|
|
243
|
+
get isNormalizedAxis() {
|
|
244
|
+
const ret = wasm.projection_isNormalizedAxis(this.__wbg_ptr);
|
|
327
245
|
return ret !== 0;
|
|
328
246
|
}
|
|
329
247
|
/**
|
|
330
|
-
|
|
331
|
-
|
|
248
|
+
* @param {string} defn
|
|
249
|
+
*/
|
|
250
|
+
constructor(defn) {
|
|
251
|
+
const ptr0 = passStringToWasm0(defn, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
252
|
+
const len0 = WASM_VECTOR_LEN;
|
|
253
|
+
const ret = wasm.projection_new(ptr0, len0);
|
|
254
|
+
if (ret[2]) {
|
|
255
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
256
|
+
}
|
|
257
|
+
this.__wbg_ptr = ret[0] >>> 0;
|
|
258
|
+
ProjectionFinalization.register(this, this.__wbg_ptr, this);
|
|
259
|
+
return this;
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* @returns {string}
|
|
263
|
+
*/
|
|
332
264
|
get axis() {
|
|
333
265
|
let deferred1_0;
|
|
334
266
|
let deferred1_1;
|
|
335
267
|
try {
|
|
336
|
-
const
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
deferred1_0 = r0;
|
|
341
|
-
deferred1_1 = r1;
|
|
342
|
-
return getStringFromWasm0(r0, r1);
|
|
268
|
+
const ret = wasm.projection_axis(this.__wbg_ptr);
|
|
269
|
+
deferred1_0 = ret[0];
|
|
270
|
+
deferred1_1 = ret[1];
|
|
271
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
343
272
|
} finally {
|
|
344
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
345
273
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
346
274
|
}
|
|
347
275
|
}
|
|
348
276
|
/**
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
get
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
277
|
+
* @returns {string}
|
|
278
|
+
*/
|
|
279
|
+
get units() {
|
|
280
|
+
let deferred1_0;
|
|
281
|
+
let deferred1_1;
|
|
282
|
+
try {
|
|
283
|
+
const ret = wasm.projection_units(this.__wbg_ptr);
|
|
284
|
+
deferred1_0 = ret[0];
|
|
285
|
+
deferred1_1 = ret[1];
|
|
286
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
287
|
+
} finally {
|
|
288
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
289
|
+
}
|
|
361
290
|
}
|
|
362
291
|
/**
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
get
|
|
292
|
+
* @returns {string}
|
|
293
|
+
*/
|
|
294
|
+
get projName() {
|
|
366
295
|
let deferred1_0;
|
|
367
296
|
let deferred1_1;
|
|
368
297
|
try {
|
|
369
|
-
const
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
deferred1_0 = r0;
|
|
374
|
-
deferred1_1 = r1;
|
|
375
|
-
return getStringFromWasm0(r0, r1);
|
|
298
|
+
const ret = wasm.projection_projName(this.__wbg_ptr);
|
|
299
|
+
deferred1_0 = ret[0];
|
|
300
|
+
deferred1_1 = ret[1];
|
|
301
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
376
302
|
} finally {
|
|
377
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
378
303
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
379
304
|
}
|
|
380
305
|
}
|
|
306
|
+
/**
|
|
307
|
+
* @returns {number}
|
|
308
|
+
*/
|
|
309
|
+
get to_meter() {
|
|
310
|
+
const ret = wasm.projection_to_meter(this.__wbg_ptr);
|
|
311
|
+
return ret;
|
|
312
|
+
}
|
|
381
313
|
}
|
|
382
314
|
|
|
383
|
-
export function
|
|
384
|
-
const ret =
|
|
385
|
-
return
|
|
315
|
+
export function __wbg_buffer_e6c6daaa78528d53(arg0) {
|
|
316
|
+
const ret = arg0.buffer;
|
|
317
|
+
return ret;
|
|
386
318
|
};
|
|
387
319
|
|
|
388
|
-
export function
|
|
389
|
-
const
|
|
390
|
-
|
|
391
|
-
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
392
|
-
var len1 = WASM_VECTOR_LEN;
|
|
393
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
394
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
320
|
+
export function __wbg_getFloat32_e0872364daa466bb(arg0, arg1, arg2) {
|
|
321
|
+
const ret = arg0.getFloat32(arg1 >>> 0, arg2 !== 0);
|
|
322
|
+
return ret;
|
|
395
323
|
};
|
|
396
324
|
|
|
397
|
-
export function
|
|
398
|
-
|
|
325
|
+
export function __wbg_getFloat64_3c55a5d18420aa12(arg0, arg1, arg2) {
|
|
326
|
+
const ret = arg0.getFloat64(arg1 >>> 0, arg2 !== 0);
|
|
327
|
+
return ret;
|
|
399
328
|
};
|
|
400
329
|
|
|
401
|
-
export function
|
|
402
|
-
const ret =
|
|
330
|
+
export function __wbg_getInt32_6ea30555a7e6366d(arg0, arg1, arg2) {
|
|
331
|
+
const ret = arg0.getInt32(arg1 >>> 0, arg2 !== 0);
|
|
403
332
|
return ret;
|
|
404
333
|
};
|
|
405
334
|
|
|
406
|
-
export function
|
|
407
|
-
const ret =
|
|
335
|
+
export function __wbg_getUint32_78580012d2915dec(arg0, arg1, arg2) {
|
|
336
|
+
const ret = arg0.getUint32(arg1 >>> 0, arg2 !== 0);
|
|
408
337
|
return ret;
|
|
409
338
|
};
|
|
410
339
|
|
|
411
|
-
export function
|
|
412
|
-
const ret =
|
|
413
|
-
return
|
|
340
|
+
export function __wbg_parseFloat_40655e71a57d91e0(arg0, arg1) {
|
|
341
|
+
const ret = parseFloat(getStringFromWasm0(arg0, arg1));
|
|
342
|
+
return ret;
|
|
414
343
|
};
|
|
415
344
|
|
|
416
|
-
export function
|
|
417
|
-
const ret =
|
|
418
|
-
return
|
|
345
|
+
export function __wbg_parseInt_7deceafc75400ae4(arg0, arg1, arg2) {
|
|
346
|
+
const ret = parseInt(getStringFromWasm0(arg0, arg1), arg2);
|
|
347
|
+
return ret;
|
|
419
348
|
};
|
|
420
349
|
|
|
421
|
-
export function
|
|
422
|
-
const ret =
|
|
350
|
+
export function __wbg_slice_ab0b7e3d75dccdee(arg0, arg1, arg2) {
|
|
351
|
+
const ret = arg0.slice(arg1 >>> 0, arg2 >>> 0);
|
|
423
352
|
return ret;
|
|
424
353
|
};
|
|
425
354
|
|
|
426
|
-
export function
|
|
427
|
-
const ret =
|
|
355
|
+
export function __wbindgen_error_new(arg0, arg1) {
|
|
356
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
428
357
|
return ret;
|
|
429
358
|
};
|
|
430
359
|
|
|
431
|
-
export function
|
|
432
|
-
const
|
|
433
|
-
|
|
360
|
+
export function __wbindgen_init_externref_table() {
|
|
361
|
+
const table = wasm.__wbindgen_export_0;
|
|
362
|
+
const offset = table.grow(4);
|
|
363
|
+
table.set(0, undefined);
|
|
364
|
+
table.set(offset + 0, undefined);
|
|
365
|
+
table.set(offset + 1, null);
|
|
366
|
+
table.set(offset + 2, true);
|
|
367
|
+
table.set(offset + 3, false);
|
|
368
|
+
;
|
|
434
369
|
};
|
|
435
370
|
|
|
436
|
-
export function
|
|
437
|
-
const
|
|
438
|
-
|
|
371
|
+
export function __wbindgen_string_get(arg0, arg1) {
|
|
372
|
+
const obj = arg1;
|
|
373
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
374
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
375
|
+
var len1 = WASM_VECTOR_LEN;
|
|
376
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
377
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
439
378
|
};
|
|
440
379
|
|
|
441
380
|
export function __wbindgen_throw(arg0, arg1) {
|
package/proj4rs_bg.wasm
CHANGED
|
Binary file
|
package/proj4rs_bg.wasm.d.ts
CHANGED
|
@@ -1,26 +1,28 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
export
|
|
14
|
-
export
|
|
15
|
-
export
|
|
16
|
-
export
|
|
17
|
-
export
|
|
18
|
-
export
|
|
19
|
-
export
|
|
20
|
-
export
|
|
21
|
-
export
|
|
22
|
-
export
|
|
23
|
-
export
|
|
24
|
-
export
|
|
25
|
-
export
|
|
26
|
-
export
|
|
4
|
+
export const __wbg_get_point_x: (a: number) => number;
|
|
5
|
+
export const __wbg_get_point_y: (a: number) => number;
|
|
6
|
+
export const __wbg_get_point_z: (a: number) => number;
|
|
7
|
+
export const __wbg_point_free: (a: number, b: number) => void;
|
|
8
|
+
export const __wbg_projection_free: (a: number, b: number) => void;
|
|
9
|
+
export const __wbg_set_point_x: (a: number, b: number) => void;
|
|
10
|
+
export const __wbg_set_point_y: (a: number, b: number) => void;
|
|
11
|
+
export const __wbg_set_point_z: (a: number, b: number) => void;
|
|
12
|
+
export const add_nadgrid: (a: number, b: number, c: any) => [number, number];
|
|
13
|
+
export const point_new: (a: number, b: number, c: number) => number;
|
|
14
|
+
export const projection_axis: (a: number) => [number, number];
|
|
15
|
+
export const projection_isGeocentric: (a: number) => number;
|
|
16
|
+
export const projection_isLatlon: (a: number) => number;
|
|
17
|
+
export const projection_isNormalizedAxis: (a: number) => number;
|
|
18
|
+
export const projection_new: (a: number, b: number) => [number, number, number];
|
|
19
|
+
export const projection_projName: (a: number) => [number, number];
|
|
20
|
+
export const projection_to_meter: (a: number) => number;
|
|
21
|
+
export const projection_units: (a: number) => [number, number];
|
|
22
|
+
export const transform: (a: number, b: number, c: number) => [number, number];
|
|
23
|
+
export const __wbindgen_export_0: WebAssembly.Table;
|
|
24
|
+
export const __wbindgen_malloc: (a: number, b: number) => number;
|
|
25
|
+
export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
26
|
+
export const __externref_table_dealloc: (a: number) => void;
|
|
27
|
+
export const __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
28
|
+
export const __wbindgen_start: () => void;
|