@mailwoman/zoning 10.0.0 → 10.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +169 -163
- package/lib/index.ts +103 -135
- package/lib/paths.ts +24 -0
- package/lib/ring-roles.ts +30 -71
- package/lib/rings.ts +2 -13
- package/lib/schema.ts +98 -139
- package/lib/vocabulary.ts +52 -130
- package/out/index.d.ts +81 -101
- package/out/index.d.ts.map +1 -1
- package/out/index.js +37 -96
- 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 +90 -132
- package/out/schema.d.ts.map +1 -1
- package/out/schema.js +17 -45
- 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 +50 -139
- package/out/sdk/build-zoning.js.map +1 -1
- package/out/sdk/cells.d.ts +21 -62
- package/out/sdk/cells.d.ts.map +1 -1
- package/out/sdk/cells.js +15 -52
- 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 +8 -28
- package/out/sdk/download.js.map +1 -1
- package/out/sdk/ingest/chunk.d.ts +19 -43
- package/out/sdk/ingest/chunk.d.ts.map +1 -1
- package/out/sdk/ingest/chunk.js +19 -52
- package/out/sdk/ingest/chunk.js.map +1 -1
- package/out/sdk/ingest/worker.d.ts +9 -0
- package/out/sdk/ingest/worker.d.ts.map +1 -0
- package/out/{scripts/ingest-chunk.js → sdk/ingest/worker.js} +8 -10
- package/out/sdk/ingest/worker.js.map +1 -0
- package/out/sdk/ingest.d.ts +152 -0
- package/out/sdk/ingest.d.ts.map +1 -0
- package/out/sdk/ingest.js +200 -0
- package/out/sdk/ingest.js.map +1 -0
- package/out/sdk/measure-resolutions.d.ts +7 -34
- package/out/sdk/measure-resolutions.d.ts.map +1 -1
- package/out/sdk/measure-resolutions.js +5 -23
- 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 +79 -80
- package/out/sdk/verify.d.ts.map +1 -1
- package/out/sdk/verify.js +83 -70
- 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 +38 -162
- package/{lib/sdk → sdk}/build-zoning.ts +102 -188
- package/{lib/sdk → sdk}/cells.ts +27 -66
- package/{lib/sdk → sdk}/client.ts +34 -82
- package/sdk/download.ts +58 -0
- package/{lib/sdk → sdk}/ingest/chunk.ts +36 -65
- package/{lib/scripts/ingest-chunk.ts → sdk/ingest/worker.ts} +7 -9
- package/sdk/ingest.ts +354 -0
- package/sdk/measure-resolutions.ts +72 -0
- package/{lib → sdk}/test-kit.ts +21 -44
- package/sdk/verify.ts +367 -0
- package/lib/sdk/download.ts +0 -78
- package/lib/sdk/index.ts +0 -15
- package/lib/sdk/ingest/index.ts +0 -393
- package/lib/sdk/measure-resolutions.ts +0 -101
- package/lib/sdk/verify.ts +0 -357
- 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/index.d.ts +0 -185
- package/out/sdk/ingest/index.d.ts.map +0 -1
- package/out/sdk/ingest/index.js +0 -232
- package/out/sdk/ingest/index.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/index.d.ts
CHANGED
|
@@ -3,56 +3,14 @@
|
|
|
3
3
|
* @license AGPL-3.0
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
* authority's own vocabulary, and on what basis.
|
|
8
|
-
*
|
|
9
|
-
* TWO READINGS, AND THE ONE THAT IS MISSING IS THE POINT.
|
|
10
|
-
*
|
|
11
|
-
* 1. `designated` — an adopted plan places the location inside a zoning polygon, and the polygon is the
|
|
12
|
-
* answer: the authority's own code, its own description, the plan it belongs to and that plan's stated
|
|
13
|
-
* window, with the Department's national generic type BESIDE the local code rather than instead of it.
|
|
14
|
-
* 2. `unknown` — no polygon contains the point. THAT IS NOT AN ABSENCE READING, and this layer has none.
|
|
15
|
-
*
|
|
16
|
-
* THERE IS NO `designated_absence` HERE, AND ZONING IS THE HARDEST CASE OF THE RULE. For flood zones the
|
|
17
|
-
* Environment Agency states England-wide coverage and the Planning Practice Guidance defines Zone 1 as the
|
|
18
|
-
* land outside Zones 2 and 3, so an empty answer inside England IS a designation. No such definition exists
|
|
19
|
-
* anywhere for zoning: a location with no zoning polygon is outside any adopted plan area, or inside one on
|
|
20
|
-
* land the plan does not zone, or in a jurisdiction that has never adopted zoning, or in a jurisdiction
|
|
21
|
-
* whose records nobody has published — and no product distinguishes them. The source itself proves the
|
|
22
|
-
* asymmetry: it states `UNZ - Unzoned` as a POSITIVE value on 4 of 85,330 rows, so where the authority
|
|
23
|
-
* means unzoned it says so, and every other absence is a row that is not there.
|
|
24
|
-
*
|
|
25
|
-
* SO THE CONSTRUCTOR REFUSES A COVERAGE ROW THAT WOULD SUPPORT AN EXCLUSION. Every row must read
|
|
26
|
-
* `source_present`; `supportsExclusion` must be false for all of them. That is not a convention this reader
|
|
27
|
-
* follows — it is a condition it checks at open time, so the day someone writes a stronger basis without
|
|
28
|
-
* settling the footprint question, the layer refuses to open rather than answering confidently.
|
|
29
|
-
*
|
|
30
|
-
* NEITHER READING IS A STATEMENT ABOUT WHAT MAY BE BUILT. The layer reports what a plan assigns at a
|
|
31
|
-
* location, which is a fact about the plan. The Department states that its data are "not published here as
|
|
32
|
-
* legal definitions of the current actuality with regard to Local Authority zoning or their geographic
|
|
33
|
-
* extents" and that "Original data should be sourced directly from the relevant Local Authority" — and
|
|
34
|
-
* `limits` carries the authority's own exclusions on every answer.
|
|
35
|
-
*
|
|
36
|
-
* THE PLAN IS PART OF THE CLAIM, NEVER A PARAMETER OF IT. A zone exists inside a named Development Plan or
|
|
37
|
-
* Local Area Plan with a stated validity window; a reading that dropped the plan would answer a question no
|
|
38
|
-
* authority asked. And `currentPlan = 1` means "not superseded", not "in force today": 2,363 of 85,330 rows
|
|
39
|
-
* carry a `validTo` already in the past, so the window travels on every reading and the comparison against a
|
|
40
|
-
* date is the caller's, made against a clock this reader does not own.
|
|
41
|
-
*
|
|
42
|
-
* THE PROBE IS STRUCTURE FIRST, GEOMETRY LAST. `cellToParent` up the compacted whole-cell chain answers an
|
|
43
|
-
* interior point with primary-key probes alone; only a cell a boundary crosses reaches the ray cast, and
|
|
44
|
-
* then only against the polygons `zoning_cell` already named for that cell.
|
|
45
|
-
*
|
|
46
|
-
* THE READER IS SYNCHRONOUS AND USES RAW PREPARED STATEMENTS, for the same reason the sibling layer readers
|
|
47
|
-
* are: it answers one point per geocode with a bounded number of primary-key probes plus a bounded geometry
|
|
48
|
-
* read, and the ray cast it wraps is synchronous anyway. The DDL that created these tables IS Kysely — see
|
|
49
|
-
* `schema.ts`.
|
|
6
|
+
* Synchronous reader for `zoning-ireland.db` that returns the zoning an adopted local plan assigns at a coordinate.
|
|
50
7
|
*/
|
|
51
8
|
import { type CoverageCell, type LayerManifest } from "@mailwoman/core/layers";
|
|
52
9
|
import { CoverageBasis } from "@mailwoman/evidence";
|
|
10
|
+
import type { PathBuilderLike } from "path-ts";
|
|
53
11
|
export { GZT_LAYER_NAME, ProvenanceGrade } from "#vocabulary";
|
|
54
12
|
/**
|
|
55
|
-
*
|
|
13
|
+
* The kinds of answer the layer gives for a coordinate.
|
|
56
14
|
*/
|
|
57
15
|
export declare const ZoningReadingKind: {
|
|
58
16
|
/**
|
|
@@ -60,28 +18,34 @@ export declare const ZoningReadingKind: {
|
|
|
60
18
|
*/
|
|
61
19
|
readonly Designated: "designated";
|
|
62
20
|
/**
|
|
63
|
-
* No zoning polygon contains the point
|
|
21
|
+
* No zoning polygon contains the point — this kind never means the location is unzoned.
|
|
64
22
|
*/
|
|
65
23
|
readonly Unknown: "unknown";
|
|
66
24
|
};
|
|
25
|
+
/**
|
|
26
|
+
* One of the {@link ZoningReadingKind} values.
|
|
27
|
+
*/
|
|
67
28
|
export type ZoningReadingKind = (typeof ZoningReadingKind)[keyof typeof ZoningReadingKind];
|
|
68
29
|
/**
|
|
69
|
-
* How
|
|
30
|
+
* How the lookup established containment.
|
|
70
31
|
*/
|
|
71
32
|
export declare const ZoningContainmentPath: {
|
|
72
33
|
/**
|
|
73
|
-
* The cell lies wholly inside the zone
|
|
34
|
+
* The cell lies wholly inside the zone, so no geometry was read.
|
|
74
35
|
*/
|
|
75
36
|
readonly WholeCell: "whole_cell";
|
|
76
37
|
/**
|
|
77
|
-
*
|
|
38
|
+
* A boundary crosses the cell, so the point was ray-cast against the cell's polygons.
|
|
78
39
|
*/
|
|
79
40
|
readonly RayCast: "ray_cast";
|
|
80
41
|
/**
|
|
81
|
-
* No zone reaches this cell
|
|
42
|
+
* No zone reaches this cell.
|
|
82
43
|
*/
|
|
83
44
|
readonly NoZoneCell: "no_zone_cell";
|
|
84
45
|
};
|
|
46
|
+
/**
|
|
47
|
+
* One of the {@link ZoningContainmentPath} values.
|
|
48
|
+
*/
|
|
85
49
|
export type ZoningContainmentPath = (typeof ZoningContainmentPath)[keyof typeof ZoningContainmentPath];
|
|
86
50
|
/**
|
|
87
51
|
* The authority that adopted the plan.
|
|
@@ -90,135 +54,151 @@ export interface ZoningJurisdiction {
|
|
|
90
54
|
jurisdictionID: string;
|
|
91
55
|
name: string;
|
|
92
56
|
/**
|
|
93
|
-
* The publisher's
|
|
57
|
+
* The publisher's code, verbatim.
|
|
94
58
|
*/
|
|
95
59
|
sourceCode: string;
|
|
96
60
|
country: string;
|
|
97
61
|
}
|
|
98
62
|
/**
|
|
99
|
-
* The plan a zone belongs to, with its
|
|
63
|
+
* The plan that a zone belongs to, with its stated validity window.
|
|
64
|
+
*
|
|
65
|
+
* The caller must compare the window with the current date, because a plan that is
|
|
66
|
+
* not superseded can still have a `validTo` in the past.
|
|
100
67
|
*/
|
|
101
68
|
export interface ZoningPlan {
|
|
102
69
|
planID: string;
|
|
103
70
|
name: string;
|
|
104
71
|
/**
|
|
105
|
-
* `DP` Development Plan, `LAP` Local Area Plan
|
|
72
|
+
* The plan level: `DP` for Development Plan, `LAP` for Local Area Plan
|
|
73
|
+
* or `SDZ` for Strategic Development Zone.
|
|
106
74
|
*/
|
|
107
75
|
level: string;
|
|
108
76
|
validFrom: string | null;
|
|
109
77
|
validTo: string | null;
|
|
110
78
|
/**
|
|
111
|
-
* The publisher's `CURRENT_PLAN` flag
|
|
79
|
+
* The publisher's `CURRENT_PLAN` flag as published.
|
|
80
|
+
*
|
|
81
|
+
* The value `1` means the plan is active.
|
|
82
|
+
* `validTo` determines whether it has force today.
|
|
112
83
|
*/
|
|
113
84
|
currentPlan: number;
|
|
114
85
|
}
|
|
115
86
|
/**
|
|
116
|
-
* One zoning polygon the point
|
|
87
|
+
* One zoning polygon that contains the point, as the authority publishes it.
|
|
117
88
|
*/
|
|
118
89
|
export interface ZoningDesignation {
|
|
119
90
|
areaID: string;
|
|
120
91
|
/**
|
|
121
|
-
* The authority's
|
|
92
|
+
* The authority's zone code, verbatim.
|
|
122
93
|
*/
|
|
123
94
|
localCode: string;
|
|
124
95
|
localDescription: string | null;
|
|
125
96
|
localCodeURL: string | null;
|
|
126
97
|
/**
|
|
127
|
-
* The
|
|
128
|
-
*
|
|
129
|
-
*
|
|
98
|
+
* The publisher's crosswalk from the local code into a shared scheme, when it publishes one.
|
|
99
|
+
*
|
|
100
|
+
* The crosswalk is stored per polygon because one local code can map to several
|
|
101
|
+
* generic types, so it cannot be derived from `localCode`.
|
|
130
102
|
*/
|
|
131
|
-
crosswalk
|
|
103
|
+
crosswalk: {
|
|
132
104
|
scheme: string;
|
|
133
105
|
code: string;
|
|
134
106
|
description: string | null;
|
|
135
107
|
/**
|
|
136
|
-
* A coarser code from the same authority,
|
|
108
|
+
* A coarser code from the same authority, as published.
|
|
137
109
|
*/
|
|
138
110
|
rollup: string | null;
|
|
139
111
|
/**
|
|
140
|
-
* The publisher's
|
|
141
|
-
*
|
|
112
|
+
* The publisher's label for `code` from its declared domain.
|
|
113
|
+
*
|
|
114
|
+
* It is null for a code that the publisher uses without declaring.
|
|
142
115
|
*/
|
|
143
|
-
label
|
|
116
|
+
label: string | null;
|
|
144
117
|
/**
|
|
145
|
-
*
|
|
118
|
+
* Whether the publisher declares this code in its own domain.
|
|
146
119
|
*/
|
|
147
120
|
declared: boolean;
|
|
148
|
-
};
|
|
121
|
+
} | null;
|
|
149
122
|
/**
|
|
150
|
-
* One of {@link ProvenanceGrade}.
|
|
151
|
-
*
|
|
123
|
+
* One of {@link ProvenanceGrade}.
|
|
124
|
+
*
|
|
125
|
+
* Every row of this artifact is `authoritative`.
|
|
126
|
+
* A caller must never present an `inferred` row as the authority's designation.
|
|
152
127
|
*/
|
|
153
128
|
provenanceGrade: string;
|
|
154
129
|
jurisdiction: ZoningJurisdiction;
|
|
155
130
|
plan: ZoningPlan;
|
|
156
131
|
/**
|
|
157
|
-
*
|
|
158
|
-
*
|
|
132
|
+
* Whether the authority explicitly zones this polygon as unzoned.
|
|
133
|
+
*
|
|
134
|
+
* Only this flag means unzoned.
|
|
135
|
+
* A point with no designation makes no statement about zoning.
|
|
159
136
|
*/
|
|
160
137
|
unzoned: boolean;
|
|
161
138
|
containment: ZoningContainmentPath;
|
|
162
139
|
}
|
|
163
140
|
/**
|
|
164
|
-
* One reading,
|
|
141
|
+
* One reading at a coordinate, with the provenance a caller needs to check it.
|
|
165
142
|
*/
|
|
166
143
|
export interface ZoningReading {
|
|
167
144
|
kind: ZoningReadingKind;
|
|
168
145
|
/**
|
|
169
|
-
* Every polygon
|
|
170
|
-
*
|
|
146
|
+
* Every polygon that contains the point, ordered by `area_id`.
|
|
147
|
+
*
|
|
148
|
+
* A Local Area Plan that overlays a Development Plan produces two designations for the same ground.
|
|
171
149
|
*/
|
|
172
150
|
designations: ZoningDesignation[];
|
|
173
151
|
containment: ZoningContainmentPath;
|
|
174
152
|
/**
|
|
175
|
-
* The coverage row for the location, when the product has data in that cell.
|
|
176
|
-
*
|
|
177
|
-
*
|
|
153
|
+
* The coverage row for the location, when the product has data in that cell.
|
|
154
|
+
*
|
|
155
|
+
* Its basis is always `source_present`, which only shows that the source has data nearby.
|
|
156
|
+
* Neither a present nor an absent coverage row means the location is unrestricted.
|
|
178
157
|
*/
|
|
179
|
-
coverage
|
|
158
|
+
coverage: (CoverageCell & {
|
|
180
159
|
h3CellIndex: string;
|
|
181
160
|
resolution: number;
|
|
182
|
-
};
|
|
161
|
+
}) | null;
|
|
183
162
|
/**
|
|
184
|
-
* The index cell
|
|
163
|
+
* The H3 index cell that the lookup probed.
|
|
185
164
|
*/
|
|
186
165
|
indexCellIndex: string;
|
|
187
166
|
/**
|
|
188
|
-
*
|
|
167
|
+
* The authority's own statements of what the product does not state.
|
|
189
168
|
*/
|
|
190
169
|
limits: ReadonlyArray<string>;
|
|
191
170
|
/**
|
|
192
|
-
*
|
|
171
|
+
* One sentence on why this layer's coverage supports no negative claim.
|
|
193
172
|
*/
|
|
194
173
|
coverageLimit: string;
|
|
195
174
|
}
|
|
196
175
|
/**
|
|
197
|
-
* The layer's identity, read once
|
|
176
|
+
* The layer's identity, read once when the database opens.
|
|
198
177
|
*/
|
|
199
178
|
export interface ZoningLayerIdentity {
|
|
200
179
|
manifest: LayerManifest;
|
|
201
180
|
indexResolution: number;
|
|
202
181
|
coverageResolution: number;
|
|
203
182
|
/**
|
|
204
|
-
* Every resolution `zoning_cell` stores
|
|
183
|
+
* Every resolution at which `zoning_cell` stores rows, coarsest first.
|
|
205
184
|
*
|
|
206
|
-
*
|
|
207
|
-
*
|
|
208
|
-
*
|
|
185
|
+
* A probe walks all of them because whole cells are compacted into parents.
|
|
186
|
+
* The builder indexes a polygon at a coarser resolution when the h3 allocator
|
|
187
|
+
* cannot fit it at the index resolution.
|
|
209
188
|
*/
|
|
210
189
|
cellResolutions: number[];
|
|
211
190
|
/**
|
|
212
|
-
* The jurisdictions the layer
|
|
191
|
+
* The jurisdictions in the layer, keyed by id.
|
|
213
192
|
*/
|
|
214
193
|
jurisdictions: ReadonlyMap<string, ZoningJurisdiction>;
|
|
215
194
|
/**
|
|
216
|
-
* The crosswalk scheme this layer's rows
|
|
195
|
+
* The crosswalk scheme of this layer's rows, or `null` when the publisher ships none.
|
|
217
196
|
*/
|
|
218
|
-
crosswalkScheme
|
|
197
|
+
crosswalkScheme: string | null;
|
|
219
198
|
/**
|
|
220
|
-
* The authority's footprint statements.
|
|
221
|
-
*
|
|
199
|
+
* The authority's footprint statements.
|
|
200
|
+
*
|
|
201
|
+
* This edition has none, so `source_present` is the only coverage basis allowed.
|
|
222
202
|
*/
|
|
223
203
|
mappedExtents: Array<{
|
|
224
204
|
extentID: string;
|
|
@@ -227,30 +207,30 @@ export interface ZoningLayerIdentity {
|
|
|
227
207
|
statementURL: string;
|
|
228
208
|
}>;
|
|
229
209
|
/**
|
|
230
|
-
* The coverage basis every row
|
|
231
|
-
*
|
|
210
|
+
* The coverage basis of every row.
|
|
211
|
+
* It is `source_present` while `mappedExtents` is empty.
|
|
232
212
|
*/
|
|
233
213
|
coverageBasis: CoverageBasis;
|
|
234
214
|
databasePath: string;
|
|
235
215
|
}
|
|
216
|
+
/**
|
|
217
|
+
* Options for {@link ZoningLookup}.
|
|
218
|
+
*/
|
|
236
219
|
export interface ZoningLookupOptions {
|
|
237
|
-
databasePath:
|
|
220
|
+
databasePath: PathBuilderLike;
|
|
238
221
|
}
|
|
239
222
|
/**
|
|
240
|
-
*
|
|
223
|
+
* Reads a sealed `zoning-ireland.db`.
|
|
241
224
|
*
|
|
242
|
-
*
|
|
243
|
-
*
|
|
244
|
-
* support an exclusion, an empty jurisdiction table. Each of those would otherwise present as a reader that quietly
|
|
245
|
-
* always answers `unknown` — or, in the exclusion case, as a reader that confidently reports unzoned-and-unmapped land
|
|
246
|
-
* as free of restriction.
|
|
225
|
+
* The constructor throws on a manifest for a different layer, an empty coverage table,
|
|
226
|
+
* a coverage basis that supports exclusion or an empty jurisdiction table.
|
|
247
227
|
*/
|
|
248
228
|
export declare class ZoningLookup implements Disposable {
|
|
249
229
|
#private;
|
|
250
230
|
readonly identity: ZoningLayerIdentity;
|
|
251
231
|
constructor(options: ZoningLookupOptions);
|
|
252
232
|
/**
|
|
253
|
-
*
|
|
233
|
+
* Returns what an adopted plan assigns at this coordinate.
|
|
254
234
|
*/
|
|
255
235
|
lookup(latitude: number, longitude: number): ZoningReading;
|
|
256
236
|
[Symbol.dispose](): void;
|
package/out/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"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"}
|
package/out/index.js
CHANGED
|
@@ -3,50 +3,7 @@
|
|
|
3
3
|
* @license AGPL-3.0
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
* authority's own vocabulary, and on what basis.
|
|
8
|
-
*
|
|
9
|
-
* TWO READINGS, AND THE ONE THAT IS MISSING IS THE POINT.
|
|
10
|
-
*
|
|
11
|
-
* 1. `designated` — an adopted plan places the location inside a zoning polygon, and the polygon is the
|
|
12
|
-
* answer: the authority's own code, its own description, the plan it belongs to and that plan's stated
|
|
13
|
-
* window, with the Department's national generic type BESIDE the local code rather than instead of it.
|
|
14
|
-
* 2. `unknown` — no polygon contains the point. THAT IS NOT AN ABSENCE READING, and this layer has none.
|
|
15
|
-
*
|
|
16
|
-
* THERE IS NO `designated_absence` HERE, AND ZONING IS THE HARDEST CASE OF THE RULE. For flood zones the
|
|
17
|
-
* Environment Agency states England-wide coverage and the Planning Practice Guidance defines Zone 1 as the
|
|
18
|
-
* land outside Zones 2 and 3, so an empty answer inside England IS a designation. No such definition exists
|
|
19
|
-
* anywhere for zoning: a location with no zoning polygon is outside any adopted plan area, or inside one on
|
|
20
|
-
* land the plan does not zone, or in a jurisdiction that has never adopted zoning, or in a jurisdiction
|
|
21
|
-
* whose records nobody has published — and no product distinguishes them. The source itself proves the
|
|
22
|
-
* asymmetry: it states `UNZ - Unzoned` as a POSITIVE value on 4 of 85,330 rows, so where the authority
|
|
23
|
-
* means unzoned it says so, and every other absence is a row that is not there.
|
|
24
|
-
*
|
|
25
|
-
* SO THE CONSTRUCTOR REFUSES A COVERAGE ROW THAT WOULD SUPPORT AN EXCLUSION. Every row must read
|
|
26
|
-
* `source_present`; `supportsExclusion` must be false for all of them. That is not a convention this reader
|
|
27
|
-
* follows — it is a condition it checks at open time, so the day someone writes a stronger basis without
|
|
28
|
-
* settling the footprint question, the layer refuses to open rather than answering confidently.
|
|
29
|
-
*
|
|
30
|
-
* NEITHER READING IS A STATEMENT ABOUT WHAT MAY BE BUILT. The layer reports what a plan assigns at a
|
|
31
|
-
* location, which is a fact about the plan. The Department states that its data are "not published here as
|
|
32
|
-
* legal definitions of the current actuality with regard to Local Authority zoning or their geographic
|
|
33
|
-
* extents" and that "Original data should be sourced directly from the relevant Local Authority" — and
|
|
34
|
-
* `limits` carries the authority's own exclusions on every answer.
|
|
35
|
-
*
|
|
36
|
-
* THE PLAN IS PART OF THE CLAIM, NEVER A PARAMETER OF IT. A zone exists inside a named Development Plan or
|
|
37
|
-
* Local Area Plan with a stated validity window; a reading that dropped the plan would answer a question no
|
|
38
|
-
* authority asked. And `currentPlan = 1` means "not superseded", not "in force today": 2,363 of 85,330 rows
|
|
39
|
-
* carry a `validTo` already in the past, so the window travels on every reading and the comparison against a
|
|
40
|
-
* date is the caller's, made against a clock this reader does not own.
|
|
41
|
-
*
|
|
42
|
-
* THE PROBE IS STRUCTURE FIRST, GEOMETRY LAST. `cellToParent` up the compacted whole-cell chain answers an
|
|
43
|
-
* interior point with primary-key probes alone; only a cell a boundary crosses reaches the ray cast, and
|
|
44
|
-
* then only against the polygons `zoning_cell` already named for that cell.
|
|
45
|
-
*
|
|
46
|
-
* THE READER IS SYNCHRONOUS AND USES RAW PREPARED STATEMENTS, for the same reason the sibling layer readers
|
|
47
|
-
* are: it answers one point per geocode with a bounded number of primary-key probes plus a bounded geometry
|
|
48
|
-
* read, and the ray cast it wraps is synchronous anyway. The DDL that created these tables IS Kysely — see
|
|
49
|
-
* `schema.ts`.
|
|
6
|
+
* Synchronous reader for `zoning-ireland.db` that returns the zoning an adopted local plan assigns at a coordinate.
|
|
50
7
|
*/
|
|
51
8
|
import { assertCoverageLicensesNoExclusion, assertNoCellsFinerThanIndex, parseManifestRows, } from "@mailwoman/core/layers";
|
|
52
9
|
import { CoverageBasis } from "@mailwoman/evidence";
|
|
@@ -58,7 +15,7 @@ import { ZoningCellContainment } from "#schema";
|
|
|
58
15
|
import { GZT_COVERAGE_LIMIT, GZT_CROSSWALK_SCHEME, GZT_LAYER_NAME, GZT_PRODUCT_LIMITS, GZT_UNZONED_LOCAL_CODE, } from "#vocabulary";
|
|
59
16
|
export { GZT_LAYER_NAME, ProvenanceGrade } from "#vocabulary";
|
|
60
17
|
/**
|
|
61
|
-
*
|
|
18
|
+
* The kinds of answer the layer gives for a coordinate.
|
|
62
19
|
*/
|
|
63
20
|
export const ZoningReadingKind = {
|
|
64
21
|
/**
|
|
@@ -66,35 +23,32 @@ export const ZoningReadingKind = {
|
|
|
66
23
|
*/
|
|
67
24
|
Designated: "designated",
|
|
68
25
|
/**
|
|
69
|
-
* No zoning polygon contains the point
|
|
26
|
+
* No zoning polygon contains the point — this kind never means the location is unzoned.
|
|
70
27
|
*/
|
|
71
28
|
Unknown: "unknown",
|
|
72
29
|
};
|
|
73
30
|
/**
|
|
74
|
-
* How
|
|
31
|
+
* How the lookup established containment.
|
|
75
32
|
*/
|
|
76
33
|
export const ZoningContainmentPath = {
|
|
77
34
|
/**
|
|
78
|
-
* The cell lies wholly inside the zone
|
|
35
|
+
* The cell lies wholly inside the zone, so no geometry was read.
|
|
79
36
|
*/
|
|
80
37
|
WholeCell: "whole_cell",
|
|
81
38
|
/**
|
|
82
|
-
*
|
|
39
|
+
* A boundary crosses the cell, so the point was ray-cast against the cell's polygons.
|
|
83
40
|
*/
|
|
84
41
|
RayCast: "ray_cast",
|
|
85
42
|
/**
|
|
86
|
-
* No zone reaches this cell
|
|
43
|
+
* No zone reaches this cell.
|
|
87
44
|
*/
|
|
88
45
|
NoZoneCell: "no_zone_cell",
|
|
89
46
|
};
|
|
90
47
|
/**
|
|
91
|
-
*
|
|
48
|
+
* Reads a sealed `zoning-ireland.db`.
|
|
92
49
|
*
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
* support an exclusion, an empty jurisdiction table. Each of those would otherwise present as a reader that quietly
|
|
96
|
-
* always answers `unknown` — or, in the exclusion case, as a reader that confidently reports unzoned-and-unmapped land
|
|
97
|
-
* as free of restriction.
|
|
50
|
+
* The constructor throws on a manifest for a different layer, an empty coverage table,
|
|
51
|
+
* a coverage basis that supports exclusion or an empty jurisdiction table.
|
|
98
52
|
*/
|
|
99
53
|
export class ZoningLookup {
|
|
100
54
|
identity;
|
|
@@ -108,7 +62,7 @@ export class ZoningLookup {
|
|
|
108
62
|
constructor(options) {
|
|
109
63
|
this.#database = new DatabaseClient(options.databasePath, { readOnly: true });
|
|
110
64
|
try {
|
|
111
|
-
this.identity = readIdentity(this.#database, options.databasePath);
|
|
65
|
+
this.identity = readIdentity(this.#database, options.databasePath.toString());
|
|
112
66
|
this.#crosswalkTerms = readCrosswalkTerms(this.#database);
|
|
113
67
|
}
|
|
114
68
|
catch (error) {
|
|
@@ -116,10 +70,9 @@ export class ZoningLookup {
|
|
|
116
70
|
throw error;
|
|
117
71
|
}
|
|
118
72
|
this.#selectCell = this.#database.prepare("SELECT area_id, containment FROM zoning_cell WHERE h3_cell = ?");
|
|
119
|
-
//
|
|
120
|
-
//
|
|
121
|
-
//
|
|
122
|
-
// all.
|
|
73
|
+
// Read without the ring blob.
|
|
74
|
+
// The bounding box rejects most polygons before the ray cast needs rings.
|
|
75
|
+
// A whole cell never reads the blob.
|
|
123
76
|
this.#selectArea = this.#database.prepare("SELECT area_id, jurisdiction_id, plan_id, local_code, local_description, local_code_url, crosswalk_code, " +
|
|
124
77
|
"crosswalk_scheme, crosswalk_description, crosswalk_rollup, provenance_grade, min_lat, min_lon, max_lat, max_lon " +
|
|
125
78
|
"FROM zoning_area WHERE area_id = ?");
|
|
@@ -128,7 +81,7 @@ export class ZoningLookup {
|
|
|
128
81
|
this.#selectCoverage = this.#database.prepare("SELECT h3_cell, completeness, basis, observed_rows FROM layer_coverage WHERE h3_cell = ?");
|
|
129
82
|
}
|
|
130
83
|
/**
|
|
131
|
-
*
|
|
84
|
+
* Returns what an adopted plan assigns at this coordinate.
|
|
132
85
|
*/
|
|
133
86
|
lookup(latitude, longitude) {
|
|
134
87
|
const indexCell = latLngToCell(latitude, longitude, this.identity.indexResolution);
|
|
@@ -138,7 +91,7 @@ export class ZoningLookup {
|
|
|
138
91
|
kind: resolved.designations.length ? ZoningReadingKind.Designated : ZoningReadingKind.Unknown,
|
|
139
92
|
designations: resolved.designations,
|
|
140
93
|
containment: resolved.containment,
|
|
141
|
-
|
|
94
|
+
coverage,
|
|
142
95
|
indexCellIndex: indexCell,
|
|
143
96
|
limits: GZT_PRODUCT_LIMITS,
|
|
144
97
|
coverageLimit: GZT_COVERAGE_LIMIT,
|
|
@@ -148,13 +101,13 @@ export class ZoningLookup {
|
|
|
148
101
|
this.#database.destroy();
|
|
149
102
|
}
|
|
150
103
|
/**
|
|
151
|
-
*
|
|
104
|
+
* Returns the coverage row for the index cell's parent at the coverage resolution.
|
|
152
105
|
*/
|
|
153
106
|
#readCoverage(indexCell) {
|
|
154
107
|
return readCoverageAt(this.#selectCoverage, indexCell, this.identity.coverageResolution);
|
|
155
108
|
}
|
|
156
109
|
/**
|
|
157
|
-
*
|
|
110
|
+
* Walks the cell index up the ancestor chain and reads geometry only for cells that a boundary crosses.
|
|
158
111
|
*/
|
|
159
112
|
#resolveDesignations(indexCell, latitude, longitude) {
|
|
160
113
|
const whole = new Set();
|
|
@@ -179,15 +132,12 @@ export class ZoningLookup {
|
|
|
179
132
|
}
|
|
180
133
|
let rayCastRan = false;
|
|
181
134
|
for (const areaID of [...partial].toSorted()) {
|
|
182
|
-
// A polygon that already answered `whole` higher in the chain needs no geometry read.
|
|
183
135
|
if (whole.has(areaID))
|
|
184
136
|
continue;
|
|
185
137
|
const area = this.#selectArea.get(areaID);
|
|
186
138
|
if (!area)
|
|
187
139
|
continue;
|
|
188
140
|
rayCastRan = true;
|
|
189
|
-
// The bbox is the prefilter the geometry table stores precisely so the ray cast runs on the few polygons that
|
|
190
|
-
// could contain the point rather than on every polygon reaching the cell.
|
|
191
141
|
if (!bboxContains(area, longitude, latitude)) {
|
|
192
142
|
continue;
|
|
193
143
|
}
|
|
@@ -211,7 +161,7 @@ export class ZoningLookup {
|
|
|
211
161
|
};
|
|
212
162
|
}
|
|
213
163
|
/**
|
|
214
|
-
*
|
|
164
|
+
* Converts a stored row to a designation with its plan and jurisdiction.
|
|
215
165
|
*/
|
|
216
166
|
#toDesignation(area, containment) {
|
|
217
167
|
const plan = this.#selectPlan.get(area.plan_id);
|
|
@@ -221,26 +171,22 @@ export class ZoningLookup {
|
|
|
221
171
|
sourceCode: area.jurisdiction_id,
|
|
222
172
|
country: "",
|
|
223
173
|
};
|
|
224
|
-
const term = area.crosswalk_code
|
|
174
|
+
const term = area.crosswalk_code ? this.#crosswalkTerms.get(area.crosswalk_code) : undefined;
|
|
225
175
|
return {
|
|
226
176
|
areaID: area.area_id,
|
|
227
177
|
localCode: area.local_code,
|
|
228
178
|
localDescription: area.local_description,
|
|
229
179
|
localCodeURL: area.local_code_url,
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
...(area.crosswalk_code === null || area.crosswalk_scheme === null
|
|
233
|
-
? {}
|
|
180
|
+
crosswalk: !area.crosswalk_code || !area.crosswalk_scheme
|
|
181
|
+
? null
|
|
234
182
|
: {
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
},
|
|
243
|
-
}),
|
|
183
|
+
scheme: area.crosswalk_scheme,
|
|
184
|
+
code: area.crosswalk_code,
|
|
185
|
+
description: area.crosswalk_description,
|
|
186
|
+
rollup: area.crosswalk_rollup,
|
|
187
|
+
label: term?.label ?? null,
|
|
188
|
+
declared: term?.declared ?? false,
|
|
189
|
+
},
|
|
244
190
|
provenanceGrade: area.provenance_grade,
|
|
245
191
|
jurisdiction,
|
|
246
192
|
plan: {
|
|
@@ -256,9 +202,6 @@ export class ZoningLookup {
|
|
|
256
202
|
};
|
|
257
203
|
}
|
|
258
204
|
}
|
|
259
|
-
/**
|
|
260
|
-
* The publisher's crosswalk domain, by code — its label and whether the publisher DECLARED it.
|
|
261
|
-
*/
|
|
262
205
|
function readCrosswalkTerms(database) {
|
|
263
206
|
const rows = database
|
|
264
207
|
.prepare("SELECT code, label, declared FROM zoning_vocabulary WHERE scheme = ?")
|
|
@@ -266,7 +209,7 @@ function readCrosswalkTerms(database) {
|
|
|
266
209
|
return new Map(rows.map((row) => [row.code, { label: row.label, declared: row.declared === 1 }]));
|
|
267
210
|
}
|
|
268
211
|
/**
|
|
269
|
-
*
|
|
212
|
+
* Reads the layer's identity and throws if it is unusable.
|
|
270
213
|
*/
|
|
271
214
|
function readIdentity(database, databasePath) {
|
|
272
215
|
const manifest = parseManifestRows(database.prepare("SELECT * FROM layer_manifest").all(), GZT_LAYER_NAME, `zoning reader: ${databasePath}`);
|
|
@@ -274,10 +217,8 @@ function readIdentity(database, databasePath) {
|
|
|
274
217
|
if (!spineKeys.h3) {
|
|
275
218
|
throw new Error(`zoning reader: ${databasePath} declares no h3 spine key`);
|
|
276
219
|
}
|
|
277
|
-
//
|
|
278
|
-
//
|
|
279
|
-
// basis reaching a caller would let an absent polygon be read as a designation of freedom to build over most of the
|
|
280
|
-
// map. The check itself is the contract's rather than this product's; the SENTENCE saying why is this product's.
|
|
220
|
+
// The Department publishes its coverage footprint only in a map viewer,
|
|
221
|
+
// so no coverage row may support a claim that a location is unrestricted.
|
|
281
222
|
assertCoverageLicensesNoExclusion(database.prepare("SELECT DISTINCT basis FROM layer_coverage").all().map((coverageRow) => coverageRow.basis), `zoning reader: ${databasePath}`, GZT_COVERAGE_LIMIT);
|
|
282
223
|
const extentRows = database.prepare("SELECT * FROM zoning_mapped_extent ORDER BY extent_id").all();
|
|
283
224
|
const cellResolutions = database.prepare("SELECT DISTINCT resolution FROM zoning_cell ORDER BY resolution").all().map((entry) => entry.resolution);
|
|
@@ -292,10 +233,10 @@ function readIdentity(database, databasePath) {
|
|
|
292
233
|
const crosswalkScheme = database
|
|
293
234
|
.prepare("SELECT DISTINCT crosswalk_scheme FROM zoning_area WHERE crosswalk_scheme IS NOT NULL")
|
|
294
235
|
.all().map((entry) => entry.crosswalk_scheme);
|
|
295
|
-
//
|
|
296
|
-
//
|
|
297
|
-
//
|
|
298
|
-
//
|
|
236
|
+
// The layer stores no coverage resolution.
|
|
237
|
+
// The code recovers it from the coverage cells.
|
|
238
|
+
// A short cell expands to a valid index at exactly one resolution.
|
|
239
|
+
// The helper throws on mixed resolutions.
|
|
299
240
|
const coverageResolution = recoverShortCellResolution(database.prepare("SELECT h3_cell FROM layer_coverage").all().map((coverageRow) => coverageRow.h3_cell), `zoning reader: ${databasePath}`);
|
|
300
241
|
return {
|
|
301
242
|
manifest,
|
|
@@ -311,7 +252,7 @@ function readIdentity(database, databasePath) {
|
|
|
311
252
|
country: entry.country,
|
|
312
253
|
},
|
|
313
254
|
])),
|
|
314
|
-
|
|
255
|
+
crosswalkScheme: crosswalkScheme[0] || null,
|
|
315
256
|
mappedExtents: extentRows.map((extentRow) => ({
|
|
316
257
|
extentID: String(extentRow.extent_id),
|
|
317
258
|
source: String(extentRow.source),
|