@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.
Files changed (117) hide show
  1. package/README.md +118 -116
  2. package/lib/index.ts +88 -113
  3. package/lib/paths.ts +24 -0
  4. package/lib/schema.ts +189 -134
  5. package/lib/vocabulary.ts +40 -107
  6. package/out/index.d.ts +59 -77
  7. package/out/index.d.ts.map +1 -1
  8. package/out/index.js +38 -79
  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 +183 -132
  15. package/out/schema.d.ts.map +1 -1
  16. package/out/schema.js +32 -32
  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 +67 -97
  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 +21 -40
  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 +24 -49
  35. package/out/sdk/client.d.ts.map +1 -1
  36. package/out/sdk/client.js +20 -64
  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 +15 -55
  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} +15 -14
  49. package/out/sdk/ingest/worker.js.map +1 -0
  50. package/out/sdk/ingest.d.ts +122 -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 +48 -79
  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 +35 -79
  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 +17 -53
  75. package/out/sdk/verify.d.ts.map +1 -1
  76. package/out/sdk/verify.js +27 -85
  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 +37 -191
  83. package/{lib/sdk → sdk}/acquire.ts +18 -28
  84. package/{lib/sdk → sdk}/build-soil.ts +116 -130
  85. package/{lib/sdk → sdk}/cell-tiers.ts +22 -41
  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} +14 -13
  91. package/sdk/ingest.ts +255 -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 +49 -88
  95. package/{lib/sdk → sdk}/tabular.ts +61 -52
  96. package/{lib → sdk}/test-kit.ts +19 -41
  97. package/sdk/verify.ts +313 -0
  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/lib/sdk/verify.ts +0 -369
  104. package/out/scripts/ingest-chunk.d.ts +0 -11
  105. package/out/scripts/ingest-chunk.d.ts.map +0 -1
  106. package/out/scripts/ingest-chunk.js.map +0 -1
  107. package/out/sdk/index.d.ts +0 -20
  108. package/out/sdk/index.d.ts.map +0 -1
  109. package/out/sdk/index.js +0 -20
  110. package/out/sdk/index.js.map +0 -1
  111. package/out/sdk/ingest/index.d.ts +0 -132
  112. package/out/sdk/ingest/index.d.ts.map +0 -1
  113. package/out/sdk/ingest/index.js +0 -170
  114. package/out/sdk/ingest/index.js.map +0 -1
  115. package/out/test-kit.d.ts +0 -79
  116. package/out/test-kit.d.ts.map +0 -1
  117. package/out/test-kit.js.map +0 -1
package/out/index.js CHANGED
@@ -3,42 +3,9 @@
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
5
  *
