@mailwoman/soil 10.0.0 → 10.1.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.
Files changed (116) hide show
  1. package/README.md +118 -116
  2. package/lib/index.ts +66 -98
  3. package/lib/paths.ts +24 -0
  4. package/lib/schema.ts +188 -120
  5. package/lib/vocabulary.ts +40 -107
  6. package/out/index.d.ts +52 -70
  7. package/out/index.d.ts.map +1 -1
  8. package/out/index.js +24 -72
  9. package/out/index.js.map +1 -1
  10. package/out/paths.d.ts +19 -0
  11. package/out/paths.d.ts.map +1 -0
  12. package/out/paths.js +21 -0
  13. package/out/paths.js.map +1 -0
  14. package/out/schema.d.ts +187 -119
  15. package/out/schema.d.ts.map +1 -1
  16. package/out/schema.js +31 -31
  17. package/out/schema.js.map +1 -1
  18. package/out/sdk/acquire.d.ts +15 -24
  19. package/out/sdk/acquire.d.ts.map +1 -1
  20. package/out/sdk/acquire.js +6 -21
  21. package/out/sdk/acquire.js.map +1 -1
  22. package/out/sdk/build-soil.d.ts +67 -70
  23. package/out/sdk/build-soil.d.ts.map +1 -1
  24. package/out/sdk/build-soil.js +64 -94
  25. package/out/sdk/build-soil.js.map +1 -1
  26. package/out/sdk/cell-tiers.d.ts +7 -19
  27. package/out/sdk/cell-tiers.d.ts.map +1 -1
  28. package/out/sdk/cell-tiers.js +19 -38
  29. package/out/sdk/cell-tiers.js.map +1 -1
  30. package/out/sdk/cells.d.ts +15 -41
  31. package/out/sdk/cells.d.ts.map +1 -1
  32. package/out/sdk/cells.js +11 -38
  33. package/out/sdk/cells.js.map +1 -1
  34. package/out/sdk/client.d.ts +23 -48
  35. package/out/sdk/client.d.ts.map +1 -1
  36. package/out/sdk/client.js +19 -63
  37. package/out/sdk/client.js.map +1 -1
  38. package/out/sdk/download.d.ts +24 -47
  39. package/out/sdk/download.d.ts.map +1 -1
  40. package/out/sdk/download.js +14 -54
  41. package/out/sdk/download.js.map +1 -1
  42. package/out/sdk/ingest/chunk.d.ts +29 -25
  43. package/out/sdk/ingest/chunk.d.ts.map +1 -1
  44. package/out/sdk/ingest/chunk.js +18 -16
  45. package/out/sdk/ingest/chunk.js.map +1 -1
  46. package/out/sdk/ingest/worker.d.ts +9 -0
  47. package/out/sdk/ingest/worker.d.ts.map +1 -0
  48. package/out/{scripts/ingest-chunk.js → sdk/ingest/worker.js} +11 -10
  49. package/out/sdk/ingest/worker.js.map +1 -0
  50. package/out/sdk/ingest.d.ts +120 -0
  51. package/out/sdk/ingest.d.ts.map +1 -0
  52. package/out/sdk/ingest.js +127 -0
  53. package/out/sdk/ingest.js.map +1 -0
  54. package/out/sdk/measure-resolutions.d.ts +6 -17
  55. package/out/sdk/measure-resolutions.d.ts.map +1 -1
  56. package/out/sdk/measure-resolutions.js +4 -16
  57. package/out/sdk/measure-resolutions.js.map +1 -1
  58. package/out/sdk/reduce.d.ts +33 -59
  59. package/out/sdk/reduce.d.ts.map +1 -1
  60. package/out/sdk/reduce.js +47 -78
  61. package/out/sdk/reduce.js.map +1 -1
  62. package/out/sdk/survey-area.d.ts +16 -48
  63. package/out/sdk/survey-area.d.ts.map +1 -1
  64. package/out/sdk/survey-area.js +33 -77
  65. package/out/sdk/survey-area.js.map +1 -1
  66. package/out/sdk/tabular.d.ts +32 -31
  67. package/out/sdk/tabular.d.ts.map +1 -1
  68. package/out/sdk/tabular.js +57 -49
  69. package/out/sdk/tabular.js.map +1 -1
  70. package/out/sdk/test-kit.d.ts +57 -0
  71. package/out/sdk/test-kit.d.ts.map +1 -0
  72. package/out/{test-kit.js → sdk/test-kit.js} +18 -39
  73. package/out/sdk/test-kit.js.map +1 -0
  74. package/out/sdk/verify.d.ts +15 -51
  75. package/out/sdk/verify.d.ts.map +1 -1
  76. package/out/sdk/verify.js +19 -77
  77. package/out/sdk/verify.js.map +1 -1
  78. package/out/vocabulary.d.ts +37 -103
  79. package/out/vocabulary.d.ts.map +1 -1
  80. package/out/vocabulary.js +34 -107
  81. package/out/vocabulary.js.map +1 -1
  82. package/package.json +36 -190
  83. package/{lib/sdk → sdk}/acquire.ts +18 -28
  84. package/{lib/sdk → sdk}/build-soil.ts +113 -127
  85. package/{lib/sdk → sdk}/cell-tiers.ts +20 -39
  86. package/{lib/sdk → sdk}/cells.ts +17 -43
  87. package/sdk/client.ts +147 -0
  88. package/sdk/download.ts +131 -0
  89. package/{lib/sdk → sdk}/ingest/chunk.ts +35 -27
  90. package/{lib/scripts/ingest-chunk.ts → sdk/ingest/worker.ts} +10 -9
  91. package/sdk/ingest.ts +253 -0
  92. package/{lib/sdk → sdk}/measure-resolutions.ts +6 -17
  93. package/sdk/reduce.ts +344 -0
  94. package/{lib/sdk → sdk}/survey-area.ts +39 -83
  95. package/{lib/sdk → sdk}/tabular.ts +61 -52
  96. package/{lib → sdk}/test-kit.ts +19 -41
  97. package/{lib/sdk → sdk}/verify.ts +29 -85
  98. package/lib/sdk/client.ts +0 -184
  99. package/lib/sdk/download.ts +0 -161
  100. package/lib/sdk/index.ts +0 -20
  101. package/lib/sdk/ingest/index.ts +0 -278
  102. package/lib/sdk/reduce.ts +0 -375
  103. package/out/scripts/ingest-chunk.d.ts +0 -11
  104. package/out/scripts/ingest-chunk.d.ts.map +0 -1
  105. package/out/scripts/ingest-chunk.js.map +0 -1
  106. package/out/sdk/index.d.ts +0 -20
  107. package/out/sdk/index.d.ts.map +0 -1
  108. package/out/sdk/index.js +0 -20
  109. package/out/sdk/index.js.map +0 -1
  110. package/out/sdk/ingest/index.d.ts +0 -132
  111. package/out/sdk/ingest/index.d.ts.map +0 -1
  112. package/out/sdk/ingest/index.js +0 -170
  113. package/out/sdk/ingest/index.js.map +0 -1
  114. package/out/test-kit.d.ts +0 -79
  115. package/out/test-kit.d.ts.map +0 -1
  116. package/out/test-kit.js.map +0 -1
