@mailwoman/soil 10.0.0 → 10.2.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 +118 -116
- package/lib/index.ts +88 -113
- package/lib/paths.ts +24 -0
- package/lib/schema.ts +189 -134
- package/lib/vocabulary.ts +40 -107
- package/out/index.d.ts +59 -77
- package/out/index.d.ts.map +1 -1
- package/out/index.js +38 -79
- package/out/index.js.map +1 -1
- package/out/paths.d.ts +19 -0
- package/out/paths.d.ts.map +1 -0
- package/out/paths.js +21 -0
- package/out/paths.js.map +1 -0
- package/out/schema.d.ts +183 -132
- package/out/schema.d.ts.map +1 -1
- package/out/schema.js +32 -32
- package/out/schema.js.map +1 -1
- package/out/sdk/acquire.d.ts +15 -24
- package/out/sdk/acquire.d.ts.map +1 -1
- package/out/sdk/acquire.js +6 -21
- package/out/sdk/acquire.js.map +1 -1
- package/out/sdk/build-soil.d.ts +67 -70
- package/out/sdk/build-soil.d.ts.map +1 -1
- package/out/sdk/build-soil.js +67 -97
- package/out/sdk/build-soil.js.map +1 -1
- package/out/sdk/cell-tiers.d.ts +7 -19
- package/out/sdk/cell-tiers.d.ts.map +1 -1
- package/out/sdk/cell-tiers.js +21 -40
- package/out/sdk/cell-tiers.js.map +1 -1
- package/out/sdk/cells.d.ts +15 -41
- package/out/sdk/cells.d.ts.map +1 -1
- package/out/sdk/cells.js +11 -38
- package/out/sdk/cells.js.map +1 -1
- package/out/sdk/client.d.ts +24 -49
- package/out/sdk/client.d.ts.map +1 -1
- package/out/sdk/client.js +20 -64
- package/out/sdk/client.js.map +1 -1
- package/out/sdk/download.d.ts +24 -47
- package/out/sdk/download.d.ts.map +1 -1
- package/out/sdk/download.js +15 -55
- package/out/sdk/download.js.map +1 -1
- package/out/sdk/ingest/chunk.d.ts +29 -25
- package/out/sdk/ingest/chunk.d.ts.map +1 -1
- package/out/sdk/ingest/chunk.js +18 -16
- package/out/sdk/ingest/chunk.js.map +1 -1
- package/out/sdk/ingest/worker.d.ts +9 -0
- package/out/sdk/ingest/worker.d.ts.map +1 -0
- package/out/{scripts/ingest-chunk.js → sdk/ingest/worker.js} +15 -14
- package/out/sdk/ingest/worker.js.map +1 -0
- package/out/sdk/ingest.d.ts +122 -0
- package/out/sdk/ingest.d.ts.map +1 -0
- package/out/sdk/ingest.js +127 -0
- package/out/sdk/ingest.js.map +1 -0
- package/out/sdk/measure-resolutions.d.ts +6 -17
- package/out/sdk/measure-resolutions.d.ts.map +1 -1
- package/out/sdk/measure-resolutions.js +4 -16
- package/out/sdk/measure-resolutions.js.map +1 -1
- package/out/sdk/reduce.d.ts +33 -59
- package/out/sdk/reduce.d.ts.map +1 -1
- package/out/sdk/reduce.js +48 -79
- package/out/sdk/reduce.js.map +1 -1
- package/out/sdk/survey-area.d.ts +16 -48
- package/out/sdk/survey-area.d.ts.map +1 -1
- package/out/sdk/survey-area.js +35 -79
- package/out/sdk/survey-area.js.map +1 -1
- package/out/sdk/tabular.d.ts +32 -31
- package/out/sdk/tabular.d.ts.map +1 -1
- package/out/sdk/tabular.js +57 -49
- package/out/sdk/tabular.js.map +1 -1
- package/out/sdk/test-kit.d.ts +57 -0
- package/out/sdk/test-kit.d.ts.map +1 -0
- package/out/{test-kit.js → sdk/test-kit.js} +18 -39
- package/out/sdk/test-kit.js.map +1 -0
- package/out/sdk/verify.d.ts +17 -53
- package/out/sdk/verify.d.ts.map +1 -1
- package/out/sdk/verify.js +27 -85
- package/out/sdk/verify.js.map +1 -1
- package/out/vocabulary.d.ts +37 -103
- package/out/vocabulary.d.ts.map +1 -1
- package/out/vocabulary.js +34 -107
- package/out/vocabulary.js.map +1 -1
- package/package.json +37 -191
- package/{lib/sdk → sdk}/acquire.ts +18 -28
- package/{lib/sdk → sdk}/build-soil.ts +116 -130
- package/{lib/sdk → sdk}/cell-tiers.ts +22 -41
- package/{lib/sdk → sdk}/cells.ts +17 -43
- package/sdk/client.ts +147 -0
- package/sdk/download.ts +131 -0
- package/{lib/sdk → sdk}/ingest/chunk.ts +35 -27
- package/{lib/scripts/ingest-chunk.ts → sdk/ingest/worker.ts} +14 -13
- package/sdk/ingest.ts +255 -0
- package/{lib/sdk → sdk}/measure-resolutions.ts +6 -17
- package/sdk/reduce.ts +344 -0
- package/{lib/sdk → sdk}/survey-area.ts +49 -88
- package/{lib/sdk → sdk}/tabular.ts +61 -52
- package/{lib → sdk}/test-kit.ts +19 -41
- package/sdk/verify.ts +313 -0
- package/lib/sdk/client.ts +0 -184
- package/lib/sdk/download.ts +0 -161
- package/lib/sdk/index.ts +0 -20
- package/lib/sdk/ingest/index.ts +0 -278
- package/lib/sdk/reduce.ts +0 -375
- package/lib/sdk/verify.ts +0 -369
- package/out/scripts/ingest-chunk.d.ts +0 -11
- package/out/scripts/ingest-chunk.d.ts.map +0 -1
- package/out/scripts/ingest-chunk.js.map +0 -1
- package/out/sdk/index.d.ts +0 -20
- package/out/sdk/index.d.ts.map +0 -1
- package/out/sdk/index.js +0 -20
- package/out/sdk/index.js.map +0 -1
- package/out/sdk/ingest/index.d.ts +0 -132
- package/out/sdk/ingest/index.d.ts.map +0 -1
- package/out/sdk/ingest/index.js +0 -170
- package/out/sdk/ingest/index.js.map +0 -1
- package/out/test-kit.d.ts +0 -79
- package/out/test-kit.d.ts.map +0 -1
- package/out/test-kit.js.map +0 -1
package/lib/sdk/verify.ts
DELETED
|
@@ -1,369 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @copyright Sister Software
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
-
*
|
|
6
|
-
* The two-path agreement check, and its negative half.
|
|
7
|
-
*
|
|
8
|
-
* POSITIVE HALF. A sample of points is answered from the sealed artifact and then re-asked of Soil Data
|
|
9
|
-
* Access — the same authority, a different distribution channel, and geometry this package has never
|
|
10
|
-
* touched. What is compared is the MAP UNIT the two channels put at the point, which is the thing a
|
|
11
|
-
* conversion can get wrong; comparing the derived capability class instead would let a wrong delineation
|
|
12
|
-
* agree by accident whenever two neighbouring map units happen to share a class.
|
|
13
|
-
*
|
|
14
|
-
* NEGATIVE HALF, AND IT MATTERS AS MUCH. A sample of points in states with no rows must come back
|
|
15
|
-
* `unknown` — no coverage row at all — and never a low-capability reading. The positive half alone would
|
|
16
|
-
* pass on an artifact that answered class 8 for the whole planet.
|
|
17
|
-
*
|
|
18
|
-
* A DISAGREEMENT NEAR A DELINEATION EDGE IS NOT A DEFECT, AND THE DISTANCE IS MEASURED TO THE EDGE RATHER
|
|
19
|
-
* THAN TO THE NEAREST VERTEX. A point a centimetre from a long edge can be metres from every vertex of it
|
|
20
|
-
* — the flood layer's one near-miss read 1.58 m to vertices and 0.009 m to edges, a 9 mm difference
|
|
21
|
-
* overstated 175-fold. Measuring vertices makes the boundary tolerance far stricter than it reads, which
|
|
22
|
-
* is how a rendering difference gets reported as a conversion defect.
|
|
23
|
-
*
|
|
24
|
-
* THE ARTIFACT'S OWN ANSWER IS THE CELL SUMMARY, AND THE POINT'S MAP UNIT IS UNDER IT. So the comparison
|
|
25
|
-
* reaches the GEOMETRY — the truth table — rather than the reduction: the reduction is a per-cell
|
|
26
|
-
* distribution and has no single map unit to compare. That makes this a check on the CONVERSION, which is
|
|
27
|
-
* what it is for; the reduction is checked by the fixtures and by the share-sum invariant.
|
|
28
|
-
*
|
|
29
|
-
* IT REACHES IT THROUGH THE CELL INDEX, NOT THROUGH A BOUNDING-BOX SCAN. A `WHERE min_lat <= ? AND …` over
|
|
30
|
-
* the geometry table reads like a prefilter and is a full table scan: none of those columns is indexed and
|
|
31
|
-
* every row carries a ring blob, so at the pilot's 2.7 million delineations it reads gigabytes per point.
|
|
32
|
-
* Naming the point's cell is a primary-key range scan over a `WITHOUT ROWID` table, which is the whole
|
|
33
|
-
* reason the index exists.
|
|
34
|
-
*/
|
|
35
|
-
|
|
36
|
-
import {
|
|
37
|
-
decodeRings,
|
|
38
|
-
interiorPointOfEncodedRings,
|
|
39
|
-
pointInEncodedRings,
|
|
40
|
-
segmentDistanceMetres,
|
|
41
|
-
shortCellToInt,
|
|
42
|
-
type H3Cell,
|
|
43
|
-
} from "@mailwoman/spatial"
|
|
44
|
-
import { DatabaseClient } from "@mailwoman/sqlite/client"
|
|
45
|
-
import { cellToParent, latLngToCell } from "h3-js"
|
|
46
|
-
|
|
47
|
-
import { SoilCapabilityLookup, SoilReadingKind } from "#index"
|
|
48
|
-
import type { SoilDatabase } from "#schema"
|
|
49
|
-
import type { SoilDataAccessClient } from "#sdk/client"
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* One point, both verdicts, and whether they agree.
|
|
53
|
-
*/
|
|
54
|
-
export interface SoilAgreementRow {
|
|
55
|
-
label: string
|
|
56
|
-
latitude: number
|
|
57
|
-
longitude: number
|
|
58
|
-
/**
|
|
59
|
-
* The map unit the artifact's own geometry puts here.
|
|
60
|
-
*/
|
|
61
|
-
localMukey: string | null
|
|
62
|
-
/**
|
|
63
|
-
* The map unit Soil Data Access puts here.
|
|
64
|
-
*/
|
|
65
|
-
serviceMukey: string | null
|
|
66
|
-
outcome: "agree" | "disagree" | "boundary_tolerance"
|
|
67
|
-
/**
|
|
68
|
-
* Metres from the point to the nearest EDGE of the delineation the artifact matched.
|
|
69
|
-
*
|
|
70
|
-
* Carried on every row rather than only the tolerated ones, because it is what separates a real defect from two
|
|
71
|
-
* channels rendering the same edge differently — and a receipt that omits it forces a re-run.
|
|
72
|
-
*/
|
|
73
|
-
nearestEdgeMetres?: number
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* The negative half: a point the authority's published surveys do not reach.
|
|
78
|
-
*/
|
|
79
|
-
export interface SoilOutsideRow {
|
|
80
|
-
label: string
|
|
81
|
-
latitude: number
|
|
82
|
-
longitude: number
|
|
83
|
-
kind: SoilReadingKind
|
|
84
|
-
/**
|
|
85
|
-
* True when the artifact answered `unknown` — the only acceptable reading outside the built survey areas.
|
|
86
|
-
*/
|
|
87
|
-
passed: boolean
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
export interface VerifySoilResult {
|
|
91
|
-
agreement: SoilAgreementRow[]
|
|
92
|
-
agreed: number
|
|
93
|
-
disagreed: number
|
|
94
|
-
boundaryTolerance: number
|
|
95
|
-
outside: SoilOutsideRow[]
|
|
96
|
-
outsidePassed: number
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* Points outside the pilot region, named. Each is a place, not a bare pair of numbers: a coordinate a reader cannot
|
|
101
|
-
* name is a coordinate nobody can check.
|
|
102
|
-
*
|
|
103
|
-
* Every neighbouring state is included, because the failure this half catches is a footprint that leaked past the
|
|
104
|
-
* survey-area outlines — and a footprint accidentally clipped to "the Midwest" would pass a one-state check. Two of
|
|
105
|
-
* these sit close to the Iowa border on purpose: the outline test is conservative, so a near-border point must read
|
|
106
|
-
* unknown rather than borrow Iowa's coverage.
|
|
107
|
-
*/
|
|
108
|
-
export const OUTSIDE_PILOT_POINTS: ReadonlyArray<{ label: string; latitude: number; longitude: number }> = [
|
|
109
|
-
{ label: "Lincoln, Nebraska", latitude: 40.8136, longitude: -96.7026 },
|
|
110
|
-
{ label: "Omaha, Nebraska (Iowa border)", latitude: 41.2565, longitude: -95.9345 },
|
|
111
|
-
{ label: "Minneapolis, Minnesota", latitude: 44.9778, longitude: -93.265 },
|
|
112
|
-
{ label: "Albert Lea, Minnesota (Iowa border)", latitude: 43.6478, longitude: -93.3683 },
|
|
113
|
-
{ label: "Madison, Wisconsin", latitude: 43.0731, longitude: -89.4012 },
|
|
114
|
-
{ label: "Rockford, Illinois", latitude: 42.2711, longitude: -89.094 },
|
|
115
|
-
{ label: "Kansas City, Missouri", latitude: 39.0997, longitude: -94.5786 },
|
|
116
|
-
{ label: "Sioux Falls, South Dakota", latitude: 43.5446, longitude: -96.7311 },
|
|
117
|
-
]
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
* How close to a delineation edge a disagreement is attributed to the channels' differing rendering rather than to the
|
|
121
|
-
* conversion.
|
|
122
|
-
*
|
|
123
|
-
* One metre. The published shapefile carries nine decimals through this package's ingest and Soil Data Access renders
|
|
124
|
-
* its own geometry independently; NRCS's own positional-accuracy statement says the difference between a boundary's
|
|
125
|
-
* field location and its digitized location "is unknown", so this tolerance is about the two RENDERINGS agreeing rather
|
|
126
|
-
* than about ground truth. One metre is far below the median delineation, which is 24,863 m² — about 158 m across.
|
|
127
|
-
*/
|
|
128
|
-
const BOUNDARY_TOLERANCE_METRES = 1
|
|
129
|
-
|
|
130
|
-
export interface VerifySoilOptions {
|
|
131
|
-
databasePath: string
|
|
132
|
-
client: Pick<SoilDataAccessClient, "mukeyAtPoint">
|
|
133
|
-
/**
|
|
134
|
-
* Points to re-ask the service about. A caller samples them from the artifact — see {@link sampleAgreementPoints}.
|
|
135
|
-
*/
|
|
136
|
-
points: ReadonlyArray<{ label: string; latitude: number; longitude: number }>
|
|
137
|
-
outsidePoints?: ReadonlyArray<{ label: string; latitude: number; longitude: number }>
|
|
138
|
-
onProgress?: (message: string) => void
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
* Run both halves.
|
|
143
|
-
*/
|
|
144
|
-
export async function verifySoilDatabase(options: VerifySoilOptions): Promise<VerifySoilResult> {
|
|
145
|
-
const database = new DatabaseClient<SoilDatabase>(options.databasePath, { readOnly: true })
|
|
146
|
-
const lookup = new SoilCapabilityLookup({ databasePath: options.databasePath })
|
|
147
|
-
|
|
148
|
-
// Read once: the stored index is mixed-resolution because the whole tier is compacted, and a probe that assumed one
|
|
149
|
-
// resolution would read every row at the others as an absence.
|
|
150
|
-
const resolutions = (
|
|
151
|
-
database.prepare("SELECT DISTINCT resolution FROM soil_map_unit_cell ORDER BY resolution").all() as Array<{
|
|
152
|
-
resolution: number
|
|
153
|
-
}>
|
|
154
|
-
).map((row) => row.resolution)
|
|
155
|
-
|
|
156
|
-
const { indexResolution } = lookup.identity
|
|
157
|
-
|
|
158
|
-
try {
|
|
159
|
-
const agreement: SoilAgreementRow[] = []
|
|
160
|
-
|
|
161
|
-
for (const point of options.points) {
|
|
162
|
-
const local = localDelineationAt(database, resolutions, indexResolution, point.latitude, point.longitude)
|
|
163
|
-
const serviceMukey = (await options.client.mukeyAtPoint(point.latitude, point.longitude)) ?? null
|
|
164
|
-
|
|
165
|
-
const nearEdge = local.nearestEdgeMetres !== undefined && local.nearestEdgeMetres <= BOUNDARY_TOLERANCE_METRES
|
|
166
|
-
|
|
167
|
-
agreement.push({
|
|
168
|
-
...point,
|
|
169
|
-
localMukey: local.mukey,
|
|
170
|
-
serviceMukey,
|
|
171
|
-
outcome: local.mukey === serviceMukey ? "agree" : nearEdge ? "boundary_tolerance" : "disagree",
|
|
172
|
-
...(local.nearestEdgeMetres === undefined ? {} : { nearestEdgeMetres: local.nearestEdgeMetres }),
|
|
173
|
-
})
|
|
174
|
-
|
|
175
|
-
options.onProgress?.(`${agreement.length}/${options.points.length} points compared`)
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
const outside: SoilOutsideRow[] = []
|
|
179
|
-
|
|
180
|
-
for (const point of options.outsidePoints ?? OUTSIDE_PILOT_POINTS) {
|
|
181
|
-
const reading = lookup.lookup(point.latitude, point.longitude)
|
|
182
|
-
|
|
183
|
-
outside.push({ ...point, kind: reading.kind, passed: reading.kind === SoilReadingKind.Unknown })
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
return {
|
|
187
|
-
agreement,
|
|
188
|
-
agreed: agreement.filter((row) => row.outcome === "agree").length,
|
|
189
|
-
disagreed: agreement.filter((row) => row.outcome === "disagree").length,
|
|
190
|
-
boundaryTolerance: agreement.filter((row) => row.outcome === "boundary_tolerance").length,
|
|
191
|
-
outside,
|
|
192
|
-
outsidePassed: outside.filter((row) => row.passed).length,
|
|
193
|
-
}
|
|
194
|
-
} finally {
|
|
195
|
-
lookup[Symbol.dispose]()
|
|
196
|
-
await database.destroy()
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
/**
|
|
201
|
-
* The candidate delineations reaching a point, found THROUGH THE CELL INDEX rather than by scanning the geometry table.
|
|
202
|
-
*
|
|
203
|
-
* A bounding-box `WHERE` over `soil_map_unit_area` reads as a prefilter and is a FULL TABLE SCAN: none of those columns
|
|
204
|
-
* is indexed, the rows carry the ring blobs, and at the pilot's scale that is 2.7 million rows and several gigabytes
|
|
205
|
-
* read per point. The cell index exists to make exactly this question cheap — `soil_map_unit_cell` is `WITHOUT ROWID`
|
|
206
|
-
* keyed `(h3_cell, area_id)`, so naming the point's cell is a primary-key range scan.
|
|
207
|
-
*
|
|
208
|
-
* EVERY STORED RESOLUTION IS PROBED, not just the index one. The whole tier is compacted parent-ward, so a delineation
|
|
209
|
-
* that fills a run of cells is stored at a coarser resolution and a probe at the index resolution alone would read it
|
|
210
|
-
* as an absence — the same ancestor walk the reader does, and the same false negative it avoids.
|
|
211
|
-
*/
|
|
212
|
-
function candidateDelineations(
|
|
213
|
-
database: DatabaseClient<SoilDatabase>,
|
|
214
|
-
resolutions: readonly number[],
|
|
215
|
-
indexResolution: number,
|
|
216
|
-
latitude: number,
|
|
217
|
-
longitude: number
|
|
218
|
-
): Array<{ mukey: string; rings: Uint8Array }> {
|
|
219
|
-
const selectCandidates = database.prepare(
|
|
220
|
-
"SELECT c.area_id AS area_id, a.mukey AS mukey, a.rings AS rings FROM soil_map_unit_cell c " +
|
|
221
|
-
"JOIN soil_map_unit_area a ON a.area_id = c.area_id WHERE c.h3_cell = ?"
|
|
222
|
-
)
|
|
223
|
-
|
|
224
|
-
const indexCell = latLngToCell(latitude, longitude, indexResolution) as H3Cell
|
|
225
|
-
const seen = new Set<string>()
|
|
226
|
-
const candidates: Array<{ mukey: string; rings: Uint8Array }> = []
|
|
227
|
-
|
|
228
|
-
for (const resolution of resolutions) {
|
|
229
|
-
const cell = resolution === indexResolution ? indexCell : (cellToParent(indexCell, resolution) as H3Cell)
|
|
230
|
-
|
|
231
|
-
for (const row of selectCandidates.all(shortCellToInt(cell)) as Array<{
|
|
232
|
-
area_id: string
|
|
233
|
-
mukey: string
|
|
234
|
-
rings: Uint8Array
|
|
235
|
-
}>) {
|
|
236
|
-
// DEDUPE ON THE DELINEATION, NEVER ON ITS MAP UNIT. A delineation reached through two resolutions is one
|
|
237
|
-
// delineation and must be tested once; two DIFFERENT delineations of the same map unit are two shapes covering
|
|
238
|
-
// different ground and must both be tested. Keying on the map unit drops the second, and it drops it silently —
|
|
239
|
-
// the point test simply finds nothing and the row reads as a disagreement with the authority. Measured at Iowa
|
|
240
|
-
// scale: one point in 60, where the artifact's own geometry does contain the point and the index-driven read
|
|
241
|
-
// could not reach the delineation that holds it.
|
|
242
|
-
if (seen.has(row.area_id)) continue
|
|
243
|
-
|
|
244
|
-
seen.add(row.area_id)
|
|
245
|
-
candidates.push({ mukey: row.mukey, rings: row.rings })
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
return candidates
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
/**
|
|
253
|
-
* Which map unit the ARTIFACT's own geometry puts at a point, and how far the point is from that delineation's nearest
|
|
254
|
-
* edge.
|
|
255
|
-
*
|
|
256
|
-
* The cell index narrows; the ray cast decides. The edge distance is measured against every candidate, so a near-miss
|
|
257
|
-
* is reported with a distance rather than with nothing.
|
|
258
|
-
*/
|
|
259
|
-
function localDelineationAt(
|
|
260
|
-
database: DatabaseClient<SoilDatabase>,
|
|
261
|
-
resolutions: readonly number[],
|
|
262
|
-
indexResolution: number,
|
|
263
|
-
latitude: number,
|
|
264
|
-
longitude: number
|
|
265
|
-
): { mukey: string | null; nearestEdgeMetres?: number } {
|
|
266
|
-
const candidates = candidateDelineations(database, resolutions, indexResolution, latitude, longitude)
|
|
267
|
-
|
|
268
|
-
let mukey: string | null = null
|
|
269
|
-
let nearest = Infinity
|
|
270
|
-
|
|
271
|
-
for (const candidate of candidates) {
|
|
272
|
-
const distance = nearestEdgeDistance(candidate.rings, longitude, latitude)
|
|
273
|
-
|
|
274
|
-
if (distance < nearest) {
|
|
275
|
-
nearest = distance
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
if (mukey === null && pointInEncodedRings(candidate.rings, longitude, latitude)) {
|
|
279
|
-
mukey = candidate.mukey
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
return Number.isFinite(nearest) ? { mukey, nearestEdgeMetres: nearest } : { mukey }
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
/**
|
|
287
|
-
* Metres from a point to the nearest edge of an encoded ring set.
|
|
288
|
-
*
|
|
289
|
-
* Decoding here rather than walking the blob directly: this runs a few hundred times in a verification, not per
|
|
290
|
-
* geocode, and the decoded form is what makes the segment walk readable.
|
|
291
|
-
*/
|
|
292
|
-
function nearestEdgeDistance(blob: Uint8Array, lon: number, lat: number): number {
|
|
293
|
-
const { polygons } = decodeRings(blob)
|
|
294
|
-
|
|
295
|
-
let nearest = Infinity
|
|
296
|
-
|
|
297
|
-
for (const rings of polygons) {
|
|
298
|
-
for (const ring of rings) {
|
|
299
|
-
for (let index = 2; index < ring.length; index += 2) {
|
|
300
|
-
const distance = segmentDistanceMetres(
|
|
301
|
-
lon,
|
|
302
|
-
lat,
|
|
303
|
-
[ring[index - 2]!, ring[index - 1]!],
|
|
304
|
-
[ring[index]!, ring[index + 1]!]
|
|
305
|
-
)
|
|
306
|
-
|
|
307
|
-
if (distance < nearest) {
|
|
308
|
-
nearest = distance
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
return nearest
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
/**
|
|
318
|
-
* Draw a reproducible sample of points from the artifact.
|
|
319
|
-
*
|
|
320
|
-
* The draw is a deterministic stride over the primary key, not a random one, so a re-run compares the same points and a
|
|
321
|
-
* disagreement can be looked at rather than re-rolled.
|
|
322
|
-
*
|
|
323
|
-
* ONE ROW IS READ PER SAMPLE POINT AND NO MORE. A `WHERE rowid % stride = 0` scan looks like the same thing and is not:
|
|
324
|
-
* it walks the table itself, which means reading every ring blob to keep a few dozen. `ORDER BY area_id LIMIT 1 OFFSET
|
|
325
|
-
* n` walks the primary-key index to the offset and fetches exactly the row it lands on.
|
|
326
|
-
*/
|
|
327
|
-
export function sampleAgreementPoints(
|
|
328
|
-
databasePath: string,
|
|
329
|
-
options: { count?: number } = {}
|
|
330
|
-
): Array<{ label: string; latitude: number; longitude: number }> {
|
|
331
|
-
const count = options.count ?? 60
|
|
332
|
-
using database = new DatabaseClient<SoilDatabase>(databasePath, { readOnly: true })
|
|
333
|
-
|
|
334
|
-
const total = (database.prepare("SELECT count(*) AS n FROM soil_map_unit_area").get() as { n: number }).n
|
|
335
|
-
const stride = Math.max(1, Math.floor(total / Math.max(1, count)))
|
|
336
|
-
|
|
337
|
-
// One OFFSET probe per sample point rather than one materialized key list. The list looks cheap because it reads
|
|
338
|
-
// only the primary key, and at the pilot's 2.7 million delineations it is still 2.7 million strings held to keep
|
|
339
|
-
// sixty of them.
|
|
340
|
-
const selectByOffset = database.prepare(
|
|
341
|
-
"SELECT area_id, mukey, min_lat, min_lon, max_lat, max_lon, rings FROM soil_map_unit_area ORDER BY area_id LIMIT 1 OFFSET ?"
|
|
342
|
-
)
|
|
343
|
-
|
|
344
|
-
const points: Array<{ label: string; latitude: number; longitude: number }> = []
|
|
345
|
-
|
|
346
|
-
for (let index = 0; index < total && points.length < count; index += stride) {
|
|
347
|
-
const area = selectByOffset.get(index) as
|
|
348
|
-
| {
|
|
349
|
-
area_id: string
|
|
350
|
-
mukey: string
|
|
351
|
-
min_lat: number
|
|
352
|
-
min_lon: number
|
|
353
|
-
max_lat: number
|
|
354
|
-
max_lon: number
|
|
355
|
-
rings: Uint8Array
|
|
356
|
-
}
|
|
357
|
-
| undefined
|
|
358
|
-
|
|
359
|
-
if (!area) continue
|
|
360
|
-
|
|
361
|
-
const interior = interiorPointOfEncodedRings(area, 7)
|
|
362
|
-
|
|
363
|
-
if (!interior) continue
|
|
364
|
-
|
|
365
|
-
points.push({ label: `map unit ${area.mukey} delineation ${area.area_id}`, ...interior })
|
|
366
|
-
}
|
|
367
|
-
|
|
368
|
-
return points
|
|
369
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @copyright Sister Software
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
-
*
|
|
6
|
-
* One chunk of the soil ingest, as its own process — spawned by `buildSoilDatabase`, never run by hand.
|
|
7
|
-
* The process boundary and the stdout contract live with `runIngestChunkScript`; what stays here is only
|
|
8
|
-
* this product's flags and its feature-source constructor.
|
|
9
|
-
*/
|
|
10
|
-
export {};
|
|
11
|
-
//# sourceMappingURL=ingest-chunk.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ingest-chunk.d.ts","sourceRoot":"","sources":["../../lib/scripts/ingest-chunk.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ingest-chunk.js","sourceRoot":"","sources":["../../lib/scripts/ingest-chunk.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAA;AACtE,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,+CAA+C,CAAA;AAIxG,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,4BAA4B,EAAE,MAAM,mBAAmB,CAAA;AAEhE,MAAM,oBAAoB,CAAC;IAC1B,OAAO,EAAE,mBAAmB;IAC5B,OAAO,EAAE;QACR,GAAG,kBAAkB;QACrB,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QAC7B,aAAa,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QACjC,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QAC9B,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QAC5B,mBAAmB,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;KACvC;IACD,GAAG,EAAE,KAAK,EAAE,QAAsC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,CACpE,eAAe,CAAC,QAAQ,EAAE;QACzB,MAAM,EAAE,MAAM,4BAA4B,CAAC;YAC1C,aAAa,EAAE,gBAAgB,CAAC,mBAAmB,EAAE,WAAW,EAAE,MAAM,CAAC,SAAS,CAAC;YACnF,UAAU,EAAE,gBAAgB,CAAC,mBAAmB,EAAE,aAAa,EAAE,MAAM,CAAC,aAAa,CAAC,CAAC;YACvF,OAAO,EAAE,MAAM,CAAC,gBAAgB,CAAC,mBAAmB,EAAE,UAAU,EAAE,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC;YACtF,KAAK,EAAE,MAAM,CAAC,gBAAgB,CAAC,mBAAmB,EAAE,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;YAChF,+GAA+G;YAC/G,2GAA2G;YAC3G,oBAAoB,EAAE,CAAC;SACvB,CAAC;QACF,eAAe,EAAE,KAAK,CAAC,eAAe;QACtC,kBAAkB,EAAE,KAAK,CAAC,kBAAkB;QAC5C,kHAAkH;QAClH,yGAAyG;QACzG,eAAe,EAAE,IAAI,GAAG,CAAC,CAAC,MAAM,CAAC,mBAAmB,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QAC5G,UAAU,EAAE,KAAK,CAAC,UAAU;KAC5B,CAAC;CACH,CAAC,CAAA"}
|
package/out/sdk/index.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @copyright Sister Software
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
-
* @file The acquisition + build surface for the NRCS SSURGO soil-capability layer. The READER is the
|
|
6
|
-
* package root.
|
|
7
|
-
*/
|
|
8
|
-
export * from "#sdk/acquire";
|
|
9
|
-
export * from "#sdk/build-soil";
|
|
10
|
-
export * from "#sdk/cell-tiers";
|
|
11
|
-
export * from "#sdk/cells";
|
|
12
|
-
export * from "#sdk/client";
|
|
13
|
-
export * from "#sdk/download";
|
|
14
|
-
export * from "#sdk/ingest/index";
|
|
15
|
-
export * from "#sdk/measure-resolutions";
|
|
16
|
-
export * from "#sdk/reduce";
|
|
17
|
-
export * from "#sdk/survey-area";
|
|
18
|
-
export * from "#sdk/tabular";
|
|
19
|
-
export * from "#sdk/verify";
|
|
20
|
-
//# sourceMappingURL=index.d.ts.map
|
package/out/sdk/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/sdk/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,cAAc,CAAA;AAC5B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,YAAY,CAAA;AAC1B,cAAc,aAAa,CAAA;AAC3B,cAAc,eAAe,CAAA;AAC7B,cAAc,mBAAmB,CAAA;AACjC,cAAc,0BAA0B,CAAA;AACxC,cAAc,aAAa,CAAA;AAC3B,cAAc,kBAAkB,CAAA;AAChC,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA"}
|
package/out/sdk/index.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @copyright Sister Software
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
-
* @file The acquisition + build surface for the NRCS SSURGO soil-capability layer. The READER is the
|
|
6
|
-
* package root.
|
|
7
|
-
*/
|
|
8
|
-
export * from "#sdk/acquire";
|
|
9
|
-
export * from "#sdk/build-soil";
|
|
10
|
-
export * from "#sdk/cell-tiers";
|
|
11
|
-
export * from "#sdk/cells";
|
|
12
|
-
export * from "#sdk/client";
|
|
13
|
-
export * from "#sdk/download";
|
|
14
|
-
export * from "#sdk/ingest/index";
|
|
15
|
-
export * from "#sdk/measure-resolutions";
|
|
16
|
-
export * from "#sdk/reduce";
|
|
17
|
-
export * from "#sdk/survey-area";
|
|
18
|
-
export * from "#sdk/tabular";
|
|
19
|
-
export * from "#sdk/verify";
|
|
20
|
-
//# sourceMappingURL=index.js.map
|
package/out/sdk/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/sdk/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,cAAc,CAAA;AAC5B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,YAAY,CAAA;AAC1B,cAAc,aAAa,CAAA;AAC3B,cAAc,eAAe,CAAA;AAC7B,cAAc,mBAAmB,CAAA;AACjC,cAAc,0BAA0B,CAAA;AACxC,cAAc,aAAa,CAAA;AAC3B,cAAc,kBAAkB,CAAA;AAChC,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA"}
|
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @copyright Sister Software
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
-
*
|
|
6
|
-
* Read a survey area's published shapefiles as a stream of WGS84 delineations, through ogr2ogr.
|
|
7
|
-
*
|
|
8
|
-
* OGR IS BUILD TOOLING, NEVER A SERVE DEPENDENCY (SCOPE invariant 6). It converts the authority's geometry
|
|
9
|
-
* into the structure the runtime probes, and nothing downstream of this module knows GDAL exists.
|
|
10
|
-
*
|
|
11
|
-
* THE SOURCE IS ALREADY IN WGS84, AND CHECKING IT IS STILL THE CHECK. Each `.prj` is an ESRI WKT reading
|
|
12
|
-
* `GEOGCS["GCS_WGS_1984",…]`, which GDAL resolves to EPSG:4326 — so no reprojection is needed before H3.
|
|
13
|
-
* The authority code is asserted anyway before a single feature is read, and the reprojected stream is
|
|
14
|
-
* asserted against the layer's own declared extent, which is the check that catches a coordinate-order
|
|
15
|
-
* mistake the projection check cannot see.
|
|
16
|
-
*
|
|
17
|
-
* THE DATUM GUARD RUNS EVEN THOUGH THE ANSWER IS THE IDENTITY, AND THAT IS THE POINT. PROJ substitutes a
|
|
18
|
-
* ballpark datum shift SILENTLY when the accurate grid is missing — measured on the flood layer at 3.4 m
|
|
19
|
-
* over an entire country, visible only as eight disagreements out of 59 against the authority's own
|
|
20
|
-
* service. For an EPSG:4326 source `projinfo` answers `Null geographic offset from WGS 84 to WGS 84, 0 m,
|
|
21
|
-
* World.` and the guard passes in one process. Skipping it on the reasoning that this source needs no
|
|
22
|
-
* shift is how the guard comes to be missing on the day a source arrives that does.
|
|
23
|
-
*
|
|
24
|
-
* THE ID IS THE SHAPEFILE'S OWN FID, AND IT HAS TO BE, because SSURGO publishes no per-delineation key:
|
|
25
|
-
* `MUKEY` names the MAP UNIT and one map unit has many delineations — `IA153` holds 17,966 delineations
|
|
26
|
-
* across 152 map units. So `area_id` is `<areasymbol>:<fid>`, which is stable across runs and is what makes
|
|
27
|
-
* a bounded chunk name the same features every time.
|
|
28
|
-
*/
|
|
29
|
-
import { type MultiPolygonRings } from "@mailwoman/spatial";
|
|
30
|
-
/**
|
|
31
|
-
* The shapefile holding a survey area's map-unit polygons — the delineations this layer stores.
|
|
32
|
-
*/
|
|
33
|
-
export declare function mapUnitShapefile(spatialDirectory: string, areaSymbol: string): string;
|
|
34
|
-
/**
|
|
35
|
-
* The shapefile holding a survey area's own OUTLINE. The footprint comes from HERE and never from the union of the
|
|
36
|
-
* rated polygons — `NOTCOM` and access-denied map units are inside the footprint and carry no rating, so a footprint
|
|
37
|
-
* derived from the rated set would report them as unmapped when the authority has declared exactly what they are.
|
|
38
|
-
*/
|
|
39
|
-
export declare function surveyAreaShapefile(spatialDirectory: string, areaSymbol: string): string;
|
|
40
|
-
/**
|
|
41
|
-
* One map-unit delineation, reprojected to WGS84.
|
|
42
|
-
*/
|
|
43
|
-
export interface SoilDelineation {
|
|
44
|
-
/**
|
|
45
|
-
* `<areasymbol>:<fid>`.
|
|
46
|
-
*/
|
|
47
|
-
areaID: string;
|
|
48
|
-
mukey: string;
|
|
49
|
-
areasymbol: string;
|
|
50
|
-
polygons: MultiPolygonRings;
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* What a shapefile says about itself, read before any feature is.
|
|
54
|
-
*/
|
|
55
|
-
export interface SoilSourceIdentity {
|
|
56
|
-
epsg: number;
|
|
57
|
-
featureCount: number;
|
|
58
|
-
layer: string;
|
|
59
|
-
/**
|
|
60
|
-
* The layer's own declared extent, `[minLon, minLat, maxLon, maxLat]`.
|
|
61
|
-
*/
|
|
62
|
-
bbox: readonly [number, number, number, number];
|
|
63
|
-
}
|
|
64
|
-
export interface SoilIngestOptions {
|
|
65
|
-
shapefilePath: string;
|
|
66
|
-
/**
|
|
67
|
-
* Layer inside it. Defaults to the shapefile's base name, which is what the ESRI driver reports.
|
|
68
|
-
*/
|
|
69
|
-
layer?: string;
|
|
70
|
-
/**
|
|
71
|
-
* The EPSG code the source must declare.
|
|
72
|
-
*/
|
|
73
|
-
expectEPSG?: number;
|
|
74
|
-
/**
|
|
75
|
-
* Read only the shapefile's own FIDs in `[fidFrom, fidTo]`, inclusive — what makes a bounded chunk possible.
|
|
76
|
-
*/
|
|
77
|
-
fidFrom?: number;
|
|
78
|
-
fidTo?: number;
|
|
79
|
-
/**
|
|
80
|
-
* Stop after this many features. The fixture and smoke rungs use it; a full build does not set it.
|
|
81
|
-
*/
|
|
82
|
-
limit?: number;
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* Read what the shapefile declares about itself, and refuse a projection this ingest was not written for.
|
|
86
|
-
*
|
|
87
|
-
* @throws {Error} When the layer is missing, declares no EPSG authority code, declares one other than `expectEPSG`, or
|
|
88
|
-
* reports no feature count.
|
|
89
|
-
*/
|
|
90
|
-
export declare function readSoilSourceIdentity(options: SoilIngestOptions): Promise<SoilSourceIdentity>;
|
|
91
|
-
/**
|
|
92
|
-
* Stream the map-unit delineations as WGS84 features.
|
|
93
|
-
*
|
|
94
|
-
* Every feature is checked against the declared extent as it passes. A swapped coordinate order survives a projection
|
|
95
|
-
* check — both axes are still numbers in a plausible range — and shows up here immediately.
|
|
96
|
-
*
|
|
97
|
-
* @throws {Error} When ogr2ogr fails, when a feature carries no geometry or no `MUKEY`, or when a vertex falls outside
|
|
98
|
-
* the declared extent.
|
|
99
|
-
*/
|
|
100
|
-
export declare function readSoilDelineations(options: SoilIngestOptions & {
|
|
101
|
-
bbox: readonly [number, number, number, number];
|
|
102
|
-
}): AsyncGenerator<SoilDelineation>;
|
|
103
|
-
/**
|
|
104
|
-
* Where a build's delineations come from, and what the source declares about itself.
|
|
105
|
-
*
|
|
106
|
-
* The builder takes ONE of these rather than a path, which is what makes the fixture rung possible: hand-built geometry
|
|
107
|
-
* with no network and no GDAL still exercises the whole database half — the domain check, the cell classification, the
|
|
108
|
-
* reduction, the coverage rows, the manifest and the seal.
|
|
109
|
-
*/
|
|
110
|
-
export interface SoilFeatureSource {
|
|
111
|
-
areaSymbol: string;
|
|
112
|
-
/**
|
|
113
|
-
* What the source says it holds. The build compares its own streamed total against this, so a short read throws
|
|
114
|
-
* instead of building a smaller county.
|
|
115
|
-
*/
|
|
116
|
-
declaredFeatureCount: number;
|
|
117
|
-
layer: string;
|
|
118
|
-
epsg: number;
|
|
119
|
-
/**
|
|
120
|
-
* A description of where these delineations came from, for the receipt.
|
|
121
|
-
*/
|
|
122
|
-
origin: string;
|
|
123
|
-
delineations: () => AsyncIterable<SoilDelineation>;
|
|
124
|
-
}
|
|
125
|
-
/**
|
|
126
|
-
* One survey area's map-unit shapefile as a feature source — identity read up front, features streamed on demand.
|
|
127
|
-
*/
|
|
128
|
-
export declare function createShapefileFeatureSource(options: SoilIngestOptions & {
|
|
129
|
-
areaSymbol: string;
|
|
130
|
-
declaredFeatureCount?: number;
|
|
131
|
-
}): Promise<SoilFeatureSource>;
|
|
132
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/sdk/ingest/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAGH,OAAO,EAAiD,KAAK,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAsB1G;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,gBAAgB,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAErF;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,gBAAgB,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAExF;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC/B;;OAEG;IACH,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,UAAU,EAAE,MAAM,CAAA;IAClB,QAAQ,EAAE,iBAAiB,CAAA;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAClC,IAAI,EAAE,MAAM,CAAA;IACZ,YAAY,EAAE,MAAM,CAAA;IACpB,KAAK,EAAE,MAAM,CAAA;IACb;;OAEG;IACH,IAAI,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAA;CAC/C;AAED,MAAM,WAAW,iBAAiB;IACjC,aAAa,EAAE,MAAM,CAAA;IACrB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;CACd;AAED;;;;;GAKG;AACH,wBAAsB,sBAAsB,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAepG;AAyBD;;;;;;;;GAQG;AACH,wBAAuB,oBAAoB,CAC1C,OAAO,EAAE,iBAAiB,GAAG;IAAE,IAAI,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,GAC9E,cAAc,CAAC,eAAe,CAAC,CAuBjC;AAqCD;;;;;;GAMG;AACH,MAAM,WAAW,iBAAiB;IACjC,UAAU,EAAE,MAAM,CAAA;IAClB;;;OAGG;IACH,oBAAoB,EAAE,MAAM,CAAA;IAC5B,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,MAAM,EAAE,MAAM,CAAA;IACd,YAAY,EAAE,MAAM,aAAa,CAAC,eAAe,CAAC,CAAA;CAClD;AAED;;GAEG;AACH,wBAAsB,4BAA4B,CACjD,OAAO,EAAE,iBAAiB,GAAG;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,oBAAoB,CAAC,EAAE,MAAM,CAAA;CAAE,GAChF,OAAO,CAAC,iBAAiB,CAAC,CAiB5B"}
|