6
- * The `soil.db` reader — what the soil survey assigns at a coordinate, and on what basis.
7
- *
8
- * THREE ANSWERS, AND KEEPING THEM APART IS THE WHOLE JOB.
9
- *
10
- * 1. `designated` — the survey mapped this location and the cell's class distribution is the answer.
11
- * 2. `designated_no_rating` — the survey mapped this location and rated nothing there. A cell that is
12
- * 100% `unrated_share` or `notrateable_share` is `designated`-complete and carries no capability
13
- * reading whatsoever, and that is not a corner case: 17.1% of national components carry no capability
14
- * rating.
15
- * 3. `unknown` — no coverage row. Outside any published survey area, or inside one where the polygon
16
- * exists and the soil mapping behind it does not.
17
- *
18
- * READINGS 2 AND 3 LOOK THE SAME FROM A CLASS CODE AND ARE OPPOSITE ANSWERS FROM THE READER. A layer that
19
- * could not tell them apart would report unmapped ground as unrated ground, which is one of the four
20
- * absences this whole layer exists to keep separate.
21
- *
22
- * THE ANSWER IS A DISTRIBUTION, AND THE TOP CLASS ALWAYS ARRIVES WITH THE SHARE IT RESTS ON. NRCS's own
23
- * `muaggatt` ships `niccdcd` beside `niccdcdpct` for exactly this reason, with an observed minimum of 2%.
24
- * A caller that wants one class may take `topClass`; it cannot take it without also being handed
25
- * `topClassShare`, because a 2% plurality and an 85% majority are different claims.
26
- *
27
- * NEITHER READING IS A STATEMENT ABOUT WHETHER THE LAND CAN BE FARMED. The layer reports what the soil
28
- * survey assigns to the map unit covering a location, which is a fact about the map. NRCS states that its
29
- * data "do not eliminate the need for onsite sampling, testing, and detailed study of specific sites for
30
- * intensive uses" and are "intended for planning purposes only" — so `limits` carries the authority's own
31
- * exclusions on every answer.
32
- *
33
- * THE PROBE IS ONE PRIMARY-KEY READ. The reduction is single-resolution and one row per cell, which is
34
- * what makes it the spine key: a coordinate becomes a cell, the cell becomes a row, and the geometry tier
35
- * underneath is never touched at read time. The unsimplified rings are there for a caller that wants to
36
- * re-derive the claim, not for the probe.
37
- *
38
- * THE READER IS SYNCHRONOUS AND USES RAW PREPARED STATEMENTS, matching the resolution ladder's existing
39
- * shape. The DDL that created these tables IS Kysely — see `schema.ts`.
6
+ * Synchronous reader for `soil.db` that returns the soil survey's capability-class distribution at a coordinate.
40
7
  */
41
- import { parseJSONStrict } from "@mailwoman/core/json";
8
+ import { parseJSONStrict, stringifyJSON } from "@mailwoman/core/json";
42
9
  import { assertCoverageNotEmpty, singleManifestRow, toLayerManifest, } from "@mailwoman/core/layers";
43
10
  import { shortCellToInt } from "@mailwoman/spatial";
44
11
  import { readCoverageAt } from "@mailwoman/spatial/h3/coverage";
@@ -47,29 +14,28 @@ import { latLngToCell } from "h3-js";
47
14
  import { SOIL_LAYER_NAME_PREFIX, SSURGO_PRODUCT_LIMITS } from "#vocabulary";
48
15
  export { FarmlandScope, farmlandScope, SSURGO_PRODUCT_LIMITS } from "#vocabulary";
49
16
  /**
50
- * What the layer can say about a coordinate.
17
+ * The kinds of answer the layer gives for a coordinate, where `DesignatedNoRating`
18
+ * and `Unknown` must stay apart.
51
19
  */
52
20
  export const SoilReadingKind = {
53
21
  /**
54
- * The survey mapped this location and assigns at least one capability class here.
22
+ * The survey mapped this location and assigns at least one capability class.
55
23
  */
56
24
  Designated: "designated",
57
25
  /**
58
- * The survey mapped this location and rated nothing here — every share is an absence share.
26
+ * The survey mapped this location and assigned no rating.
27
+ * Every share is reported as an absence share.
59
28
  */
60
29
  DesignatedNoRating: "designated_no_rating",
61
30
  /**
62
- * No coverage row. Unmapped by this authority, and never a low-capability reading.
31
+ * The layer has no coverage for this location.
32
+ * This does not imply low capability.
63
33
  */
64
34
  Unknown: "unknown",
65
35
  };
66
36
  /**
67
- * Read a sealed `soil.db`.
68
- *
69
- * Everything that would make the reader answer a well-formed wrong thing is refused at CONSTRUCTION rather than at
70
- * query time: a manifest naming a different product, a coverage table with no rows, a vocabulary with no classes. Each
71
- * of those would otherwise present as a reader that simply always answers `unknown`, which on a receipt is
72
- * indistinguishable from a region the authority genuinely has not surveyed.
37
+ * Reads a sealed `soil.db`, throwing at construction on a manifest for a different product,
38
+ * an empty coverage table, an empty class vocabulary, or a missing share weighting.
73
39
  */