package/out/schema.js CHANGED
@@ -3,33 +3,23 @@
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
5
  *
6
- * Typed schema for `soil.db` — the polygon truth table, the containment index above it, and the ONE
7
- * reduction both consumers read, plus the layer-contract tables from `@mailwoman/core/layers`.
6
+ * Typed schema for `soil.db`. It defines the polygon truth table, its containment index and the shared reduction
7
+ * that both consumers read. It also defines the layer-interface tables from `@mailwoman/core/layers`.
8
8
  *
9
- * THREE CELL-FACING TABLES ARE ONE PIPELINE, NOT THREE SOURCES. {@link SoilMapUnitAreaTable} holds what
10
- * the authority drew, unsimplified. {@link SoilMapUnitCellTable} says which cells each delineation
11
- * reaches and whether it fills them. {@link SoilCapabilityCellTable} is that index reduced ONCE, at build
12
- * time, into a per-cell distribution. A `partial` cell's contribution to the reduction is weighted by the
13
- * area it actually covers, which is why the truth table keeps unsimplified rings: simplify them and the
14
- * weights change silently.
9
+ * {@link SoilMapUnitAreaTable} stores the authority's unsimplified geometry.
10
+ * {@link SoilMapUnitCellTable} records which cells each delineation reaches and whether it fills them.
11
+ * {@link SoilCapabilityCellTable} is that index reduced once, at build time, into a per-cell
12
+ * distribution. A `partial` cell's contribution is weighted by the area it covers. The truth table keeps
13
+ * unsimplified rings so simplification cannot change those weights silently.
15
14
  *
16
- * THE REDUCTION STORES A DISTRIBUTION, NEVER A WINNER, AND THAT IS FORCED BY MEASUREMENT RATHER THAN
17
- * PREFERENCE. 84.0% of the 339,191 national map units hold two or more components; in 16.8% the largest
18
- * component covers under half the map unit; and 85.4% of `IA153`'s 17,966 delineations are smaller than
19
- * one resolution-9 cell, so no affordable cell size removes the mixture. NRCS itself ships
20
- * `muaggatt.niccdcd` — its own dominant-condition capability class — beside `niccdcdpct`, the share that
21
- * class actually covers, with an observed minimum of 2%. This table reproduces that pattern at cell grain
22
- * rather than inventing one.
15
+ * The reduction stores a distribution instead of one winning class. Four separate shares record reasons for
16
+ * absence. Class 8 is a determination, so it contributes a class share. A fold that places a `notcom` polygon, a water body
17
+ * and an unrated series into "not arable" would produce a well-formed but wrong answer. The four shares preserve
18
+ * those distinctions.
23
19
  *
