geo-polygonize 0.64.0 → 0.66.0
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 +16 -0
- package/dist/geo_polygonize.wasm +0 -0
- package/dist/geo_polygonize_simd.wasm +0 -0
- package/dist/slim/cjs/index.d.ts +13 -0
- package/dist/slim/cjs/polygonize_worker.d.ts +1 -0
- package/dist/slim/es/index.d.ts +13 -0
- package/dist/slim/es/polygonize_worker.d.ts +1 -0
- package/dist/standard/cjs/index.d.ts +13 -0
- package/dist/standard/cjs/index.js +58 -2
- package/dist/standard/cjs/polygonize_worker.d.ts +1 -0
- package/dist/standard/es/index.d.ts +13 -0
- package/dist/standard/es/index.js +57 -3
- package/dist/standard/es/polygonize_worker.d.ts +1 -0
- package/dist/standard/es/polygonize_worker.js +708 -0
- package/dist/threads/es/index.d.ts +13 -0
- package/dist/threads/es/polygonize_worker.d.ts +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -281,6 +281,22 @@ async function run() {
|
|
|
281
281
|
}
|
|
282
282
|
```
|
|
283
283
|
|
|
284
|
+
For cancellable browser work, use the worker-backed asynchronous entry point.
|
|
285
|
+
Aborting terminates its disposable worker; the direct Wasm exports above remain
|
|
286
|
+
synchronous and cannot be interrupted with an `AbortSignal`.
|
|
287
|
+
|
|
288
|
+
```javascript
|
|
289
|
+
import { polygonizeWithOptionsAsync } from "geo-polygonize";
|
|
290
|
+
|
|
291
|
+
const controller = new AbortController();
|
|
292
|
+
const result = await polygonizeWithOptionsAsync(
|
|
293
|
+
JSON.stringify(geojson),
|
|
294
|
+
cfbRobustOptions,
|
|
295
|
+
{ signal: controller.signal },
|
|
296
|
+
);
|
|
297
|
+
// controller.abort();
|
|
298
|
+
```
|
|
299
|
+
|
|
284
300
|
**Multithreaded Usage (Experimental):**
|
|
285
301
|
This library provides a multithreaded build powered by `wasm-bindgen-rayon`.
|
|
286
302
|
|
package/dist/geo_polygonize.wasm
CHANGED
|
Binary file
|
|
Binary file
|
package/dist/slim/cjs/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as exports from "../pkg-scalar/geo_polygonize.js";
|
|
2
|
+
import type { PolygonizerOptions } from "./bindings/PolygonizerOptions";
|
|
2
3
|
export * from "../pkg-scalar/geo_polygonize.js";
|
|
3
4
|
export * from "./bindings/PolygonizerOptions";
|
|
4
5
|
export * from "./bindings/ContainmentOptions";
|
|
@@ -18,4 +19,16 @@ export * from "./bindings/ZPolicy";
|
|
|
18
19
|
export * from "./bindings/TopologyFingerprintV1";
|
|
19
20
|
export * from "./bindings/NormalizedPolygonizeErrorV1";
|
|
20
21
|
export * from "./cfb";
|
|
22
|
+
export type WasmWorkerOptions = {
|
|
23
|
+
signal?: AbortSignal;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Polygonizes GeoJSON in an isolated browser worker.
|
|
27
|
+
*
|
|
28
|
+
* Aborting terminates that worker; direct Wasm exports remain synchronous and
|
|
29
|
+
* cannot be interrupted with an `AbortSignal`.
|
|
30
|
+
*/
|
|
31
|
+
export declare function polygonizeWithOptionsAsync(geojson: string, options: Partial<PolygonizerOptions>, workerOptions?: WasmWorkerOptions): Promise<string>;
|
|
32
|
+
/** Returns the canonical topology report in an abortable browser worker. */
|
|
33
|
+
export declare function polygonizeReportWithOptionsAsync(geojson: string, options: Partial<PolygonizerOptions>, workerOptions?: WasmWorkerOptions): Promise<string>;
|
|
21
34
|
export default function init(_input?: any): Promise<typeof exports>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/slim/es/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as exports from "../pkg-scalar/geo_polygonize.js";
|
|
2
|
+
import type { PolygonizerOptions } from "./bindings/PolygonizerOptions";
|
|
2
3
|
export * from "../pkg-scalar/geo_polygonize.js";
|
|
3
4
|
export * from "./bindings/PolygonizerOptions";
|
|
4
5
|
export * from "./bindings/ContainmentOptions";
|
|
@@ -18,4 +19,16 @@ export * from "./bindings/ZPolicy";
|
|
|
18
19
|
export * from "./bindings/TopologyFingerprintV1";
|
|
19
20
|
export * from "./bindings/NormalizedPolygonizeErrorV1";
|
|
20
21
|
export * from "./cfb";
|
|
22
|
+
export type WasmWorkerOptions = {
|
|
23
|
+
signal?: AbortSignal;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Polygonizes GeoJSON in an isolated browser worker.
|
|
27
|
+
*
|
|
28
|
+
* Aborting terminates that worker; direct Wasm exports remain synchronous and
|
|
29
|
+
* cannot be interrupted with an `AbortSignal`.
|
|
30
|
+
*/
|
|
31
|
+
export declare function polygonizeWithOptionsAsync(geojson: string, options: Partial<PolygonizerOptions>, workerOptions?: WasmWorkerOptions): Promise<string>;
|
|
32
|
+
/** Returns the canonical topology report in an abortable browser worker. */
|
|
33
|
+
export declare function polygonizeReportWithOptionsAsync(geojson: string, options: Partial<PolygonizerOptions>, workerOptions?: WasmWorkerOptions): Promise<string>;
|
|
21
34
|
export default function init(_input?: any): Promise<typeof exports>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as exports from "../pkg-scalar/geo_polygonize.js";
|
|
2
|
+
import type { PolygonizerOptions } from "./bindings/PolygonizerOptions";
|
|
2
3
|
export * from "../pkg-scalar/geo_polygonize.js";
|
|
3
4
|
export * from "./bindings/PolygonizerOptions";
|
|
4
5
|
export * from "./bindings/ContainmentOptions";
|
|
@@ -18,4 +19,16 @@ export * from "./bindings/ZPolicy";
|
|
|
18
19
|
export * from "./bindings/TopologyFingerprintV1";
|
|
19
20
|
export * from "./bindings/NormalizedPolygonizeErrorV1";
|
|
20
21
|
export * from "./cfb";
|
|
22
|
+
export type WasmWorkerOptions = {
|
|
23
|
+
signal?: AbortSignal;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Polygonizes GeoJSON in an isolated browser worker.
|
|
27
|
+
*
|
|
28
|
+
* Aborting terminates that worker; direct Wasm exports remain synchronous and
|
|
29
|
+
* cannot be interrupted with an `AbortSignal`.
|
|
30
|
+
*/
|
|
31
|
+
export declare function polygonizeWithOptionsAsync(geojson: string, options: Partial<PolygonizerOptions>, workerOptions?: WasmWorkerOptions): Promise<string>;
|
|
32
|
+
/** Returns the canonical topology report in an abortable browser worker. */
|
|
33
|
+
export declare function polygonizeReportWithOptionsAsync(geojson: string, options: Partial<PolygonizerOptions>, workerOptions?: WasmWorkerOptions): Promise<string>;
|
|
21
34
|
export default function init(_input?: any): Promise<typeof exports>;
|