74
40
  export class SoilCapabilityLookup {
75
41
  identity;
@@ -96,28 +62,33 @@ export class SoilCapabilityLookup {
96
62
  this.#selectCoverage = this.#database.prepare("SELECT h3_cell, completeness, basis, observed_rows FROM layer_coverage WHERE h3_cell = ?");
97
63
  }
98
64
  /**
99
- * What the soil survey assigns at this coordinate.
65
+ * Returns what the soil survey assigns at this coordinate.
100
66
  */
101
67
  lookup(latitude, longitude) {
102
68
  const indexCell = latLngToCell(latitude, longitude, this.identity.indexResolution);
103
69
  const coverage = this.#readCoverage(indexCell);
104
- // COVERAGE QUALIFIES THE READING, and without it there is nothing to report. Unlike a polygon hit — which is a
105
- // determination at a location and needs no coverage row to be true — every answer this layer gives is a per-cell
106
- // summary, so a summary row without a coverage row would state a determination outside the authority's footprint.
70
+ // Every answer is a per-cell summary, so a cell outside the coverage table
71
+ // is unknown even if a summary row exists.
107
72
  if (!coverage) {
108
73
  return {
109
74
  kind: SoilReadingKind.Unknown,
75
+ distribution: null,
76
+ topClassDefinition: null,
77
+ surveyArea: null,
78
+ coverage: null,
110
79
  indexCellIndex: indexCell,
111
80
  limits: SSURGO_PRODUCT_LIMITS,
112
81
  };
113
82
  }
114
83
  const row = this.#selectCell.get(shortCellToInt(indexCell));
115
84
  if (!row) {
116
- // A coverage row without a summary row means the coverage cell is designated and this finer cell holds nothing —
117
- // the survey-area edge. Unknown rather than "no rating": the authority's statement covers the coverage cell, and
118
- // this location may be outside the delineations it covers.
85
+ // At a survey-area edge the coarser coverage cell is covered and this index cell
86
+ // has no delineation, so the location may be outside the survey.
119
87
  return {
120
88
  kind: SoilReadingKind.Unknown,
89
+ distribution: null,
90
+ topClassDefinition: null,
91
+ surveyArea: null,
121
92
  coverage,
122
93
  indexCellIndex: indexCell,
123
94
  limits: SSURGO_PRODUCT_LIMITS,
@@ -130,18 +101,18 @@ export class SoilCapabilityLookup {
130
101
  noDataShare: row.nodata_share,
131
102
  otherShare: row.other_share,
132
103
  mappedShare: row.mapped_share,
133
- ...(row.top_class ? { topClass: row.top_class } : {}),
134
- ...(row.top_class_share === null ? {} : { topClassShare: row.top_class_share }),
104
+ topClass: row.top_class || null,
105
+ topClassShare: row.top_class_share,
135
106
  weighting: row.weighting,
136
107
  delineations: row.delineations,
137
108
  };
138
109
  const surveyArea = this.#surveyAreaAt(latitude, longitude);
139
- const definition = row.top_class ? this.#definitions.get(row.top_class) : undefined;
110
+ const definition = (row.top_class ? this.#definitions.get(row.top_class) : null) ?? null;
140
111
  return {
141
112
  kind: row.top_class ? SoilReadingKind.Designated : SoilReadingKind.DesignatedNoRating,
142
113
  distribution,
143
- ...(definition ? { topClassDefinition: definition } : {}),
144
- ...(surveyArea ? { surveyArea } : {}),
114
+ topClassDefinition: definition || null,
115
+ surveyArea,
145
116
  coverage,
146
117
  indexCellIndex: indexCell,
147
118
  limits: SSURGO_PRODUCT_LIMITS,
@@ -150,23 +121,15 @@ export class SoilCapabilityLookup {
150
121
  [Symbol.dispose]() {
151
122
  this.#database.destroy();
152
123
  }
153
- /**
154
- * The coverage row for the index cell's parent at the coverage resolution.
155
- */
156
124
  #readCoverage(indexCell) {
157
125
  return readCoverageAt(this.#selectCoverage, indexCell, this.identity.coverageResolution);
158
126
  }
159
127
  /**
160
- * Which survey area a coordinate falls in, by the delineation bounds each area's row carries.
128
+ * Returns the first survey area whose bounding rectangle contains the coordinate.
129
+ * overlapping rectangles may give the wrong area near a corner.
161
130
  *
162
- * A rectangle rather than the outline, and that is honest about what it is: the answer names WHICH published survey
163
- * the reading came from, and two neighbouring counties' rectangles overlap at their corners. The reading itself does
164
- * not depend on it — the cell row is the answer — so a corner ambiguity costs a label rather than a determination.
165
- *
166
- * A LINEAR SCAN, WHICH THE PILOT'S 99 SURVEY AREAS MAKE FREE AND A NATIONAL BUILD WOULD NOT. It returns on the first
167
- * containing rectangle, so the pilot costs a few dozen comparisons per geocode. At the 3,380 survey areas the country
168
- * holds this wants a bounding-box index; it is left as a scan because a structure sized for a set this build does not
169
- * hold would be untested at the size it was built for.
131
+ * This affects only the `surveyArea` label.
132
+ * A spatial index would be needed to avoid the linear scan for thousands of areas.
170
133
  */
171
134
  #surveyAreaAt(latitude, longitude) {
172
135
  for (const [index, bounds] of this.#bounds.entries()) {
@@ -174,24 +137,20 @@ export class SoilCapabilityLookup {
174
137
  longitude <= bounds.maxLon &&
175
138
  latitude >= bounds.minLat &&
176
139
  latitude <= bounds.maxLat) {
177
- return this.#surveyAreaByBounds[index];
140
+ return this.#surveyAreaByBounds[index] ?? null;
178
141
  }
179
142
  }
180
- return undefined;
143
+ return null;
181
144
  }
182
145
  }
183
- /**
184
- * Read and check the layer's identity.
185
- */
186
146
  function readIdentity(database, databasePath) {
187
147
  const manifestRows = database.prepare("SELECT * FROM layer_manifest").all();
188
- // The name's SUFFIX names the region a build covers, so the reader checks the prefix rather than a whole name — which
189
- // is why it asserts its own identity instead of taking `parseManifestRows`: one authority, one product, one rating
190
- // vocabulary per artifact, over whichever survey areas were built.
148
+ // The layer name ends with the region the build covers, so the reader checks only the prefix
149
+ // rather than `parseManifestRows`, which compares whole names.
191
150
  const row = singleManifestRow(manifestRows, `soil reader: ${databasePath}`);
192
151
  const name = String(row.name);
193
152
  if (!name.startsWith(SOIL_LAYER_NAME_PREFIX)) {
194
- throw new Error(`soil reader: ${databasePath} is layer ${JSON.stringify(name)}, which is not a ${JSON.stringify(SOIL_LAYER_NAME_PREFIX)} layer — one authority, one product, one rating vocabulary per artifact`);
153
+ throw new Error(`soil reader: ${databasePath} is layer ${stringifyJSON(name)}, which is not a ${stringifyJSON(SOIL_LAYER_NAME_PREFIX)} layer — one authority, one product, one rating vocabulary per artifact`);
195
154
  }
196
155
  const manifest = toLayerManifest(row);
197
156
  const spineKeys = manifest.spineKeys;
@@ -241,7 +200,7 @@ function readIdentity(database, databasePath) {
241
200
  })),
242
201
  classCodes: [...definitions.keys()],
243
202
  weighting: { code: weighting.code, description: weighting.definition },
244
- databasePath,
203
+ databasePath: databasePath.toString(),
245
204
  },
246
205
  definitions,
247
206
  bounds: areaRows.map((area) => ({
package/out/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AACtD,OAAO,EACN,sBAAsB,EACtB,iBAAiB,EACjB,eAAe,GAGf,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EAAE,cAAc,EAAe,MAAM,oBAAoB,CAAA;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAGpC,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAA;AAE3E,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAA;AAEjF;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC9B;;OAEG;IACH,UAAU,EAAE,YAAY;IACxB;;OAEG;IACH,kBAAkB,EAAE,sBAAsB;IAC1C;;OAEG;IACH,OAAO,EAAE,SAAS;CACT,CAAA;AA2HV;;;;;;;GAOG;AACH,MAAM,OAAO,oBAAoB;IACvB,QAAQ,CAAmB;IAE3B,SAAS,CAA8B;IACvC,WAAW,CAAuC;IAClD,eAAe,CAAuC;IACtD,YAAY,CAAqB;IACjC,mBAAmB,CAAwB;IAC3C,OAAO,CAA2E;IAE3F,YAAY,OAAoC;QAC/C,IAAI,CAAC,SAAS,GAAG,IAAI,cAAc,CAAe,OAAO,CAAC,YAAY,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAA;QAE3F,IAAI,CAAC;YACJ,MAAM,QAAQ,GAAG,YAAY,CAAC,IAAI,CAAC,SAAS,EAAE,O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B,MAAM,EAAE,IAAI,CAAC,OAAO;YACpB,MAAM,EAAE,IAAI,CAAC,OAAO;YACpB,MAAM,EAAE,IAAI,CAAC,OAAO;YACpB,MAAM,EAAE,IAAI,CAAC,OAAO;SACpB,CAAC,CAAC;KACH,CAAA;AACF,CAAC"}
package/out/paths.d.ts ADDED
@@ -0,0 +1,19 @@
1
+ /**
2
+ * @copyright Sister Software
3
+ * @license AGPL-3.0
4
+ * @author Teffen Ellis, et al.
5
+ *
6
+ * Where the soil layer database and its download caches live under the data root's `db/` group.
7
+ */
8
+ import type { PathBuilder, PathBuilderLike } from "path-ts";
9
+ /**
10
+ * `<dataRoot>/db/soil`.
11
+ */
12
+ export declare function soilDatabaseRoot(dataRoot: PathBuilderLike): PathBuilder;
13
+ /**
14
+ * `$MAILWOMAN_DATA_ROOT/db/soil`, read when a path is requested.
15
+ *
16
+ * @see {@link soilDatabaseRoot} for another data root.
17
+ */
18
+ export declare const soilDatabasePath: PathBuilder;
19
+ //# sourceMappingURL=paths.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../lib/paths.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAE3D;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,eAAe,GAAG,WAAW,CAEvE;AAED;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,EAAE,WAA8C,CAAA"}
package/out/paths.js ADDED
@@ -0,0 +1,21 @@
1
+ /**
2
+ * @copyright Sister Software
3
+ * @license AGPL-3.0
4
+ * @author Teffen Ellis, et al.
5
+ *
6
+ * Where the soil layer database and its download caches live under the data root's `db/` group.
7
+ */
8
+ import { databaseRootPath, dataRootPath } from "@mailwoman/core/data-root";
9
+ /**
10
+ * `<dataRoot>/db/soil`.
11
+ */
12
+ export function soilDatabaseRoot(dataRoot) {
13
+ return databaseRootPath(dataRoot)("soil");
14
+ }
15
+ /**
16
+ * `$MAILWOMAN_DATA_ROOT/db/soil`, read when a path is requested.
17
+ *
18
+ * @see {@link soilDatabaseRoot} for another data root.
19
+ */
20
+ export const soilDatabasePath = soilDatabaseRoot(dataRootPath());
21
+ //# sourceMappingURL=paths.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paths.js","sourceRoot":"","sources":["../lib/paths.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAG1E;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,QAAyB;IACzD,OAAO,gBAAgB,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAA;AAC1C,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAgB,gBAAgB,CAAC,YAAY,EAAE,CAAC,CAAA"}