geo-polygonize 0.33.1 → 0.35.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 +68 -18
- package/dist/geo_polygonize.wasm +0 -0
- package/dist/geo_polygonize_simd.wasm +0 -0
- package/dist/slim/cjs/cfb.d.ts +2 -0
- package/dist/slim/cjs/index.d.ts +1 -0
- package/dist/slim/cjs/index_slim.d.ts +2 -1
- package/dist/slim/cjs/index_slim.js +74 -829
- package/dist/slim/cjs/index_threads.d.ts +1 -0
- package/dist/slim/es/cfb.d.ts +2 -0
- package/dist/slim/es/index.d.ts +1 -0
- package/dist/slim/es/index_slim.d.ts +2 -1
- package/dist/slim/es/index_slim.js +65 -821
- package/dist/slim/es/index_threads.d.ts +1 -0
- package/dist/slim/pkg-scalar/geo_polygonize.d.ts +119 -0
- package/dist/slim/pkg-scalar/geo_polygonize_bg.wasm.d.ts +37 -0
- package/dist/slim/pkg-wrapper/bindings/ContainmentOptions.d.ts +6 -0
- package/dist/slim/pkg-wrapper/bindings/DedupPolicy.d.ts +1 -0
- package/dist/slim/pkg-wrapper/bindings/DeterminismOptions.d.ts +5 -0
- package/dist/slim/pkg-wrapper/bindings/DiagnosticsOptions.d.ts +4 -0
- package/dist/slim/pkg-wrapper/bindings/IndexBackend.d.ts +1 -0
- package/dist/slim/pkg-wrapper/bindings/NodingBackend.d.ts +1 -0
- package/dist/slim/pkg-wrapper/bindings/NodingOptions.d.ts +6 -0
- package/dist/slim/pkg-wrapper/bindings/PolygonizerOptions.d.ts +92 -0
- package/dist/slim/pkg-wrapper/bindings/ProvenanceOptions.d.ts +4 -0
- package/dist/slim/pkg-wrapper/bindings/SnapMode.d.ts +1 -0
- package/dist/slim/pkg-wrapper/bindings/SnapStrategy.d.ts +25 -0
- package/dist/slim/pkg-wrapper/bindings/TargetProfile.d.ts +1 -0
- package/dist/slim/pkg-wrapper/bindings/TileOwnershipPolicy.d.ts +1 -0
- package/dist/slim/pkg-wrapper/bindings/TilingOptions.d.ts +6 -0
- package/dist/slim/pkg-wrapper/bindings/TouchPolicy.d.ts +1 -0
- package/dist/slim/pkg-wrapper/bindings/ZOptions.d.ts +4 -0
- package/dist/slim/pkg-wrapper/bindings/ZPolicy.d.ts +5 -0
- package/dist/standard/cjs/cfb.d.ts +2 -0
- package/dist/standard/cjs/index.d.ts +1 -0
- package/dist/standard/cjs/index.js +59 -4
- package/dist/standard/cjs/index_slim.d.ts +2 -1
- package/dist/standard/cjs/index_threads.d.ts +1 -0
- package/dist/standard/es/cfb.d.ts +2 -0
- package/dist/standard/es/index.d.ts +1 -0
- package/dist/standard/es/index.js +59 -5
- package/dist/standard/es/index_slim.d.ts +2 -1
- package/dist/standard/es/index_threads.d.ts +1 -0
- package/dist/standard/pkg-scalar/geo_polygonize.d.ts +119 -0
- package/dist/standard/pkg-scalar/geo_polygonize_bg.wasm.d.ts +37 -0
- package/dist/standard/pkg-wrapper/bindings/ContainmentOptions.d.ts +6 -0
- package/dist/standard/pkg-wrapper/bindings/DedupPolicy.d.ts +1 -0
- package/dist/standard/pkg-wrapper/bindings/DeterminismOptions.d.ts +5 -0
- package/dist/standard/pkg-wrapper/bindings/DiagnosticsOptions.d.ts +4 -0
- package/dist/standard/pkg-wrapper/bindings/IndexBackend.d.ts +1 -0
- package/dist/standard/pkg-wrapper/bindings/NodingBackend.d.ts +1 -0
- package/dist/standard/pkg-wrapper/bindings/NodingOptions.d.ts +6 -0
- package/dist/standard/pkg-wrapper/bindings/PolygonizerOptions.d.ts +92 -0
- package/dist/standard/pkg-wrapper/bindings/ProvenanceOptions.d.ts +4 -0
- package/dist/standard/pkg-wrapper/bindings/SnapMode.d.ts +1 -0
- package/dist/standard/pkg-wrapper/bindings/SnapStrategy.d.ts +25 -0
- package/dist/standard/pkg-wrapper/bindings/TargetProfile.d.ts +1 -0
- package/dist/standard/pkg-wrapper/bindings/TileOwnershipPolicy.d.ts +1 -0
- package/dist/standard/pkg-wrapper/bindings/TilingOptions.d.ts +6 -0
- package/dist/standard/pkg-wrapper/bindings/TouchPolicy.d.ts +1 -0
- package/dist/standard/pkg-wrapper/bindings/ZOptions.d.ts +4 -0
- package/dist/standard/pkg-wrapper/bindings/ZPolicy.d.ts +5 -0
- package/dist/threads/es/cfb.d.ts +2 -0
- package/dist/threads/es/index.d.ts +1 -0
- package/dist/threads/es/index.js +56 -2
- package/dist/threads/es/index_slim.d.ts +2 -1
- package/dist/threads/es/index_threads.d.ts +1 -0
- package/dist/threads/pkg-threads/geo_polygonize.d.ts +139 -0
- package/dist/threads/pkg-threads/geo_polygonize_bg.wasm.d.ts +44 -0
- package/dist/threads/pkg-wrapper/bindings/ContainmentOptions.d.ts +6 -0
- package/dist/threads/pkg-wrapper/bindings/DedupPolicy.d.ts +1 -0
- package/dist/threads/pkg-wrapper/bindings/DeterminismOptions.d.ts +5 -0
- package/dist/threads/pkg-wrapper/bindings/DiagnosticsOptions.d.ts +4 -0
- package/dist/threads/pkg-wrapper/bindings/IndexBackend.d.ts +1 -0
- package/dist/threads/pkg-wrapper/bindings/NodingBackend.d.ts +1 -0
- package/dist/threads/pkg-wrapper/bindings/NodingOptions.d.ts +6 -0
- package/dist/threads/pkg-wrapper/bindings/PolygonizerOptions.d.ts +92 -0
- package/dist/threads/pkg-wrapper/bindings/ProvenanceOptions.d.ts +4 -0
- package/dist/threads/pkg-wrapper/bindings/SnapMode.d.ts +1 -0
- package/dist/threads/pkg-wrapper/bindings/SnapStrategy.d.ts +25 -0
- package/dist/threads/pkg-wrapper/bindings/TargetProfile.d.ts +1 -0
- package/dist/threads/pkg-wrapper/bindings/TileOwnershipPolicy.d.ts +1 -0
- package/dist/threads/pkg-wrapper/bindings/TilingOptions.d.ts +6 -0
- package/dist/threads/pkg-wrapper/bindings/TouchPolicy.d.ts +1 -0
- package/dist/threads/pkg-wrapper/bindings/ZOptions.d.ts +4 -0
- package/dist/threads/pkg-wrapper/bindings/ZPolicy.d.ts +5 -0
- package/package.json +1 -1
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { PolygonizerOptions } from '../pkg-wrapper/bindings/PolygonizerOptions';
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
|
|
5
|
+
export class PolygonizerWasmError {
|
|
6
|
+
free(): void;
|
|
7
|
+
[Symbol.dispose](): void;
|
|
8
|
+
constructor(name: string, message: string);
|
|
9
|
+
readonly message: string;
|
|
10
|
+
readonly name: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export class WasmPolygonResult {
|
|
14
|
+
private constructor();
|
|
15
|
+
free(): void;
|
|
16
|
+
[Symbol.dispose](): void;
|
|
17
|
+
coords_len(): number;
|
|
18
|
+
coords_ptr(): number;
|
|
19
|
+
flat_line_ids_len(): number;
|
|
20
|
+
flat_line_ids_ptr(): number;
|
|
21
|
+
polygon_offsets_len(): number;
|
|
22
|
+
polygon_offsets_ptr(): number;
|
|
23
|
+
ring_offsets_len(): number;
|
|
24
|
+
ring_offsets_ptr(): number;
|
|
25
|
+
stride(): number;
|
|
26
|
+
readonly cut_edges: any;
|
|
27
|
+
readonly dangles: any;
|
|
28
|
+
readonly diagnostics: any;
|
|
29
|
+
readonly invalid_rings: any;
|
|
30
|
+
readonly provenance: any;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export function polygonize(geojson_str: string, node_input?: boolean | null, snap_grid_size?: number | null, extract_only_polygonal?: boolean | null, report_mode?: boolean | null): string;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Polygonizes an Arrow IPC stream containing a GeoArrow LineString array.
|
|
37
|
+
*
|
|
38
|
+
* This zero-copy path avoids JSON serialization overhead and returns a binary
|
|
39
|
+
* Arrow IPC stream containing a GeoArrow Polygon array. Requires the options
|
|
40
|
+
* to be passed as a parsed JS object.
|
|
41
|
+
*/
|
|
42
|
+
export function polygonizeGeoArrowWithOptions(ipc_bytes: Uint8Array, options_val: Partial<PolygonizerOptions>): Uint8Array;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Polygonizes a GeoJSON FeatureCollection using the canonical `PolygonizerOptions`.
|
|
46
|
+
*
|
|
47
|
+
* This is the primary entry point for JavaScript users. It accepts a JSON string
|
|
48
|
+
* of options and returns a JSON string representing the result, including faces,
|
|
49
|
+
* dangles, cut-lines, and (optionally) provenance/diagnostics.
|
|
50
|
+
*/
|
|
51
|
+
export function polygonizeWithOptions(geojson_str: string, options_val: Partial<PolygonizerOptions>): string;
|
|
52
|
+
|
|
53
|
+
export function polygonizeWithOptionsBuffer(coords: Float64Array, offsets: Uint32Array, stride: number, options_val: Partial<PolygonizerOptions>, line_ids?: Uint32Array | null): WasmPolygonResult;
|
|
54
|
+
|
|
55
|
+
export function polygonize_buffers(coords: Float64Array, offsets: Uint32Array, stride: number, node_input: boolean, snap_grid_size: number, line_ids?: Uint32Array | null): WasmPolygonResult;
|
|
56
|
+
|
|
57
|
+
export function polygonize_geoarrow(ipc_bytes: Uint8Array, node_input: boolean, snap_grid_size: number, extract_only_polygonal: boolean): Uint8Array;
|
|
58
|
+
|
|
59
|
+
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
60
|
+
|
|
61
|
+
export interface InitOutput {
|
|
62
|
+
readonly memory: WebAssembly.Memory;
|
|
63
|
+
readonly __wbg_polygonizerwasmerror_free: (a: number, b: number) => void;
|
|
64
|
+
readonly __wbg_wasmpolygonresult_free: (a: number, b: number) => void;
|
|
65
|
+
readonly polygonize: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number, number, number];
|
|
66
|
+
readonly polygonizeGeoArrowWithOptions: (a: number, b: number, c: any) => [number, number, number, number];
|
|
67
|
+
readonly polygonizeWithOptions: (a: number, b: number, c: any) => [number, number, number, number];
|
|
68
|
+
readonly polygonizeWithOptionsBuffer: (a: number, b: number, c: number, d: number, e: number, f: any, g: number, h: number) => [number, number, number];
|
|
69
|
+
readonly polygonize_buffers: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => [number, number, number];
|
|
70
|
+
readonly polygonize_geoarrow: (a: number, b: number, c: number, d: number, e: number) => [number, number, number, number];
|
|
71
|
+
readonly polygonizerwasmerror_message: (a: number) => [number, number];
|
|
72
|
+
readonly polygonizerwasmerror_name: (a: number) => [number, number];
|
|
73
|
+
readonly polygonizerwasmerror_new: (a: number, b: number, c: number, d: number) => number;
|
|
74
|
+
readonly wasmpolygonresult_coords_len: (a: number) => number;
|
|
75
|
+
readonly wasmpolygonresult_coords_ptr: (a: number) => number;
|
|
76
|
+
readonly wasmpolygonresult_cut_edges: (a: number) => any;
|
|
77
|
+
readonly wasmpolygonresult_dangles: (a: number) => any;
|
|
78
|
+
readonly wasmpolygonresult_diagnostics: (a: number) => any;
|
|
79
|
+
readonly wasmpolygonresult_flat_line_ids_len: (a: number) => number;
|
|
80
|
+
readonly wasmpolygonresult_flat_line_ids_ptr: (a: number) => number;
|
|
81
|
+
readonly wasmpolygonresult_invalid_rings: (a: number) => any;
|
|
82
|
+
readonly wasmpolygonresult_polygon_offsets_len: (a: number) => number;
|
|
83
|
+
readonly wasmpolygonresult_polygon_offsets_ptr: (a: number) => number;
|
|
84
|
+
readonly wasmpolygonresult_provenance: (a: number) => any;
|
|
85
|
+
readonly wasmpolygonresult_ring_offsets_len: (a: number) => number;
|
|
86
|
+
readonly wasmpolygonresult_ring_offsets_ptr: (a: number) => number;
|
|
87
|
+
readonly wasmpolygonresult_stride: (a: number) => number;
|
|
88
|
+
readonly polygonize_ffi: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
89
|
+
readonly polygonize_with_options_ffi: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
|
|
90
|
+
readonly polygonize_result_free: () => void;
|
|
91
|
+
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
92
|
+
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
93
|
+
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
94
|
+
readonly __wbindgen_externrefs: WebAssembly.Table;
|
|
95
|
+
readonly __externref_table_dealloc: (a: number) => void;
|
|
96
|
+
readonly __wbindgen_start: () => void;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export type SyncInitInput = BufferSource | WebAssembly.Module;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Instantiates the given `module`, which can either be bytes or
|
|
103
|
+
* a precompiled `WebAssembly.Module`.
|
|
104
|
+
*
|
|
105
|
+
* @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
|
|
106
|
+
*
|
|
107
|
+
* @returns {InitOutput}
|
|
108
|
+
*/
|
|
109
|
+
export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
|
|
113
|
+
* for everything else, calls `WebAssembly.instantiate` directly.
|
|
114
|
+
*
|
|
115
|
+
* @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
|
|
116
|
+
*
|
|
117
|
+
* @returns {Promise<InitOutput>}
|
|
118
|
+
*/
|
|
119
|
+
export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
export const memory: WebAssembly.Memory;
|
|
4
|
+
export const __wbg_polygonizerwasmerror_free: (a: number, b: number) => void;
|
|
5
|
+
export const __wbg_wasmpolygonresult_free: (a: number, b: number) => void;
|
|
6
|
+
export const polygonize: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number, number, number];
|
|
7
|
+
export const polygonizeGeoArrowWithOptions: (a: number, b: number, c: any) => [number, number, number, number];
|
|
8
|
+
export const polygonizeWithOptions: (a: number, b: number, c: any) => [number, number, number, number];
|
|
9
|
+
export const polygonizeWithOptionsBuffer: (a: number, b: number, c: number, d: number, e: number, f: any, g: number, h: number) => [number, number, number];
|
|
10
|
+
export const polygonize_buffers: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => [number, number, number];
|
|
11
|
+
export const polygonize_geoarrow: (a: number, b: number, c: number, d: number, e: number) => [number, number, number, number];
|
|
12
|
+
export const polygonizerwasmerror_message: (a: number) => [number, number];
|
|
13
|
+
export const polygonizerwasmerror_name: (a: number) => [number, number];
|
|
14
|
+
export const polygonizerwasmerror_new: (a: number, b: number, c: number, d: number) => number;
|
|
15
|
+
export const wasmpolygonresult_coords_len: (a: number) => number;
|
|
16
|
+
export const wasmpolygonresult_coords_ptr: (a: number) => number;
|
|
17
|
+
export const wasmpolygonresult_cut_edges: (a: number) => any;
|
|
18
|
+
export const wasmpolygonresult_dangles: (a: number) => any;
|
|
19
|
+
export const wasmpolygonresult_diagnostics: (a: number) => any;
|
|
20
|
+
export const wasmpolygonresult_flat_line_ids_len: (a: number) => number;
|
|
21
|
+
export const wasmpolygonresult_flat_line_ids_ptr: (a: number) => number;
|
|
22
|
+
export const wasmpolygonresult_invalid_rings: (a: number) => any;
|
|
23
|
+
export const wasmpolygonresult_polygon_offsets_len: (a: number) => number;
|
|
24
|
+
export const wasmpolygonresult_polygon_offsets_ptr: (a: number) => number;
|
|
25
|
+
export const wasmpolygonresult_provenance: (a: number) => any;
|
|
26
|
+
export const wasmpolygonresult_ring_offsets_len: (a: number) => number;
|
|
27
|
+
export const wasmpolygonresult_ring_offsets_ptr: (a: number) => number;
|
|
28
|
+
export const wasmpolygonresult_stride: (a: number) => number;
|
|
29
|
+
export const polygonize_ffi: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
30
|
+
export const polygonize_with_options_ffi: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
|
|
31
|
+
export const polygonize_result_free: () => void;
|
|
32
|
+
export const __wbindgen_malloc: (a: number, b: number) => number;
|
|
33
|
+
export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
34
|
+
export const __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
35
|
+
export const __wbindgen_externrefs: WebAssembly.Table;
|
|
36
|
+
export const __externref_table_dealloc: (a: number) => void;
|
|
37
|
+
export const __wbindgen_start: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type DedupPolicy = "KeepAll" | "CanonicalRingHash";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type IndexBackend = "RStar" | "PackedNative";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type NodingBackend = "Snap" | "Advanced";
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import type { ContainmentOptions } from "./ContainmentOptions";
|
|
2
|
+
import type { DeterminismOptions } from "./DeterminismOptions";
|
|
3
|
+
import type { DiagnosticsOptions } from "./DiagnosticsOptions";
|
|
4
|
+
import type { NodingOptions } from "./NodingOptions";
|
|
5
|
+
import type { ProvenanceOptions } from "./ProvenanceOptions";
|
|
6
|
+
import type { SnapStrategy } from "./SnapStrategy";
|
|
7
|
+
import type { TargetProfile } from "./TargetProfile";
|
|
8
|
+
import type { TilingOptions } from "./TilingOptions";
|
|
9
|
+
import type { ZOptions } from "./ZOptions";
|
|
10
|
+
/**
|
|
11
|
+
* The canonical configuration object for the `geo-polygonize` engine.
|
|
12
|
+
*
|
|
13
|
+
* This struct controls every aspect of the polygonization pipeline, including
|
|
14
|
+
* topological robustness, feature output, containment policies, noding, and determinism.
|
|
15
|
+
*/
|
|
16
|
+
export type PolygonizerOptions = {
|
|
17
|
+
/**
|
|
18
|
+
* Determines the execution environment profile (e.g., Native, WasmSingleThread, WasmThreads).
|
|
19
|
+
*
|
|
20
|
+
* Default: `TargetProfile::Native`
|
|
21
|
+
*/
|
|
22
|
+
target: TargetProfile;
|
|
23
|
+
/**
|
|
24
|
+
* Whether to robustly node the input before polygonization.
|
|
25
|
+
*
|
|
26
|
+
* Enable this for real-world linework where segment intersections may not
|
|
27
|
+
* already exist as explicit vertices. This is slower than the fast path but
|
|
28
|
+
* avoids missing faces and unresolved crossings.
|
|
29
|
+
*
|
|
30
|
+
* Default: `false`
|
|
31
|
+
*/
|
|
32
|
+
node_input: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* The snapping grid size used for vertex deduplication and noding operations.
|
|
35
|
+
*
|
|
36
|
+
* Vertices falling within the same grid cell are coalesced. A size of `0.0`
|
|
37
|
+
* indicates exact floating-point evaluation without grid snapping.
|
|
38
|
+
*
|
|
39
|
+
* Default: `1e-10`
|
|
40
|
+
*/
|
|
41
|
+
snap_grid_size: number;
|
|
42
|
+
/**
|
|
43
|
+
* If `true`, only pure, outermost polygonal shells are returned.
|
|
44
|
+
*
|
|
45
|
+
* Floating dangles, internal cut-lines, or invalid rings will be discarded.
|
|
46
|
+
*
|
|
47
|
+
* Default: `false`
|
|
48
|
+
*/
|
|
49
|
+
extract_only_polygonal: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* The underlying strategy to apply when snapping coordinate geometries.
|
|
52
|
+
*
|
|
53
|
+
* See `SnapStrategy` for differences between strict `Grid` snapping and
|
|
54
|
+
* Shapely/GEOS `GeosCompat` strategies.
|
|
55
|
+
*
|
|
56
|
+
* Default: `SnapStrategy::Grid`
|
|
57
|
+
*/
|
|
58
|
+
snap_strategy: SnapStrategy;
|
|
59
|
+
/**
|
|
60
|
+
* Configures the noding engine backend and behavior.
|
|
61
|
+
*/
|
|
62
|
+
noding: NodingOptions;
|
|
63
|
+
/**
|
|
64
|
+
* Configures how topological relationships (containment) are calculated
|
|
65
|
+
* during face formation.
|
|
66
|
+
*/
|
|
67
|
+
containment: ContainmentOptions;
|
|
68
|
+
/**
|
|
69
|
+
* Optional configuration for tiled, distributed execution across huge datasets.
|
|
70
|
+
*/
|
|
71
|
+
tiling?: TilingOptions;
|
|
72
|
+
/**
|
|
73
|
+
* Configures Z-axis coordinate handling.
|
|
74
|
+
*/
|
|
75
|
+
z: ZOptions;
|
|
76
|
+
/**
|
|
77
|
+
* Configuration for enforcing exact topological determinism.
|
|
78
|
+
*/
|
|
79
|
+
determinism: DeterminismOptions;
|
|
80
|
+
/**
|
|
81
|
+
* Options for capturing diagnostic topology failures.
|
|
82
|
+
*/
|
|
83
|
+
diagnostics: DiagnosticsOptions;
|
|
84
|
+
/**
|
|
85
|
+
* Options for mapping final faces back to original input geometry IDs.
|
|
86
|
+
*/
|
|
87
|
+
provenance: ProvenanceOptions;
|
|
88
|
+
/**
|
|
89
|
+
* An optional identifier for the input dataset.
|
|
90
|
+
*/
|
|
91
|
+
input_profile_id?: string;
|
|
92
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type SnapMode = "FloatExact" | "FloatEpsilonDedup" | "IntegerGrid";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Strategy for snapping coordinates to a grid.
|
|
3
|
+
*
|
|
4
|
+
* `Grid` applies a standard round-to-nearest integer grid policy `(coord / size).round() * size`.
|
|
5
|
+
* `GeosCompat` attempts to emulate GEOS / Shapely's `set_precision` behavior, which uses
|
|
6
|
+
* C++ std::round (rounding halfway cases away from zero).
|
|
7
|
+
*
|
|
8
|
+
* **Scale Guidance:**
|
|
9
|
+
* Use `Grid` for native Rust applications where absolute topological determinism and
|
|
10
|
+
* intuitive rounding is preferred.
|
|
11
|
+
* Use `GeosCompat` if you are using `geo-polygonize` to replace a Shapely / GEOS pipeline
|
|
12
|
+
* and require exact parity for edge cases at precision boundaries.
|
|
13
|
+
*
|
|
14
|
+
* **Expected Parity:**
|
|
15
|
+
* Rust's native `f64::round()` rounds halfway cases away from zero. This perfectly
|
|
16
|
+
* matches C++ `std::round` behavior, meaning that `Grid` and `GeosCompat` currently
|
|
17
|
+
* map identical values for basic single-coordinate precision points (e.g., `-0.5` => `-1.0`
|
|
18
|
+
* and `0.5` => `1.0`).
|
|
19
|
+
*
|
|
20
|
+
* **Expected Divergence:**
|
|
21
|
+
* The divergence between `Grid` and `GeosCompat` strategies typically arises under complex
|
|
22
|
+
* topological scaling sequences rather than simple single point coordinate rounding, but
|
|
23
|
+
* the option ensures the library remains semantically compatible with Python/C++ GEOS pipelines.
|
|
24
|
+
*/
|
|
25
|
+
export type SnapStrategy = "Grid" | "GeosCompat";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type TargetProfile = "Native" | "WasmSingleThread" | "WasmThreads";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type TileOwnershipPolicy = "Centroid" | "RepresentativePointInsidePolygon" | "LexicographicMinVertex" | "CanonicalBoundaryHash";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type TouchPolicy = "AllowPointTouchDisallowEdgeShare" | "TreatAnyTouchAsDisjoint" | "AllowEdgeShare";
|