24
- * AN ABSENCE IS NEVER A SMALL NUMBER. Four separate shares name why the rest of a cell carries no class,
25
- * and class 8 is NOT among them: class 8 is a determination — the survey looked and rated the land as
26
- * precluding commercial plant production — so it is a class share like any other. Folding a `NOTCOM`
27
- * polygon, a water body and an unrated series into "not arable" would produce a well-formed wrong answer,
28
- * which is what the four shares exist to make impossible.
29
- *
30
- * `WITHOUT ROWID` ON THE CELL TABLES AND NEVER ON THE GEOMETRY TABLE. Small fixed-width rows probed by
31
- * their exact primary key belong in the B-tree; a row carrying a geometry blob does not — clustering it
32
- * into the B-tree makes every index page a geometry page.
20
+ * Cell tables use `without rowid`; the geometry table uses ordinary rowids. Small fixed-width rows are probed by
21
+ * their exact primary key, so they fit the B-tree. A geometry blob would make every index page a geometry page if
22
+ * stored in that B-tree.
33
23
  */
34
24
  import { addBoundingBoxColumns, addCellIndexColumns, addRingGeometryColumns } from "@mailwoman/sqlite/schema-columns";
35
25
  import { sql } from "kysely";
@@ -38,17 +28,24 @@ import { sql } from "kysely";
38
28
  */
39
29
  export const SoilCellContainment = {
40
30
  /**
41
- * Every point in the cell is inside the delineation. Answered from the index alone, with no geometry read.
31
+ * Every point in the cell is inside the delineation.
32
+ *
33
+ * Answered from the index without reading geometry.
42
34
  */
43
35
  Whole: "whole",
44
36
  /**
45
- * The delineation's boundary crosses the cell. The index has narrowed the candidates; the point test decides.
37
+ * The delineation's boundary crosses the cell.
38
+ *
39
+ * The index has narrowed the candidates.
40
+ * The point test decides.
46
41
  */
47
42
  Partial: "partial",
48
43
  };
49
44
  /**
50
- * Create `soil_map_unit_area`. A PLAIN rowid table on purpose — the `rings` blob is exactly the payload `WITHOUT ROWID`
51
- * penalizes.
45
+ * Create `soil_map_unit_area`.
46
+ *
47
+ * A plain rowid table on purpose.
48
+ * The `rings` blob is exactly the payload `without rowid` penalizes.
52
49
  */
