proj4rs 0.0.1 → 0.1.8

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