@mailwoman/zoning 9.4.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.
- package/README.md +169 -163
- package/lib/index.ts +89 -120
- package/lib/paths.ts +24 -0
- package/lib/ring-roles.ts +30 -71
- package/lib/rings.ts +2 -13
- package/lib/schema.ts +96 -114
- package/lib/vocabulary.ts +52 -130
- package/out/index.d.ts +75 -95
- package/out/index.d.ts.map +1 -1
- package/out/index.js +25 -82
- 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/ring-roles.d.ts +16 -50
- package/out/ring-roles.d.ts.map +1 -1
- package/out/ring-roles.js +18 -51
- package/out/ring-roles.js.map +1 -1
- package/out/rings.d.ts +2 -13
- package/out/rings.d.ts.map +1 -1
- package/out/rings.js +2 -13
- package/out/rings.js.map +1 -1
- package/out/schema.d.ts +93 -108
- package/out/schema.d.ts.map +1 -1
- package/out/schema.js +16 -44
- package/out/schema.js.map +1 -1
- package/out/sdk/build-zoning.d.ts +58 -111
- package/out/sdk/build-zoning.d.ts.map +1 -1
- package/out/sdk/build-zoning.js +48 -137
- package/out/sdk/build-zoning.js.map +1 -1
- package/out/sdk/cells.d.ts +20 -61
- package/out/sdk/cells.d.ts.map +1 -1
- package/out/sdk/cells.js +13 -50
- package/out/sdk/cells.js.map +1 -1
- package/out/sdk/client.d.ts +23 -67
- package/out/sdk/client.d.ts.map +1 -1
- package/out/sdk/client.js +29 -77
- package/out/sdk/client.js.map +1 -1
- package/out/sdk/download.d.ts +7 -27
- package/out/sdk/download.d.ts.map +1 -1
- package/out/sdk/download.js +7 -27
- package/out/sdk/download.js.map +1 -1
- package/out/sdk/ingest/chunk.d.ts +106 -0
- package/out/sdk/ingest/chunk.d.ts.map +1 -0
- package/out/sdk/{ingest-chunk.js → ingest/chunk.js} +17 -50
- package/out/sdk/ingest/chunk.js.map +1 -0
- 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} +5 -7
- package/out/sdk/ingest/worker.js.map +1 -0
- package/out/sdk/ingest.d.ts +54 -77
- package/out/sdk/ingest.d.ts.map +1 -1
- package/out/sdk/ingest.js +50 -87
- package/out/sdk/ingest.js.map +1 -1
- package/out/sdk/measure-resolutions.d.ts +6 -23
- package/out/sdk/measure-resolutions.d.ts.map +1 -1
- package/out/sdk/measure-resolutions.js +4 -21
- package/out/sdk/measure-resolutions.js.map +1 -1
- package/out/sdk/test-kit.d.ts +75 -0
- package/out/sdk/test-kit.d.ts.map +1 -0
- package/out/{test-kit.js → sdk/test-kit.js} +20 -43
- package/out/sdk/test-kit.js.map +1 -0
- package/out/sdk/verify.d.ts +74 -56
- package/out/sdk/verify.d.ts.map +1 -1
- package/out/sdk/verify.js +70 -57
- package/out/sdk/verify.js.map +1 -1
- package/out/vocabulary.d.ts +52 -120
- package/out/vocabulary.d.ts.map +1 -1
- package/out/vocabulary.js +47 -125
- package/out/vocabulary.js.map +1 -1
- package/package.json +37 -161
- package/{lib/sdk → sdk}/build-zoning.ts +100 -186
- package/{lib/sdk → sdk}/cells.ts +24 -63
- package/{lib/sdk → sdk}/client.ts +34 -82
- package/sdk/download.ts +58 -0
- package/{lib/sdk/ingest-chunk.ts → sdk/ingest/chunk.ts} +32 -61
- package/{lib/scripts/ingest-chunk.ts → sdk/ingest/worker.ts} +4 -6
- package/sdk/ingest.ts +366 -0
- package/{lib/sdk → sdk}/measure-resolutions.ts +8 -25
- package/{lib → sdk}/test-kit.ts +20 -43
- package/{lib/sdk → sdk}/verify.ts +102 -75
- package/lib/sdk/download.ts +0 -78
- package/lib/sdk/index.ts +0 -15
- package/lib/sdk/ingest.ts +0 -398
- 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 -15
- package/out/sdk/index.d.ts.map +0 -1
- package/out/sdk/index.js +0 -15
- package/out/sdk/index.js.map +0 -1
- package/out/sdk/ingest-chunk.d.ts +0 -130
- package/out/sdk/ingest-chunk.d.ts.map +0 -1
- package/out/sdk/ingest-chunk.js.map +0 -1
- package/out/test-kit.d.ts +0 -96
- package/out/test-kit.d.ts.map +0 -1
- package/out/test-kit.js.map +0 -1
package/out/sdk/build-zoning.js
CHANGED
|
@@ -3,51 +3,22 @@
|
|
|
3
3
|
* @license AGPL-3.0
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* THE COVERAGE IS `source_present` AND THE TIER IS `build-local`, AND THE TWO ARE INDEPENDENT REFUSALS.
|
|
9
|
-
* The coverage basis is about what the source can support: the Department publishes its coverage detail only
|
|
10
|
-
* inside a map viewer, so an absent zoning polygon is one of at least four different things and
|
|
11
|
-
* {@linkcode assertNoNegativeClaim} refuses anything stronger before a row is written. The tier is about
|
|
12
|
-
* what the LICENCE supports: three published statements disagree about the grant, so
|
|
13
|
-
* {@linkcode assertTierMatchesLicense} refuses a `shipped` build. Resolving either one does not resolve the
|
|
14
|
-
* other.
|
|
15
|
-
*
|
|
16
|
-
* THE AREA CHECK IS THE HOLE CHECK AND THE ONE THING HERE THAT IS EXACT. The service encodes hole
|
|
17
|
-
* roles by ring orientation, and reading them wrong is silent — a hole read as an exterior produces a
|
|
18
|
-
* well-formed polygon that answers "inside" for every location the plan carved out. Measured over the whole
|
|
19
|
-
* national export: the rings read WITH their holes total 5,444.5 km² and the Department's own `Shape__Area`
|
|
20
|
-
* sums to 5,444.5 km²; the same rings read WITHOUT their holes total 5,666.6 km². The publisher's figure has
|
|
21
|
-
* to come from the live service, because the bulk export drops the column — which is what makes this a
|
|
22
|
-
* two-path check rather than the archive agreeing with itself.
|
|
23
|
-
*
|
|
24
|
-
* THERE IS NO BUILD-TIME TOUCH TABLE. A zoning cell row names ONE POLYGON, so it is final the moment that
|
|
25
|
-
* polygon is classified. The rows go straight in, and memory stays flat in row count with nothing to resolve
|
|
26
|
-
* afterwards.
|
|
27
|
-
*
|
|
28
|
-
* THE INGEST IS BOUNDED ANYWAY. h3's WASM heap cannot be reset from JavaScript and does not survive an
|
|
29
|
-
* unbounded number of polyfill calls; a sibling product died twice on that, after roughly 510,000 and
|
|
30
|
-
* 798,000 features. This product holds 85,330, so the whole country fits inside the 100,000-id default with
|
|
31
|
-
* room to spare — and the bound still ships, because a build that stays inside a ceiling by luck is not the
|
|
32
|
-
* same fact as one that cannot cross it.
|
|
33
|
-
*
|
|
34
|
-
* THE JURISDICTION, PLAN AND VOCABULARY ROWS ARE WRITTEN BY THE PARENT, once, from the merged chunk
|
|
35
|
-
* reports. They are the only tables whose rows are partials across chunks — an authority and a plan appear
|
|
36
|
-
* in every chunk that touches them — and merging them in the parent is what keeps the chunk append-only.
|
|
6
|
+
* Build `zoning-ireland.db`, the sealed two-tier polygon layer. Its coverage basis and license tier can each refuse publication.
|
|
37
7
|
*/
|
|
38
8
|
import { readFileSize } from "@mailwoman/core/fs/readers";
|
|
39
|
-
import {
|
|
9
|
+
import { stringifyJSON } from "@mailwoman/core/json";
|
|
10
|
+
import { areaAgreementFrom, assertNoNegativeClaim as assertCoverageNoNegativeClaim, assertTierMatchesLicense, createLayerCoverageTable, createLayerManifestTable, LayerTier, polygonLayerManifest, sourcePresentCoverageCells, writeLayerCoverage, writeLayerManifest, } from "@mailwoman/core/layers";
|
|
40
11
|
import { resolveModulePath } from "@mailwoman/core/module/resolvers";
|
|
41
12
|
import { ingestChunkArguments, mergeCountsInto, runChunkProcess } from "@mailwoman/core/utils";
|
|
42
13
|
import { CoverageBasis } from "@mailwoman/evidence";
|
|
43
14
|
import { M2_PER_KM2 } from "@mailwoman/spatial";
|
|
44
|
-
import { buildSealedArtifact } from "@mailwoman/sqlite/sealed
|
|
15
|
+
import { buildSealedArtifact } from "@mailwoman/sqlite/sealed/build";
|
|
45
16
|
import { createZoningTables } from "#schema";
|
|
46
|
-
import { ingestZoningChunk } from "#sdk/ingest
|
|
47
|
-
import {
|
|
17
|
+
import { ingestZoningChunk } from "#sdk/ingest/chunk";
|
|
18
|
+
import { GZT_ATTRIBUTION, GZT_COVERAGE_LIMIT, GZT_CROSSWALK_SCHEME, GZT_DECLARED_CODES, GZT_DECLARED_CODE_SET, GZT_ITEM_ID, GZT_LAYER_NAME, GZT_LICENSE, GZT_LICENSE_CONTRADICTION, GZT_PLAN_LEVELS, } from "#vocabulary";
|
|
48
19
|
/**
|
|
49
|
-
* Schema version of the domain tables
|
|
50
|
-
* ignore.
|
|
20
|
+
* Schema version of the domain tables, bumped when a column changes meaning
|
|
21
|
+
* rather than for an added column a reader can ignore.
|
|
51
22
|
*/
|
|
52
23
|
export const ZONING_SCHEMA_VERSION = 1;
|
|
53
24
|
/**
|
|
@@ -55,42 +26,27 @@ export const ZONING_SCHEMA_VERSION = 1;
|
|
|
55
26
|
*/
|
|
56
27
|
export const PLAN_LEVEL_SCHEME = "IE-PLAN-LEVEL";
|
|
57
28
|
/**
|
|
58
|
-
* Feature ids per chunk process
|
|
59
|
-
*
|
|
60
|
-
* Sized against the measured ceiling on a sibling product rather than guessed: single-process runs over that layer died
|
|
61
|
-
* after roughly 510,000 and 798,000 features as h3's WASM heap fragmented. This product holds 85,330 features, so this
|
|
62
|
-
* default puts the whole country in one process — and it is the ceiling that makes the build reproducible rather than
|
|
63
|
-
* the fact that this product happens to sit below it.
|
|
64
|
-
*
|
|
65
|
-
* A SMALLER CHUNK COSTS A FULL PASS EACH. The source is one 247 MB GeoJSON document rather than an indexed store, so
|
|
66
|
-
* ogr2ogr scans all of it per range: measured at 13.2 s per pass on this lab.
|
|
29
|
+
* Feature ids per chunk process, bounded at 100,000 because h3's wasm heap cannot be
|
|
30
|
+
* reset from JavaScript and does not survive an unbounded number of polyfill calls.
|
|
67
31
|
*/
|
|
68
32
|
export const DEFAULT_CHUNK_SIZE = 100_000;
|
|
69
33
|
/**
|
|
70
|
-
* The relative gap between the two area readings that fails the build
|
|
71
|
-
*
|
|
72
|
-
* The comparison is a SPHERICAL ring area against the publisher's PLANAR figure in Irish Transverse Mercator, so the
|
|
73
|
-
* two never agree exactly: ITM's scale factor runs 0.99982 at its central meridian and above 1 towards the edges of the
|
|
74
|
-
* island, which contributes a few tenths of a percent to an area, and the spherical approximation contributes a similar
|
|
75
|
-
* amount against the ellipsoid. Measured on the largest feature in the country: 2,223.1 km² spherical against the
|
|
76
|
-
* Department's 2,232.1 km², 0.40% apart. One percent leaves that comfortably inside the tolerance while sitting well
|
|
77
|
-
* below the 4.1% a hole-blind read produces over the same set.
|
|
34
|
+
* The relative gap between the two area readings that fails the build,
|
|
35
|
+
* set below the 4.1% a hole-blind read produces.
|
|
78
36
|
*/
|
|
79
37
|
const AREA_TOLERANCE = 0.01;
|
|
80
|
-
/**
|
|
81
|
-
* How many non-functional crosswalk pairs the receipt names.
|
|
82
|
-
*/
|
|
83
38
|
const WORST_PAIRS_REPORTED = 8;
|
|
84
39
|
/**
|
|
85
40
|
* Build the layer.
|
|
86
41
|
*
|
|
87
|
-
* @throws {Error} On a feature that reaches no cell, a feature count that disagrees
|
|
88
|
-
*
|
|
89
|
-
*
|
|
42
|
+
* @throws {Error} On a feature that reaches no cell, a feature count that disagrees
|
|
43
|
+
* with the source's own declaration, an area total that disagrees with the publisher's,
|
|
44
|
+
* a coverage row that would license a negative claim, a crosswalk edge table written while
|
|
45
|
+
* the mapping is not a function, or a `shipped` tier asked for under an unresolved license.
|
|
90
46
|
*/
|
|
91
47
|
export async function buildZoningDatabase(options) {
|
|
92
48
|
const tier = options.tier ?? LayerTier.BuildLocal;
|
|
93
|
-
assertTierMatchesLicense(tier, GZT_LICENSE);
|
|
49
|
+
assertTierMatchesLicense({ tier, license: GZT_LICENSE }, "zoning build", `${GZT_LICENSE_CONTRADICTION} Resolve the grant in writing first, then change the tier.`);
|
|
94
50
|
if (options.coverageResolution >= options.indexResolution) {
|
|
95
51
|
throw new Error(`zoning build: the coverage resolution (${options.coverageResolution}) must be coarser than the index resolution (${options.indexResolution}) — a row's coverage cell is the PARENT of its index cell`);
|
|
96
52
|
}
|
|
@@ -124,10 +80,6 @@ export async function buildZoningDatabase(options) {
|
|
|
124
80
|
});
|
|
125
81
|
return { ...built, sizeBytes: await readFileSize(options.out) };
|
|
126
82
|
}
|
|
127
|
-
/**
|
|
128
|
-
* The post-ingest half of the build, under the second handle: the assertions over what was streamed, then every
|
|
129
|
-
* artifact table beyond the truth tables.
|
|
130
|
-
*/
|
|
131
83
|
async function buildZoningResult(kdb, options, tier, declaredFeatureCount, ingested) {
|
|
132
84
|
if (ingested.features !== declaredFeatureCount) {
|
|
133
85
|
throw new Error(`zoning build: streamed ${ingested.features} features, the source declares ${declaredFeatureCount} — a short read builds a smaller country and reports success`);
|
|
@@ -136,8 +88,7 @@ async function buildZoningResult(kdb, options, tier, declaredFeatureCount, inges
|
|
|
136
88
|
throw new Error(`zoning build: streamed ${ingested.features} features and the live service reports ${options.expectedFeatureCount} — the archive is a different vintage from the one the service is publishing`);
|
|
137
89
|
}
|
|
138
90
|
const area = assertAreaAgreement(ingested, options.expectedSourceAreaM2);
|
|
139
|
-
//
|
|
140
|
-
// happens not to be a function would be an accident; refusing to write them while it is not is a statement.
|
|
91
|
+
// The crosswalk is not a table: the build checks it rather than assuming it.
|
|
141
92
|
const nonFunctional = nonFunctionalPairs(ingested.crosswalkPairs);
|
|
142
93
|
assertCrosswalkIsNotATable(ingested.crosswalkPairs, 0);
|
|
143
94
|
options.onProgress?.(`${ingested.features.toLocaleString()} zoning polygons written · ${ingested.rings.total.toLocaleString()} rings ` +
|
|
@@ -158,14 +109,12 @@ async function buildZoningResult(kdb, options, tier, declaredFeatureCount, inges
|
|
|
158
109
|
tier,
|
|
159
110
|
}));
|
|
160
111
|
const storedResolutions = kdb.prepare("SELECT DISTINCT resolution FROM zoning_cell ORDER BY resolution").all().map((row) => row.resolution);
|
|
161
|
-
//
|
|
162
|
-
//
|
|
163
|
-
//
|
|
164
|
-
// carries the primary key in every entry, so it would roughly double the cell tier to serve a scan that is already
|
|
165
|
-
// short.
|
|
112
|
+
// Both probes this artifact serves already use primary keys, so it needs no secondary indexes.
|
|
113
|
+
// An index over a `without rowid` table would roughly double the cell tier
|
|
114
|
+
// to serve a scan that is already short.
|
|
166
115
|
const totalCellRows = ingested.wholeCellRows + ingested.partialCellRows;
|
|
167
116
|
return {
|
|
168
|
-
out: options.out,
|
|
117
|
+
out: options.out.toString(),
|
|
169
118
|
features: ingested.features,
|
|
170
119
|
jurisdictions: ingested.jurisdictions.length,
|
|
171
120
|
plans: ingested.plans.length,
|
|
@@ -194,11 +143,7 @@ async function buildZoningResult(kdb, options, tier, declaredFeatureCount, inges
|
|
|
194
143
|
};
|
|
195
144
|
}
|
|
196
145
|
/**
|
|
197
|
-
* Add up what the chunks reported.
|
|
198
|
-
*
|
|
199
|
-
* Exported for its own test: the coverage-cell arithmetic and the crosswalk-pair merge are the parts of the batched
|
|
200
|
-
* path a fixture build cannot reach, and getting either wrong produces a well-formed artifact — one that under-reports
|
|
201
|
-
* how many polygons a cell holds, or one that reports a mapping as a function because no single chunk saw it break.
|
|
146
|
+
* Add up what the chunks reported, exported for its own test.
|
|
202
147
|
*/
|
|
203
148
|
export function aggregateChunks(chunks) {
|
|
204
149
|
const observedByCoverageCell = new Map();
|
|
@@ -234,8 +179,7 @@ export function aggregateChunks(chunks) {
|
|
|
234
179
|
nestedHoles += chunk.rings.nestedHoles;
|
|
235
180
|
adjacentHoles += chunk.rings.adjacentHoles;
|
|
236
181
|
exteriorByMagnitude += chunk.rings.exteriorByMagnitude;
|
|
237
|
-
// A coverage cell straddles chunk boundaries, so
|
|
238
|
-
// would report a cell as holding only the last chunk's polygons.
|
|
182
|
+
// A coverage cell straddles chunk boundaries, so counts add rather than replace.
|
|
239
183
|
mergeCountsInto(observedByCoverageCell, chunk.observedByCoverageCell);
|
|
240
184
|
for (const [code, name] of chunk.jurisdictions) {
|
|
241
185
|
jurisdictions.set(code, name);
|
|
@@ -250,9 +194,7 @@ export function aggregateChunks(chunks) {
|
|
|
250
194
|
const existing = vocabulary.get(key);
|
|
251
195
|
vocabulary.set(key, existing ? [scheme, code, existing[2], existing[3] + rows] : [scheme, code, label, rows]);
|
|
252
196
|
}
|
|
253
|
-
//
|
|
254
|
-
// like one inside any single chunk: Cork's `Special Policy Area` takes 14 generic types across the county, and a
|
|
255
|
-
// chunk holding a prefix of its feature ids may well have seen only one of them.
|
|
197
|
+
// The pairs merge as a union, because a mapping that is not a function can look like one inside any single chunk.
|
|
256
198
|
for (const [authorityCode, localCode, codes] of chunk.crosswalkPairs) {
|
|
257
199
|
const key = `${authorityCode}\u0000${localCode}`;
|
|
258
200
|
const existing = crosswalkPairs.get(key);
|
|
@@ -291,12 +233,8 @@ export function nonFunctionalPairs(pairs) {
|
|
|
291
233
|
return pairs.filter((pair) => pair[2].length > 1);
|
|
292
234
|
}
|
|
293
235
|
/**
|
|
294
|
-
* Refuse a crosswalk
|
|
295
|
-
*
|
|
296
|
-
* An edge table asserts that a code determines a type. Measured nationally, 52 of 795 pairs take more than one — Cork
|
|
297
|
-
* County Council's `Special Policy Area` takes 14 — so an edge table built from this data would have to pick one type
|
|
298
|
-
* per pair and would be this package's invention rather than the Department's mapping. The mapping lives per polygon,
|
|
299
|
-
* on `zoning_area`, where the Department put it.
|
|
236
|
+
* Refuse a crosswalk edge table while the publisher's mapping is not a function
|
|
237
|
+
* of the (authority, code) pair.
|
|
300
238
|
*
|
|
301
239
|
* @throws {Error} When edges would be written while any pair is non-functional.
|
|
302
240
|
*/
|
|
@@ -308,21 +246,14 @@ export function assertCrosswalkIsNotATable(pairs, edgeCount) {
|
|
|
308
246
|
return;
|
|
309
247
|
const worst = broken.toSorted((left, right) => right[2].length - left[2].length)[0];
|
|
310
248
|
throw new Error(`zoning build: ${edgeCount} crosswalk edge(s) would be written while ${broken.length} of ${pairs.length} ` +
|
|
311
|
-
`(authority, local code) pairs take more than one generic type — ${worst[0]} ${
|
|
249
|
+
`(authority, local code) pairs take more than one generic type — ${worst[0]} ${stringifyJSON(worst[1])} takes ` +
|
|
312
250
|
`${worst[2].length} (${worst[2].join(", ")}). An edge table asserts that a code determines a type, and this ` +
|
|
313
251
|
"publisher assigns the type per polygon, so the table would be this build's invention rather than the authority's mapping");
|
|
314
252
|
}
|
|
315
|
-
/**
|
|
316
|
-
* Refuse an artifact whose rings do not add up to the area the publisher itself reports.
|
|
317
|
-
*
|
|
318
|
-
* The message carries the hole-blind total beside the nested one, because the gap between them is the diagnosis: a hole
|
|
319
|
-
* read as an exterior ring answers "inside" for every point in it.
|
|
320
|
-
*/
|
|
321
253
|
function assertAreaAgreement(streamed, expectedSourceAreaM2) {
|
|
322
254
|
const signedKM2 = streamed.area.signedM2 / M2_PER_KM2;
|
|
323
|
-
//
|
|
324
|
-
// build's own reading would make the receipt print "0.000% apart" for a check that never ran
|
|
325
|
-
// a reader cannot tell from a pass.
|
|
255
|
+
// The publisher's figure is absent rather than defaulted.
|
|
256
|
+
// This build's own reading would make the receipt print "0.000% apart" for a check that never ran.
|
|
326
257
|
const reading = areaAgreementFrom({ nestedM2: streamed.area.nestedM2, allExteriorM2: streamed.area.allExteriorM2 }, expectedSourceAreaM2);
|
|
327
258
|
const area = { ...reading, signedKM2 };
|
|
328
259
|
if (reading.witness === "absent" || reading.relativeGap <= AREA_TOLERANCE)
|
|
@@ -334,19 +265,16 @@ function assertAreaAgreement(streamed, expectedSourceAreaM2) {
|
|
|
334
265
|
/**
|
|
335
266
|
* Run the ingest as a sequence of bounded child processes, over ranges of the authority's own feature ids.
|
|
336
267
|
*
|
|
337
|
-
*
|
|
338
|
-
*
|
|
339
|
-
*
|
|
340
|
-
*
|
|
341
|
-
* @throws {Error} When a chunk exits non-zero, or prints no result line — a chunk that died mid-range has written a
|
|
342
|
-
* partial set of rows, and continuing would seal an artifact missing features nobody could name.
|
|
268
|
+
* @throws {Error} When a chunk exits non-zero or prints no result line.
|
|
269
|
+
* A chunk that died mid-range has written a partial set of rows.
|
|
270
|
+
* The parent must stop before sealing that partial artifact.
|
|
343
271
|
*/
|
|
344
272
|
async function runBatchedIngest(tmpPath, options, batched) {
|
|
345
273
|
const chunkSize = batched.chunkSize ?? DEFAULT_CHUNK_SIZE;
|
|
346
|
-
const script = resolveModulePath("@mailwoman/zoning/
|
|
274
|
+
const script = resolveModulePath("@mailwoman/zoning/sdk/ingest/worker");
|
|
347
275
|
const chunks = [];
|
|
348
|
-
// The upper bound is deliberately open
|
|
349
|
-
// count would drop every feature
|
|
276
|
+
// The upper bound is deliberately open because the source reports a count instead of a maximum ID.
|
|
277
|
+
// A range that stopped at the count would drop every feature after a numbering gap.
|
|
350
278
|
let from = 1;
|
|
351
279
|
for (;;) {
|
|
352
280
|
const to = from + chunkSize - 1;
|
|
@@ -371,30 +299,20 @@ async function runBatchedIngest(tmpPath, options, batched) {
|
|
|
371
299
|
/**
|
|
372
300
|
* Refuse a coverage row that would license a negative claim.
|
|
373
301
|
*
|
|
374
|
-
*
|
|
375
|
-
*
|
|
376
|
-
* `designated` or `surveyed` basis here would let an absent zoning polygon be read as a statement that no restriction
|
|
377
|
-
* applies, over most of the map. The reader checks the same thing at open time, so an artifact built by some other path
|
|
378
|
-
* cannot get past it either.
|
|
302
|
+
* No row of this layer can support that claim because the Department publishes
|
|
303
|
+
* coverage detail only in a map viewer.
|
|
379
304
|
*/
|
|
380
305
|
export function assertNoNegativeClaim(cells) {
|
|
381
306
|
assertCoverageNoNegativeClaim("zoning build", cells, GZT_COVERAGE_LIMIT);
|
|
382
307
|
}
|
|
383
|
-
/**
|
|
384
|
-
* Insert the authorities.
|
|
385
|
-
*/
|
|
386
308
|
function writeJurisdictionRows(database, jurisdictions) {
|
|
387
309
|
const insert = database.prepare("INSERT INTO zoning_jurisdiction (jurisdiction_id, name, source_code, country) VALUES (?, ?, ?, ?)");
|
|
388
310
|
for (const [code, name] of jurisdictions.toSorted((left, right) => (left[0] < right[0] ? -1 : 1))) {
|
|
389
|
-
// The id
|
|
390
|
-
//
|
|
391
|
-
// be the publisher's.
|
|
311
|
+
// The id is the publisher's own code, preserved in both columns rather than repaired in one
|
|
312
|
+
// because a repaired code is this package's spelling in a column that claims to be the publisher's.
|
|
392
313
|
insert.run(code, name, code, "IE");
|
|
393
314
|
}
|
|
394
315
|
}
|
|
395
|
-
/**
|
|
396
|
-
* Insert the plans.
|
|
397
|
-
*/
|
|
398
316
|
function writePlanRows(database, plans) {
|
|
399
317
|
const insert = database.prepare("INSERT INTO zoning_plan (plan_id, jurisdiction_id, plan_name, plan_level, valid_from, valid_to, current_plan) " +
|
|
400
318
|
"VALUES (?, ?, ?, ?, ?, ?, ?)");
|
|
@@ -403,13 +321,8 @@ function writePlanRows(database, plans) {
|
|
|
403
321
|
}
|
|
404
322
|
}
|
|
405
323
|
/**
|
|
406
|
-
* Insert the vocabulary
|
|
407
|
-
*
|
|
408
|
-
*
|
|
409
|
-
* A declared code the data never uses is kept at `observed_rows = 0`, because the domain is the publisher's statement
|
|
410
|
-
* of what a value may be rather than a census of what it is — Ireland's `SDZ` plan level is exactly that. A used code
|
|
411
|
-
* the publisher never declared is kept at `declared = 0`, because inventing a declaration would make a source-schema
|
|
412
|
-
* change indistinguishable from the publisher's own vocabulary.
|
|
324
|
+
* Insert the vocabulary, keeping every code the publisher declares at `observed_rows = 0`
|
|
325
|
+
* and every used code it never declared at `declared = 0`.
|
|
413
326
|
*/
|
|
414
327
|
function writeVocabularyRows(database, observed) {
|
|
415
328
|
const insert = database.prepare("INSERT INTO zoning_vocabulary (scheme, code, label, definition, definition_url, declared, observed_rows) " +
|
|
@@ -435,23 +348,21 @@ function writeVocabularyRows(database, observed) {
|
|
|
435
348
|
scheme,
|
|
436
349
|
code,
|
|
437
350
|
label,
|
|
438
|
-
//
|
|
439
|
-
//
|
|
440
|
-
// this column
|
|
351
|
+
// `declared` is a property of the publisher's domain rather than of the scheme,
|
|
352
|
+
// so a local authority's own codes are observed and an undeclared generic
|
|
353
|
+
// type is what this column makes visible.
|
|
441
354
|
declared: scheme === GZT_CROSSWALK_SCHEME && GZT_DECLARED_CODE_SET.has(code) ? 1 : 0,
|
|
442
355
|
observedRows,
|
|
443
356
|
});
|
|
444
357
|
}
|
|
445
358
|
const bySchema = new Map();
|
|
446
359
|
for (const row of [...rows.values()].toSorted((left, right) => left.scheme === right.scheme ? (left.code < right.code ? -1 : 1) : left.scheme < right.scheme ? -1 : 1)) {
|
|
447
|
-
// NULL
|
|
448
|
-
// which has no DNS record, and three candidate replacements on the live host answer HTTP 404 — so the definitions
|
|
449
|
-
// behind the code-to-label pairs were not retrievable and this column says so by being empty.
|
|
360
|
+
// NULL rather than a plausible URL, because the definitions behind the code-to-label pairs were not retrievable.
|
|
450
361
|
insert.run(row.scheme, row.code, row.label, null, null, row.declared, row.observedRows);
|
|
451
362
|
const census = bySchema.get(row.scheme) ?? { codes: 0, undeclared: 0, undeclaredCodes: [] };
|
|
452
363
|
census.codes++;
|
|
453
|
-
//
|
|
454
|
-
//
|
|
364
|
+
// The census counts an undeclared code only where the publisher does publish a domain
|
|
365
|
+
// to be outside of, since a local scheme is undeclared by construction.
|
|
455
366
|
if (!row.declared && row.scheme === GZT_CROSSWALK_SCHEME) {
|
|
456
367
|
census.undeclared++;
|
|
457
368
|
census.undeclaredCodes.push(row.code);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-zoning.js","sourceRoot":"","sources":["../../lib/sdk/build-zoning.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AACzD,OAAO,EACN,iBAAiB,EACjB,qBAAqB,IAAI,6BAA6B,EACtD,wBAAwB,EACxB,wBAAwB,EACxB,SAAS,EACT,oBAAoB,EACpB,0BAA0B,EAC1B,kBAA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AAA;AACxE,CAAC"}
|
package/out/sdk/cells.d.ts
CHANGED
|
@@ -3,50 +3,23 @@
|
|
|
3
3
|
* @license AGPL-3.0
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* THE CLASSIFIER ITSELF LIVES IN `@mailwoman/spatial`, re-exported below so this package's call sites and
|
|
9
|
-
* its `@mailwoman/zoning/sdk/cells` subpath keep reading the same. `classifyFeatureCells`, the per-PART
|
|
10
|
-
* zero-cell guard and the allocator-avoiding shortcuts around it are properties of h3-js rather than of
|
|
11
|
-
* this product — the layer contract's polygon-builder section states them as requirements on EVERY polygon
|
|
12
|
-
* builder — and a second copy of the zero-cell guard is a second place for it to stop guarding.
|
|
13
|
-
*
|
|
14
|
-
* WHAT THIS LAYER ADDS IS THE NUMBER THE RESOLUTION IS ACTUALLY CHOSEN FROM, AND IT IS NOT THE `partial`
|
|
15
|
-
* SHARE. The inherited size contract picks a resolution from the measured `partial` share, and for this
|
|
16
|
-
* subject that statistic carries no signal: computed over all 85,330 Irish features, the median zoning
|
|
17
|
-
* polygon is 4,497 m² against an average res-9 cell of 105,333 m², so 95.7% of them are smaller than a cell
|
|
18
|
-
* and the `partial` share is near 100% at every candidate. Two numbers do carry signal —
|
|
19
|
-
* CANDIDATES PER CELL, which is how much geometry a probe reads, and the POLYFILL-ONLY ZERO-CELL COUNT,
|
|
20
|
-
* which is how many features a centre-in-polygon index would have dropped — so both are measured here and
|
|
21
|
-
* the `partial` share is reported beside them rather than in place of them.
|
|
22
|
-
*
|
|
23
|
-
* THE ZERO-CELL COUNT IS A MEASUREMENT OF THE ALTERNATIVE, NOT OF THIS INDEX. `classifyFeatureCells` takes
|
|
24
|
-
* overlapping containment and REFUSES a feature that reaches no cell, so this index's own zero-cell count is
|
|
25
|
-
* zero by construction. What the column reports is what `polygonToCells` — the centre-in-polygon polyfill a
|
|
26
|
-
* builder reaches for first — would have returned nothing for, and every one of those would have read
|
|
27
|
-
* downstream as an absence of zoning.
|
|
6
|
+
* The cell classifier lives in `@mailwoman/spatial`, and this layer adds the candidates-per-cell and polyfill-only zero-cell measurements the resolution is chosen from.
|
|
28
7
|
*/
|
|
29
8
|
import { type FeatureCells, type MultiPolygonRings } from "@mailwoman/spatial";
|
|
30
9
|
/**
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
* The measurement that forced this layer's index to take cell-touches-polygon: at resolution 9 `polygonToCells` returns
|
|
34
|
-
* an empty set for the great majority of Irish zoning polygons, because no cell centre falls inside them. A builder
|
|
35
|
-
* indexing only the polyfill output would drop every one of them silently.
|
|
10
|
+
* Whether a center-in-polygon polyfill would return no cell for this feature,
|
|
11
|
+
* the measurement that forced the index to take cell-touches-polygon.
|
|
36
12
|
*/
|
|
37
13
|
export declare function polyfillFindsNothing(polygons: MultiPolygonRings, resolution: number): boolean;
|
|
38
14
|
/**
|
|
39
|
-
* What one resolution came out as over the whole set
|
|
15
|
+
* What one resolution came out as over the whole set, the numbers the resolution choice is made from.
|
|
40
16
|
*/
|
|
41
17
|
export interface CellIndexMeasurement {
|
|
42
18
|
resolution: number;
|
|
43
19
|
features: number;
|
|
44
|
-
/**
|
|
45
|
-
* Cells the layer reaches at all.
|
|
46
|
-
*/
|
|
47
20
|
touchedCells: number;
|
|
48
21
|
/**
|
|
49
|
-
* Cells answered by the index
|
|
22
|
+
* Cells answered by the index by itself, before compaction.
|
|
50
23
|
*/
|
|
51
24
|
wholeCells: number;
|
|
52
25
|
/**
|
|
@@ -54,7 +27,7 @@ export interface CellIndexMeasurement {
|
|
|
54
27
|
*/
|
|
55
28
|
partialCells: number;
|
|
56
29
|
/**
|
|
57
|
-
* `partialCells / touchedCells
|
|
30
|
+
* `partialCells / touchedCells`, reported rather than chosen on.
|
|
58
31
|
*/
|
|
59
32
|
partialShare: number;
|
|
60
33
|
/**
|
|
@@ -66,8 +39,8 @@ export interface CellIndexMeasurement {
|
|
|
66
39
|
*/
|
|
67
40
|
storedCellRows: number;
|
|
68
41
|
/**
|
|
69
|
-
*
|
|
70
|
-
*
|
|
42
|
+
* Polygon count per cell across all cells the layer reaches.
|
|
43
|
+
* A probe pays this cost.
|
|
71
44
|
*/
|
|
72
45
|
candidatesPerCell: {
|
|
73
46
|
mean: number;
|
|
@@ -75,13 +48,13 @@ export interface CellIndexMeasurement {
|
|
|
75
48
|
max: number;
|
|
76
49
|
};
|
|
77
50
|
/**
|
|
78
|
-
*
|
|
51
|
+
* Count of cells naming more than one polygon and their share among touched cells.
|
|
79
52
|
*/
|
|
80
53
|
multiCandidateCells: number;
|
|
81
54
|
multiCandidateShare: number;
|
|
82
55
|
/**
|
|
83
|
-
* Features a
|
|
84
|
-
* `undefined` where the measurement did not run it.
|
|
56
|
+
* Features a center-in-polygon polyfill would have returned no cell for —
|
|
57
|
+
* see {@link polyfillFindsNothing} — and `undefined` where the measurement did not run it.
|
|
85
58
|
*/
|
|
86
59
|
polyfillZeroCellFeatures?: number;
|
|
87
60
|
/**
|
|
@@ -89,47 +62,33 @@ export interface CellIndexMeasurement {
|
|
|
89
62
|
*/
|
|
90
63
|
coarsenedFeatures: number;
|
|
91
64
|
/**
|
|
92
|
-
* Features this index returned no cell for
|
|
93
|
-
*
|
|
65
|
+
* Features this index returned no cell for, always zero while `classifyFeatureCells`
|
|
66
|
+
* throws rather than returning an empty set.
|
|
94
67
|
*/
|
|
95
68
|
zeroCellFeatures: number;
|
|
96
69
|
}
|
|
97
70
|
/**
|
|
98
|
-
* Accumulate one resolution's cell index over a stream of features
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
|
-
* h3-js function over full indexes and round-tripping at every step would cost more than the strings do. The candidate
|
|
102
|
-
* counter is keyed by the 48-bit INTEGER instead: it is the larger of the two at every candidate resolution, and it is
|
|
103
|
-
* never handed back to h3.
|
|
71
|
+
* Accumulate one resolution's cell index over a stream of features, holding
|
|
72
|
+
* whole cells as short-cell strings and the candidate counter by 48-bit integer
|
|
73
|
+
* because `compactCells` is an h3-js function over full indexes.
|
|
104
74
|
*/
|
|
105
75
|
export declare class ZoningCellIndex {
|
|
106
76
|
#private;
|
|
107
77
|
readonly resolution: number;
|
|
108
78
|
constructor(resolution: number);
|
|
109
|
-
/**
|
|
110
|
-
* Fold one feature's classification in.
|
|
111
|
-
*/
|
|
112
79
|
add(cells: FeatureCells): void;
|
|
113
|
-
/**
|
|
114
|
-
* Record that a centre-in-polygon polyfill found nothing for one feature.
|
|
115
|
-
*/
|
|
116
80
|
addPolyfillProbe(foundNothing: boolean): void;
|
|
117
81
|
/**
|
|
118
82
|
* The measurement.
|
|
119
83
|
*
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
* a lower bound on the stored row count — the direction a size estimate should err in — and the build's own receipt
|
|
123
|
-
* reports the real number.
|
|
84
|
+
* Its compacted count is a lower bound on stored rows.
|
|
85
|
+
* The compaction uses the feature union rather than each feature.
|
|
124
86
|
*/
|
|
125
87
|
finish(): CellIndexMeasurement;
|
|
126
88
|
}
|
|
127
89
|
/**
|
|
128
|
-
* The measurement as markdown table
|
|
129
|
-
*
|
|
130
|
-
*
|
|
131
|
-
* THE ZERO-CELL COLUMN IS FIRST AFTER THE COUNTS, because it is the column the resolution is chosen on and the one a
|
|
132
|
-
* reader most needs to see is not zero for the alternative index.
|
|
90
|
+
* The measurement as markdown table rows, one line per element, with the zero-cell column first
|
|
91
|
+
* after the counts because it is the column the resolution is chosen on.
|
|
133
92
|
*/
|
|
134
93
|
export declare function formatResolutionRows(measurements: readonly CellIndexMeasurement[]): string[];
|
|
135
94
|
//# sourceMappingURL=cells.d.ts.map
|
package/out/sdk/cells.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cells.d.ts","sourceRoot":"","sources":["../../
|
|
1
|
+
{"version":3,"file":"cells.d.ts","sourceRoot":"","sources":["../../sdk/cells.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAGN,KAAK,YAAY,EAEjB,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