53
50
  export async function createSoilMapUnitAreaTable(db) {
54
51
  const table = db.schema
@@ -59,13 +56,15 @@ export async function createSoilMapUnitAreaTable(db) {
59
56
  await addRingGeometryColumns(table).execute();
60
57
  }
61
58
  /**
62
- * Create `soil_map_unit_cell` — the containment index. Small fixed-width rows probed by their exact primary key.
59
+ * Create `soil_map_unit_cell`, the containment index.
60
+ *
61
+ * Small fixed-width rows probed by their exact primary key.
63
62
  */
64
63
  export async function createSoilMapUnitCellTable(db) {
65
64
  const table = db.schema.createTable("soil_map_unit_cell");
66
65
  await addCellIndexColumns(table, "area_id")
67
66
  .addPrimaryKeyConstraint("soil_map_unit_cell_pk", ["h3_cell", "area_id"])
68
- // `WITHOUT ROWID` has no first-class builder; the raw modifier is the idiomatic fallback.
67
+ // `without rowid` has no first-class builder. The raw modifier is the idiomatic fallback.
69
68
  .modifyEnd(sql `without rowid`)
70
69
  .execute();
71
70
  }
@@ -107,7 +106,8 @@ export async function createSoilComponentTable(db) {
107
106
  .execute();
108
107
  }
109
108
  /**
110
- * Create `soil_capability_cell` — the reduction both consumers read.
109
+ * Create `soil_capability_cell`.
110
+ * The reduction both consumers read.
111
111
  */
112
112
  export async function createSoilCapabilityCellTable(db) {
113
113
  await db.schema
package/out/schema.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"","sources":["../lib/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAGH,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAA;AACrH,OAAO,EAAE,GAAG,EAAe,MAAM,QAAQ,CAAA;AAEzC;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;IAClC;;OAEG;IACH,KAAK,EAAE,OAAO;IACd;;OAEG;IACH,OAAO,EAAE,SAAS;CACT,CAAA;AA2SV;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,0BAA0B,CAAC,EAAoB;IACpE,MAAM,KAAK,GAAG,EAAE,CAAC,MAAM;SACrB,WAAW,CAAC,oBAAoB,CAAC;SACjC,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,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,EAAE,CAAC,MAAM;SACb,WAAW,CAAC,iBAAiB,CAAC;SAC9B,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;SAC/C,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;SAC7C,SAAS,CAAC,YAAY,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;SACnD,SAAS,CAAC,UAAU,EAAE,SAAS,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;SACpD,uBAAuB,CAAC,oBAAoB,EAAE,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;SACjE,SAAS,CAAC,GAAG,CAAA,eAAe,CAAC;SAC7B,OAAO,EAAE,CAAA;AACZ,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,EAAoB;IAC1D,MAAM,0BAA0B,CAAC,EAAE,CAAC,CAAA;IACpC,MAAM,0BAA0B,CAAC,EAAE,CAAC,CAAA;IACpC,MAAM,sBAAsB,CAAC,EAAE,CAAC,CAAA;IAChC,MAAM,wBAAwB,CAAC,EAAE,CAAC,CAAA;IAClC,MAAM,6BAA6B,CAAC,EAAE,CAAC,CAAA;IACvC,MAAM,yBAAyB,CAAC,EAAE,CAAC,CAAA;IACnC,MAAM,yBAAyB,CAAC,EAAE,CAAC,CAAA;AACpC,CAAC"}
@@ -3,58 +3,49 @@
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
5
  *
6
- * Acquisition, end to end: which survey areas a region holds, their archives, and the inputs the builder
7
- * takes.
8
- *
9
- * THE FRESHNESS QUESTION IS ANSWERED BY THE TABULAR SERVICE, NOT BY THE FILE HOST. `sacatalog.saverest` is
10
- * the version-established date, and it is also what the archive's filename embeds — so one catalogue call
11
- * both decides what to download and names the file. The download host cannot answer it: it refuses `HEAD`
12
- * with 405 and ignores `Range`, so a length probe there is a full transfer.
13
- *
14
- * THE VINTAGE IS THE REFRESH THE BUILD INGESTED, AND IT IS ONE DATE FOR THE WHOLE ARTIFACT. NRCS performs
15
- * ONE coordinated Annual Soils Refresh, each October 1; grouping `sacatalog` by year of `saverest` returns
16
- * 2016: 1, 2025: 3,323, 2026: 56. So a region's areas share a refresh and the manifest can carry one
17
- * `source_vintage` — the LATEST of the areas built, because that is the date after which nothing in the
18
- * artifact changed. Every area's own date is kept per row in `soil_survey_area`, and so is the far older
19
- * field-survey date, which is the number a currency claim actually turns on.
6
+ * Downloads a region's soil survey areas and turns them into builder inputs. The catalogue's `saverest` date picks the archive and the host rejects `HEAD` and ignores `Range`.
20
7
  */
8
+ import type { PathBuilderLike } from "path-ts";
21
9
  import type { SurveyAreaInput } from "#sdk/build-soil";
22
10
  import type { SoilDataAccessClient, SurveyAreaCatalogEntry } from "#sdk/client";
23
11
  import { type SurveyAreaArchive } from "#sdk/download";
12
+ /**
13
+ * Options for {@link acquireRegion}.
14
+ */
24
15
  export interface AcquireRegionOptions {
25
16
  client: SoilDataAccessClient;
26
17
  /**
27
- * The survey-area symbol prefix — a state code (`IA`) for a whole state, or a full symbol (`IA153`) for the
28
- * single-area rung.
18
+ * The survey-area symbol prefix, where a state code such as `IA` selects a whole state
19
+ * and a full symbol such as `IA153` selects one area.
29
20
  */
30
21
  prefix: string;
31
22
  /**
32
- * Where vintages are kept.
23
+ * The directory where downloaded archives are cached.
33
24
  */
34
- cacheRoot: string;
25
+ cacheRoot: PathBuilderLike;
35
26
  /**
36
- * Build only these symbols out of the ones the catalogue returns. Absent means all of them.
27
+ * The symbols to build from the catalogue's results, defaulting to every symbol.
37
28
  */
38
29
  only?: ReadonlyArray<string>;
39
30
  onProgress?: (message: string) => void;
40
31
  }
41
32
  /**
42
- * What one region's acquisition produced.
33
+ * The result of acquiring one region.
43
34
  */
44
35
  export interface AcquiredRegion {
45
36
  catalog: SurveyAreaCatalogEntry[];
46
37
  archives: SurveyAreaArchive[];
47
38
  areas: SurveyAreaInput[];
48
39
  /**
49
- * The refresh the artifact carries — the latest version date among the areas built.
40
+ * The latest `saverest` date among the areas built, used as the artifact's source vintage.
50
41
  */
51
42
  sourceVintage: string;
52
43
  }
53
44
  /**
54
- * Acquire every survey area a prefix names, and turn them into builder inputs.
45
+ * Downloads every survey area that matches the prefix and turns each into a builder input.
55
46
  *
56
- * @throws {Error} When the catalogue holds nothing for the prefix, when `only` names a symbol the catalogue does not
57
- * carry, or when any area's archive, metadata or shapefile refuses.
47
+ * @throws {Error} When the catalogue has no entry for the prefix, when `only` lists a symbol
48
+ * that the catalogue lacks, or when an area's archive, metadata or shapefile cannot be read.
58
49
  */
59
50
  export declare function acquireRegion(options: AcquireRegionOptions): Promise<AcquiredRegion>;
60
51
  //# sourceMappingURL=acquire.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"acquire.d.ts","sourceRoot":"","sources":["../../lib/sdk/acquire.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACtD,OAAO,KAAK,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAA;AAC/E,OAAO,EAAsB,KAAK,iBAAiB,EAAE,MAAM,eAAe,CAAA;AAI1E,MAAM,WAAW,oBAAoB;IACpC,MAAM,EAAE,oBAAoB,CAAA;IAC5B;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;IACjB;;OAEG;IACH,IAAI,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAA;IAC5B,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;CACtC;AAED;;GAEG;AACH,MAAM,WAAW,cAAc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GPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
5
  *
6
- * Acquisition, end to end: which survey areas a region holds, their archives, and the inputs the builder
7
- * takes.
8
- *
9
- * THE FRESHNESS QUESTION IS ANSWERED BY THE TABULAR SERVICE, NOT BY THE FILE HOST. `sacatalog.saverest` is
10
- * the version-established date, and it is also what the archive's filename embeds — so one catalogue call
11
- * both decides what to download and names the file. The download host cannot answer it: it refuses `HEAD`
12
- * with 405 and ignores `Range`, so a length probe there is a full transfer.
13
- *
14
- * THE VINTAGE IS THE REFRESH THE BUILD INGESTED, AND IT IS ONE DATE FOR THE WHOLE ARTIFACT. NRCS performs
15
- * ONE coordinated Annual Soils Refresh, each October 1; grouping `sacatalog` by year of `saverest` returns
16
- * 2016: 1, 2025: 3,323, 2026: 56. So a region's areas share a refresh and the manifest can carry one
17
- * `source_vintage` — the LATEST of the areas built, because that is the date after which nothing in the
18
- * artifact changed. Every area's own date is kept per row in `soil_survey_area`, and so is the far older
19
- * field-survey date, which is the number a currency claim actually turns on.
6
+ * Downloads a region's soil survey areas and turns them into builder inputs. The catalogue's `saverest` date picks the archive and the host rejects `HEAD` and ignores `Range`.
20
7
  */
21
8
  import { downloadSurveyArea } from "#sdk/download";
22
- import { mapUnitShapefile, readSoilSourceIdentity, surveyAreaShapefile } from "#sdk/ingest/index";
9
+ import { mapUnitShapefile, readSoilSourceIdentity, surveyAreaShapefile } from "#sdk/ingest";
23
10
  import { readSurveyAreaAttributes, readSurveyAreaOutline } from "#sdk/survey-area";
24
11
  /**
25
- * Acquire every survey area a prefix names, and turn them into builder inputs.
12
+ * Downloads every survey area that matches the prefix and turns each into a builder input.
26
13
  *
27
- * @throws {Error} When the catalogue holds nothing for the prefix, when `only` names a symbol the catalogue does not
28
- * carry, or when any area's archive, metadata or shapefile refuses.
14
+ * @throws {Error} When the catalogue has no entry for the prefix, when `only` lists a symbol
15
+ * that the catalogue lacks, or when an area's archive, metadata or shapefile cannot be read.
29
16
  */
30
17
  export async function acquireRegion(options) {
31
18
  const catalog = await options.client.readSurveyAreaCatalog(options.prefix);
@@ -62,9 +49,7 @@ export async function acquireRegion(options) {
62
49
  declaredFeatureCount: identity.featureCount,
63
50
  });
64
51
  }
65
- // The LATEST refresh among the areas built, because that is the date after which nothing in this artifact changed.
66
- // Taking the earliest would claim a currency the newest area does not have; taking today's date would claim one no
67
- // area has.
52
+ // The latest refresh date is the date after which no entry in this artifact changed.
68
53
  const sourceVintage = selected
69
54
  .map((entry) => entry.saverest)
70
55
  .toSorted()
@@ -1 +1 @@
1
- {"version":3,"file":"acquire.js","sourceRoot":"","sources":["../../lib/sdk/acquire.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAIH,OAAO,EAAE,kBAAkB,EAA0B,MAAM,eAAe,CAAA;AAC1E,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AACjG,OAAO,EAAE,wBAAwB,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAA;AAiClF;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,OAA6B;IAChE,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,MAAM,CAAC,qBAAqB,CAAC,OAAO,CAAC,MAAM,CAAC,CAAA;IAC1E,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;IAErG,MAAM,QAAQ,GAAG,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAA;IAEzG,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,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC;SAC9B,QAAQ,EAAE;SACV,EAAE,CAAC,CAAC,CAAC,CAAE,CAAA;IAET,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,aAAa,EAAE,CAAA;AACnD,CAAC"}
@@ -3,116 +3,110 @@
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
5
  *
6
- * Build `soil.db` — the sealed polygon layer, from the survey areas NRCS publishes.
6
+ * Builds the sealed `soil.db` polygon layer from NRCS soil survey areas.
7
7
  *
8
- * THE ACCUMULATION IS IN SQL, NOT IN A MAP. Classification is per delineation and shared with the
9
- * resolution measurement, but where the touches GO differs on purpose: the measuring instrument holds
10
- * them in memory because it is comparing candidate resolutions in one pass, and the builder streams them
11
- * into a temporary table because memory has to stay flat in row count. A polygon layer's touches
12
- * outnumber its features, and Iowa is 99 survey areas.
13
- *
14
- * ABSENCE IS NO ROW, IN EVERY TABLE. Land outside a published survey area gets no `layer_coverage` row and
15
- * no summary row — never a zero, never an empty histogram. Inside a published area the coverage row says
16
- * `designated` at completeness 1.0, because NRCS declares its own mapping complete for those areas at its
17
- * own scale; a coverage cell reached ONLY by `NOTCOM` and access-denied polygons gets no row either,
18
- * because the polygon exists and the soil mapping behind it does not.
19
- *
20
- * A COVERAGE ROW LICENSES ONLY THAT THE AUTHORITY MAPPED HERE. The reading is the class distribution, and
21
- * a cell that is 100% `unrated_share` is `designated`-complete and carries no capability reading
22
- * whatsoever. That pairing is not a corner case: 17.1% of national components carry no capability rating,
23
- * and for the irrigated rating the figure is 85.1%.
24
- *
25
- * THE AREA CROSS-CHECK USES THE AUTHORITY'S OWN PUBLISHED FIGURE. `legend.areaacres` is what NRCS states
26
- * the survey area covers — 378,800 acres for `IA153`, which is 1,532.9 km² against the 1,532.5 km² an
27
- * independent projected measurement of the same shapefile reports. Comparing the spherical ring sum
28
- * against it catches a hole read as an exterior ring, whose absence is silent: such a polygon is
29
- * well-formed and simply answers "inside" for ground the authority did not map.
8
+ * The builder streams cell touches into a temporary SQL table so that memory stays flat as the row
9
+ * count grows. Absent data has no row in any table. Land outside a survey area and coverage cells that
10
+ * only `notcom` or access-denied polygons reach, get no coverage row.
30
11
  */
31
12
  import { type AreaAgreementReading } from "@mailwoman/core/layers";
32
13
  import { type ParsedGeometry } from "@mailwoman/spatial";
14
+ import type { PathBuilderLike } from "path-ts";
15
+ import type { SoilFeatureSource } from "#sdk/ingest";
33
16
  import type { SoilChunkResult } from "#sdk/ingest/chunk";
34
- import type { SoilFeatureSource } from "#sdk/ingest/index";
35
17
  import type { SurveyAreaAttributes } from "#sdk/survey-area";
36
18
  /**
37
- * Schema version of the domain tables. Bumped when a column changes meaning, never for an added column a reader can
38
- * ignore.
19
+ * The schema version of the domain tables.
20
+ *
21
+ * It changes when a column changes meaning.
22
+ * An added column that readers can ignore does not change it.
39
23
  */
40
24
  export declare const SOIL_SCHEMA_VERSION = 1;
41
25
  /**
42
- * Delineation ids per chunk process.
26
+ * The number of delineation ids per chunk process.
43
27
  *
44
- * Sized against the ceiling the flood layer measured rather than guessed: single-process runs over that product died
45
- * after roughly 510,000 and 798,000 features as h3's WASM heap fragmented. 100,000 leaves five times that margin, and
46
- * the cost of a smaller number is one interpreter start per chunk. Iowa's largest survey area holds well under it, so
47
- * on this build the bound costs one process per area — which is what makes an area's failure nameable.
28
+ * A single process over a large polygon layer fails after several hundred thousand
29
+ * features because the h3 wasm heap fragments.
30
+ * This size stays well below that limit.
48
31
  */
49
32
  export declare const DEFAULT_CHUNK_SIZE = 100000;
50
33
  /**
51
- * One survey area, ready to build: where its geometry is, and what its tabular export said.
34
+ * One survey area ready to build, with its geometry and tabular attributes.
52
35
  */
53
36
  export interface SurveyAreaInput {
54
37
  attributes: SurveyAreaAttributes;
55
38
  /**
56
- * The map-unit polygon shapefile.
39
+ * The path of the map-unit polygon shapefile.
57
40
  */
58
41
  shapefilePath?: string;
59
42
  /**
60
- * The survey area's own outline, already read.
43
+ * The survey area's outline.
61
44
  */
62
45
  outline: ParsedGeometry;
63
46
  /**
64
- * An in-process feature source. Correct for a fixture and for anything small; the batched path builds one of these
65
- * per chunk, so the two share one implementation.
47
+ * An in-process feature source, used by fixtures.
48
+ *
49
+ * The batched path builds one of these per chunk, so both paths share one implementation.
66
50
  */
67
51
  source?: SoilFeatureSource;
68
52
  /**
69
- * The delineation count the shapefile declares, when the caller has already read it.
53
+ * The delineation count that the shapefile declares, when the caller has already read it.
70
54
  */
71
55
  declaredFeatureCount?: number;
72
56
  }
57
+ /**
58
+ * Options for {@link buildSoilDatabase}.
59
+ */
73
60
  export interface BuildSoilOptions {
74
61
  /**
75
- * The survey areas to build, in the order they should be ingested.
62
+ * The survey areas to build, in ingest order.
76
63
  */
77
64
  areas: ReadonlyArray<SurveyAreaInput>;
78
65
  /**
79
- * The region the layer name carries — the pilot's is `ia`.
66
+ * The region code in the layer name, such as `ia`.
80
67
  */
81
68
  region: string;
82
69
  /**
83
- * Where the sealed artifact lands. The build writes beside it and swaps.
70
+ * The path of the sealed artifact.
71
+ *
72
+ * The build writes a temporary file beside it and then swaps it in.
84
73
  */
85
- out: string;
74
+ out: PathBuilderLike;
86
75
  /**
87
- * The refresh the build ingested — `layer_manifest.version` and `source_vintage`.
76
+ * The survey refresh date, written to `layer_manifest.version` and `source_vintage`.
88
77
  */
89
78
  sourceVintage: string;
90
79
  buildCmd: string;
91
80
  buildSHA: string;
92
81
  /**
93
- * ISO-8601, supplied by the caller. Never generated here: the contract says so, and a library-generated timestamp
94
- * makes two builds of the same inputs differ.
82
+ * The ISO-8601 creation time, supplied by the caller so that two builds of the same inputs are identical.
95
83
  */
96
84
  createdAt: string;
97
85
  /**
98
- * The resolution the cell index and the reduction are built at — chosen from the measurement.
86
+ * The H3 resolution of the cell index and the reduction.
99
87
  */
100
88
  indexResolution: number;
101
89
  /**
102
- * The resolution `layer_coverage` rows are keyed at. Must be coarser than the index resolution.
90
+ * The H3 resolution of the `layer_coverage` rows.
91
+ * It must be coarser than the index resolution.
103
92
  */
104
93
  coverageResolution: number;
105
94
  /**
106
- * Delineation ids per chunk process. See {@link DEFAULT_CHUNK_SIZE}.
95
+ * The number of delineation ids per chunk process.
96
+ * See {@link DEFAULT_CHUNK_SIZE}.
107
97
  */
108
98
  chunkSize?: number;
109
99
  /**
110
- * Run the ingest IN THIS PROCESS rather than spawning chunk children. Only for fixtures, which carry no shapefile for
111
- * a child to open.
100
+ * Whether to run the ingest in this process instead of in chunk processes.
101
+ *
102
+ * Only fixtures use it, because they have no shapefile for a child process to open.
112
103
  */
113
104
  inProcess?: boolean;
114
105
  onProgress?: (message: string) => void;
115
106
  }
107
+ /**
108
+ * The counts and measurements that {@link buildSoilDatabase} reports.
109
+ */
116
110
  export interface BuildSoilResult {
117
111
  out: string;
118
112
  region: string;
@@ -125,28 +119,30 @@ export interface BuildSoilResult {
125
119
  wholeCellRows: number;
126
120
  partialCellRows: number;
127
121
  /**
128
- * `partialCellRows / (wholeCellRows + partialCellRows)` over the STORED index rows. The whole side is compacted, so
129
- * this is not the same number the resolution was chosen on and is reported separately.
122
+ * The value of `partialCellRows / (wholeCellRows + partialCellRows)` over the stored index rows.
123
+ *
124
+ * Whole cells are compacted, so this differs from the partial share used to choose the resolution.
130
125
  */
131
126
  storedPartialShare: number;
132
127
  capabilityCells: number;
133
128
  /**
134
- * Cells the lattice was used for, rather than the whole-cell fast path.
129
+ * The number of cells reduced with the sampling lattice instead of the whole-cell fast path.
135
130
  */
136
131
  sampledCells: number;
137
132
  /**
138
- * Cells whose top class covers less than half the cell — the §4.7 number, taken off the shipping artifact rather than
139
- * out of a separate harness.
133
+ * The number of cells whose top class covers less than half the cell.
140
134
  */
141
135
  topClassUnderHalfCells: number;
142
136
  topClassUnderHalfShare: number;
143
137
  /**
144
- * Cells with NO class at all: the survey mapped them and rated nothing there.
138
+ * The number of cells that the survey mapped but did not rate.
145
139
  */
146
140
  classlessCells: number;
147
141
  /**
148
- * Cells the index touched that no lattice point landed inside. Dropped rather than stored as an all-zero
149
- * distribution, and counted because a large number would mean the lattice is too coarse for this geometry.
142
+ * The number of indexed cells that no lattice point landed in.
143
+ *
144
+ * These cells are dropped.
145
+ * A large count means the lattice is too coarse for the geometry.
150
146
  */
151
147
  unsampledCells: number;
152
148
  meanDelineationsPerCell: number;
@@ -154,28 +150,30 @@ export interface BuildSoilResult {
154
150
  storedResolutions: number[];
155
151
  coverageCells: number;
156
152
  /**
157
- * Coverage cells inside a survey-area outline that no delineation with soil mapping reached. Reported rather than
158
- * smoothed over: SSURGO is wall-to-wall inside a published area, so a large number means the outline and the
159
- * delineations disagree.
153
+ * The number of coverage cells inside a survey-area outline that no mapped delineation reached.
154
+ *
155
+ * SSURGO covers every part of a published area, so a large count means the outline
156
+ * and the delineations disagree.
160
157
  */
161
158
  coverageCellsWithoutMapping: number;
162
159
  /**
163
- * The area readings in square kilometres against the authority's own published figure, with the witness stated. The
164
- * `known` count of areas that publish an acreage is what a receipt reads the absence against.
160
+ * The ring-area totals in square kilometers, compared with the published acreage.
161
+ *
162
+ * Its `known` count is the number of survey areas that publish an acreage.
165
163
  */
166
164
  area: AreaAgreementReading;
167
165
  sizeBytes: number;
168
166
  }
169
167
  /**
170
- * Build the layer.
168
+ * Builds the soil layer.
171
169
  *
172
- * @throws {Error} On a delineation the classifier refuses, a streamed count that disagrees with the shapefile's own
173
- * declaration, an area total that disagrees with the authority's published acreage, or a set of outlines that yields
174
- * no interior coverage cell at all.
170
+ * @throws {Error} When the classifier rejects a delineation, when a streamed count
171
+ * differs from the shapefile's declared count, when the area total differs from the
172
+ * published acreage, or when the outlines contain no interior coverage cell.
175
173
  */
176
174
  export declare function buildSoilDatabase(options: BuildSoilOptions): Promise<BuildSoilResult>;
177
175
  /**
178
- * What the whole ingest produced, however many processes it took.
176
+ * The combined result of every ingest chunk.
179
177
  */
180
178
  interface StreamResult {
181
179
  delineations: number;
@@ -187,10 +185,9 @@ interface StreamResult {
187
185
  allExteriorM2: number;
188
186
  }
189
187
  /**
190
- * Add up what the chunks reported.
188
+ * Sums the results of the ingest chunks.
191
189
  *
192
- * Exported for its own test: the coverage-cell arithmetic is the one part of the batched path a fixture build cannot
193
- * reach, and getting it wrong produces a well-formed artifact that under-reports how many delineations a cell holds.
190
+ * It is exported for a unit test because fixture builds do not exercise the batched path.
194
191
  */
195
192
  export declare function aggregateChunks(chunks: ReadonlyArray<SoilChunkResult>): StreamResult;
196
193
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"build-soil.d.ts","sourceRoot":"","sources":["../../lib/sdk/build-soil.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAGH,OAAO,EAQN,KAAK,oBAAoB,EAEzB,MAAM,wBAAwB,CAAA;AAG/B,OAAO,EAMN,KAAK,cAAc,EACnB,MAAM,oBAAoB,CAAA;AAO3B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAExD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAE1D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAA;AAU5D;;;GAGG;AACH,eAAO,MAAM,mBAAmB,IAAI,CAAA;AAEpC;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,SAAU,CAAA;AAkBzC;;GAEG;AACH,MAAM,WAAW,eAAe;IAC/B,UAAU,EAAE,oBAAoB,CAAA;IAChC;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB;;OAEG;IACH,OAAO,EAAE,cAAc,CAAA;IACvB;;;OAGG;IACH,MAAM,CAAC,EAAE,iBAAiB,CAAA;IAC1B;;OAEG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAA;CAC7B;AAED,MAAM,WAAW,gBAAgB;IAChC;;OAEG;IACH,KAAK,EAAE,aAAa,CAAC,eAAe,CAAC,CAAA;IACrC;;OAEG;IACH,MAAM,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