@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/sdk/verify.d.ts
CHANGED
|
@@ -3,40 +3,40 @@
|
|
|
3
3
|
* @license AGPL-3.0
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
5
|
*
|
|
6
|
-
* The
|
|
6
|
+
* The check compares the artifact with a second path. A separate half tests locations outside its coverage.
|
|
7
7
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* on OUR CONVERSION rather than on the authority.
|
|
8
|
+
* The positive half samples points from the sealed artifact and asks the Department's feature service about them.
|
|
9
|
+
* The service supplies geometry through a separate distribution channel. This package has not touched that geometry.
|
|
10
|
+
* The check runs the point test on the service's rings. It compares two verdicts from the same authority.
|
|
11
|
+
* This measures our conversion against the authority's published geometry.
|
|
13
12
|
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* comes back OUTSIDE on both paths or on neither.
|
|
13
|
+
* The service returns geometry in the publisher's ring convention. `outSR=4326` returns the same clockwise-exterior
|
|
14
|
+
* rings as the bulk export. This path re-derives ring roles as ingest does. A point inside a hole then falls outside
|
|
15
|
+
* on both paths or inside on both paths.
|
|
18
16
|
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* polygon is not a statement.
|
|
17
|
+
* The negative half checks locations outside the publication area. The Department omits Donegal, one of 31 local
|
|
18
|
+
* authorities. The product also excludes Northern Ireland. Points in both areas must return `unknown` with no
|
|
19
|
+
* designation. A positive-only check could pass an artifact that reports the whole island as zoned. The layer treats
|
|
20
|
+
* a missing polygon as no zoning statement.
|
|
24
21
|
*
|
|
25
|
-
*
|
|
26
|
-
* archive publishes nine decimals through this package's ingest
|
|
27
|
-
* within roughly a
|
|
28
|
-
*
|
|
29
|
-
* of the receipt.
|
|
22
|
+
* The channels use different coordinate precision. A boundary-point disagreement therefore does not establish a
|
|
23
|
+
* conversion defect. The archive publishes nine decimals through this package's ingest. The service rounds its JSON.
|
|
24
|
+
* A point within roughly a meter of a zone boundary can fall on opposite sides of the two rendered edges. The check
|
|
25
|
+
* reports these cases as `boundary_tolerance` with the distance to the nearest edge. The receipt includes their count.
|
|
30
26
|
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
27
|
+
* The distance measures to the edge rather than to the nearest vertex. A point a centimeter from a long edge can be
|
|
28
|
+
* meters from every vertex. In one sibling-layer near-miss, vertex distance measured 1.58 m and edge distance
|
|
29
|
+
* measured 0.009 m. The vertex measurement overstated distance by 175 times. It would make the stated boundary
|
|
30
|
+
* tolerance stricter and report a rendering difference as a conversion defect.
|
|
35
31
|
*/
|
|
32
|
+
import type { OGCFeature } from "@mailwoman/core/api";
|
|
33
|
+
import type { OutsideCoverageRow } from "@mailwoman/core/layers";
|
|
34
|
+
import type { PathBuilderLike } from "path-ts";
|
|
36
35
|
import { type ZoningReading } from "#index";
|
|
37
36
|
import type { GZTClient } from "#sdk/client";
|
|
38
37
|
/**
|
|
39
|
-
*
|
|
38
|
+
* Records one point and both verdicts.
|
|
39
|
+
* It also records whether they agree.
|
|
40
40
|
*/
|
|
41
41
|
export interface AgreementRow {
|
|
42
42
|
label: string;
|
|
@@ -51,34 +51,25 @@ export interface AgreementRow {
|
|
|
51
51
|
*/
|
|
52
52
|
serviceInside: boolean;
|
|
53
53
|
/**
|
|
54
|
-
* The local code the
|
|
55
|
-
* because carrying the code verbatim is what this layer is for: two paths that agree on containment and disagree on
|
|
56
|
-
* the code would be a silent vocabulary defect.
|
|
57
|
-
*/
|
|
58
|
-
serviceLocalCode?: string;
|
|
59
|
-
outcome: "agree" | "disagree" | "boundary_tolerance";
|
|
60
|
-
/**
|
|
61
|
-
* Metres from the point to the nearest EDGE of any polygon the service returned nearby.
|
|
54
|
+
* The local code the service reports at the point, where it reports one.
|
|
62
55
|
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
56
|
+
* Compared verbatim against the artifact's, because carrying the code verbatim
|
|
57
|
+
* is what this layer is for: two paths that agree on containment and disagree
|
|
58
|
+
* on the code would be a silent vocabulary defect.
|
|
66
59
|
*/
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* The negative half: a point this product's publication does not reach.
|
|
71
|
-
*/
|
|
72
|
-
export interface OutsideRow {
|
|
73
|
-
label: string;
|
|
74
|
-
latitude: number;
|
|
75
|
-
longitude: number;
|
|
76
|
-
kind: string;
|
|
77
|
-
designations: number;
|
|
60
|
+
serviceLocalCode: string | null;
|
|
61
|
+
result: "agree" | "disagree" | "boundary_tolerance";
|
|
78
62
|
/**
|
|
79
|
-
*
|
|
63
|
+
* Meters from the point to the nearest edge of any polygon the service returned nearby.
|
|
64
|
+
*
|
|
65
|
+
* Every row includes this distance.
|
|
66
|
+
* It separates a real defect from a difference caused by the two channels
|
|
67
|
+
* rendering the same edge differently.
|
|
68
|
+
*
|
|
69
|
+
* A receipt without it forces a re-run.
|
|
70
|
+
* `null` means the service returned no polygon at all near the point.
|
|
80
71
|
*/
|
|
81
|
-
|
|
72
|
+
nearestEdgeMetres: number | null;
|
|
82
73
|
}
|
|
83
74
|
export interface VerifyZoningResult {
|
|
84
75
|
agreement: AgreementRow[];
|
|
@@ -89,16 +80,22 @@ export interface VerifyZoningResult {
|
|
|
89
80
|
* Points where both paths placed the location inside a zone and the local codes differed.
|
|
90
81
|
*/
|
|
91
82
|
codeMismatches: number;
|
|
92
|
-
outside:
|
|
83
|
+
outside: OutsideCoverageRow[];
|
|
93
84
|
outsidePassed: number;
|
|
94
85
|
}
|
|
95
86
|
/**
|
|
96
|
-
*
|
|
97
|
-
*
|
|
87
|
+
* Point identifiers for locations outside this product's publication area.
|
|
88
|
+
*
|
|
89
|
+
* Each is a place rather than a bare pair of numbers: a coordinate a reader a
|
|
90
|
+
* coordinate without a reference source cannot be checked.
|
|
91
|
+
*
|
|
92
|
+
* The check requires points from two populations.
|
|
93
|
+
* The Donegal points are the case this layer's coverage posture exists for.
|
|
94
|
+
*
|
|
95
|
+
* The Department has not published that authority's zoning.
|
|
96
|
+
* A builder that reads the absence as "unrestricted" would answer these points confidently.
|
|
98
97
|
*
|
|
99
|
-
*
|
|
100
|
-
* — the Department has not published that authority's zoning, and a builder that read absence as "unrestricted" would
|
|
101
|
-
* answer them confidently. The Northern Irish points confirm the artifact is clipped to the Republic rather than to the
|
|
98
|
+
* The Northern Irish points confirm the artifact is clipped to the Republic rather than to the
|
|
102
99
|
* island: zoning there is a different jurisdiction's instrument under a different planning act.
|
|
103
100
|
*/
|
|
104
101
|
export declare const OUTSIDE_PUBLICATION_POINTS: ReadonlyArray<{
|
|
@@ -107,37 +104,38 @@ export declare const OUTSIDE_PUBLICATION_POINTS: ReadonlyArray<{
|
|
|
107
104
|
longitude: number;
|
|
108
105
|
}>;
|
|
109
106
|
/**
|
|
110
|
-
* One feature as the service publishes it
|
|
107
|
+
* One feature as the service publishes it.
|
|
108
|
+
* The only shape the comparison reads.
|
|
111
109
|
*/
|
|
112
|
-
export
|
|
113
|
-
properties?: Record<string, unknown>;
|
|
114
|
-
geometry?: {
|
|
115
|
-
type: string;
|
|
116
|
-
coordinates: unknown;
|
|
117
|
-
};
|
|
118
|
-
}
|
|
110
|
+
export type ServiceFeature = OGCFeature;
|
|
119
111
|
/**
|
|
120
|
-
* The
|
|
112
|
+
* The one call the verification makes against the service: the features it publishes near a point.
|
|
113
|
+
*
|
|
114
|
+
* The function exposes only the service read.
|
|
115
|
+
* This keeps the check's own logic testable.
|
|
121
116
|
*
|
|
122
|
-
*
|
|
123
|
-
*
|
|
124
|
-
*
|
|
125
|
-
*
|
|
117
|
+
* The comparison's value is that it decides which of three results a point gets.
|
|
118
|
+
*
|
|
119
|
+
* An HTTP client would let tests observe these decisions only during a live run.
|
|
120
|
+
* A scripted reader pins the decisions. {@link createServiceReader} builds the real reader.
|
|
126
121
|
*/
|
|
127
122
|
export type ServiceFeatureReader = (latitude: number, longitude: number) => Promise<ServiceFeature[]>;
|
|
128
123
|
/**
|
|
129
124
|
* The reader the live check uses: a bounding-box query against the Department's own service.
|
|
130
125
|
*
|
|
131
|
-
* The service answers a BOX
|
|
132
|
-
* in {@link readServiceContainment} against
|
|
133
|
-
*
|
|
126
|
+
* The service answers a BOX rather than a point, so this returns what it published nearby
|
|
127
|
+
* and the containment decision is made in {@link readServiceContainment} against
|
|
128
|
+
* those rings — comparing the artifact's verdict against a bare "the service returned
|
|
129
|
+
* something here" would pass on any polygon within eleven meters.
|
|
134
130
|
*/
|
|
135
131
|
export declare function createServiceReader(client: Pick<GZTClient, "readFeaturesNear">): ServiceFeatureReader;
|
|
136
132
|
export interface VerifyZoningOptions {
|
|
137
|
-
databasePath:
|
|
133
|
+
databasePath: PathBuilderLike;
|
|
138
134
|
readServiceFeatures: ServiceFeatureReader;
|
|
139
135
|
/**
|
|
140
|
-
* Points to re-ask the service about.
|
|
136
|
+
* Points to re-ask the service about.
|
|
137
|
+
*
|
|
138
|
+
* A caller samples them from the artifact — see {@link sampleAgreementPoints}.
|
|
141
139
|
*/
|
|
142
140
|
points: ReadonlyArray<{
|
|
143
141
|
label: string;
|
|
@@ -157,15 +155,16 @@ export interface VerifyZoningOptions {
|
|
|
157
155
|
*/
|
|
158
156
|
export declare function verifyZoningDatabase(options: VerifyZoningOptions): Promise<VerifyZoningResult>;
|
|
159
157
|
/**
|
|
160
|
-
* Draw a reproducible sample of points from the artifact — interior points of
|
|
161
|
-
* authorities.
|
|
158
|
+
* Draw a reproducible sample of points from the artifact — interior points of
|
|
159
|
+
* stored polygons, spread across authorities.
|
|
162
160
|
*
|
|
163
|
-
*
|
|
164
|
-
* between them and a sample from one would verify
|
|
165
|
-
*
|
|
166
|
-
*
|
|
161
|
+
* Spread across authorities rather than drawn from one, because 30 local authorities
|
|
162
|
+
* publish 581 distinct local codes between them and a sample from one would verify
|
|
163
|
+
* one authority's conversion while reporting on all of them.
|
|
164
|
+
* The stride discipline — keys chosen before any geometry is read, deterministic
|
|
165
|
+
* rather than random — is `strideSampleInteriorPoints`'s.
|
|
167
166
|
*/
|
|
168
|
-
export declare function sampleAgreementPoints(databasePath:
|
|
167
|
+
export declare function sampleAgreementPoints(databasePath: PathBuilderLike, options?: {
|
|
169
168
|
count?: number;
|
|
170
169
|
}): Array<{
|
|
171
170
|
label: string;
|
package/out/sdk/verify.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verify.d.ts","sourceRoot":"","sources":["../../
|
|
1
|
+
{"version":3,"file":"verify.d.ts","sourceRoot":"","sources":["../../sdk/verify.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAErD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAUhE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAE9C,OAAO,EAAmC,KAAK,aAAa,EAAE,MAAM,QAAQ,CAAA;AAG5E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAE5C;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC5B,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB;;OAEG;IACH,KAAK,EAAE,aAAa,CAAA;IACpB;;OAEG;IACH,aAAa,EAAE,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AAA;KAAE,CAAC,CAAA;IACjG,aAAa,CAAC,EAAE,aAAa,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IACrF,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;CACtC;AAED;;GAEG;AACH,wBAAsB,oBAAoB,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CA2DpG;AA6DD;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CACpC,YAAY,EAAE,eAAe,EAC7B,OAAO,GAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAO,GAC9B,KAAK,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC,CAwClF"}
|
package/out/sdk/verify.js
CHANGED
|
@@ -3,47 +3,50 @@
|
|
|
3
3
|
* @license AGPL-3.0
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
5
|
*
|
|
6
|
-
* The
|
|
6
|
+
* The check compares the artifact with a second path. A separate half tests locations outside its coverage.
|
|
7
7
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* on OUR CONVERSION rather than on the authority.
|
|
8
|
+
* The positive half samples points from the sealed artifact and asks the Department's feature service about them.
|
|
9
|
+
* The service supplies geometry through a separate distribution channel. This package has not touched that geometry.
|
|
10
|
+
* The check runs the point test on the service's rings. It compares two verdicts from the same authority.
|
|
11
|
+
* This measures our conversion against the authority's published geometry.
|
|
13
12
|
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* comes back OUTSIDE on both paths or on neither.
|
|
13
|
+
* The service returns geometry in the publisher's ring convention. `outSR=4326` returns the same clockwise-exterior
|
|
14
|
+
* rings as the bulk export. This path re-derives ring roles as ingest does. A point inside a hole then falls outside
|
|
15
|
+
* on both paths or inside on both paths.
|
|
18
16
|
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* polygon is not a statement.
|
|
17
|
+
* The negative half checks locations outside the publication area. The Department omits Donegal, one of 31 local
|
|
18
|
+
* authorities. The product also excludes Northern Ireland. Points in both areas must return `unknown` with no
|
|
19
|
+
* designation. A positive-only check could pass an artifact that reports the whole island as zoned. The layer treats
|
|
20
|
+
* a missing polygon as no zoning statement.
|
|
24
21
|
*
|
|
25
|
-
*
|
|
26
|
-
* archive publishes nine decimals through this package's ingest
|
|
27
|
-
* within roughly a
|
|
28
|
-
*
|
|
29
|
-
* of the receipt.
|
|
22
|
+
* The channels use different coordinate precision. A boundary-point disagreement therefore does not establish a
|
|
23
|
+
* conversion defect. The archive publishes nine decimals through this package's ingest. The service rounds its JSON.
|
|
24
|
+
* A point within roughly a meter of a zone boundary can fall on opposite sides of the two rendered edges. The check
|
|
25
|
+
* reports these cases as `boundary_tolerance` with the distance to the nearest edge. The receipt includes their count.
|
|
30
26
|
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
27
|
+
* The distance measures to the edge rather than to the nearest vertex. A point a centimeter from a long edge can be
|
|
28
|
+
* meters from every vertex. In one sibling-layer near-miss, vertex distance measured 1.58 m and edge distance
|
|
29
|
+
* measured 0.009 m. The vertex measurement overstated distance by 175 times. It would make the stated boundary
|
|
30
|
+
* tolerance stricter and report a rendering difference as a conversion defect.
|
|
35
31
|
*/
|
|
32
|
+
import { stringifyJSON } from "@mailwoman/core/json";
|
|
36
33
|
import { nearestRingEdgeMetres, pointInEncodedRings, strideSampleInteriorPoints, encodeRings, } from "@mailwoman/spatial";
|
|
37
34
|
import { DatabaseClient } from "@mailwoman/sqlite/client";
|
|
38
35
|
import { ZoningLookup, ZoningReadingKind } from "#index";
|
|
39
36
|
import { resolveRingRoles } from "#rings";
|
|
40
37
|
/**
|
|
41
|
-
*
|
|
42
|
-
* reader cannot name is a coordinate nobody can check.
|
|
38
|
+
* Point identifiers for locations outside this product's publication area.
|
|
43
39
|
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
40
|
+
* Each is a place rather than a bare pair of numbers: a coordinate a reader a
|
|
41
|
+
* coordinate without a reference source cannot be checked.
|
|
42
|
+
*
|
|
43
|
+
* The check requires points from two populations.
|
|
44
|
+
* The Donegal points are the case this layer's coverage posture exists for.
|
|
45
|
+
*
|
|
46
|
+
* The Department has not published that authority's zoning.
|
|
47
|
+
* A builder that reads the absence as "unrestricted" would answer these points confidently.
|
|
48
|
+
*
|
|
49
|
+
* The Northern Irish points confirm the artifact is clipped to the Republic rather than to the
|
|
47
50
|
* island: zoning there is a different jurisdiction's instrument under a different planning act.
|
|
48
51
|
*/
|
|
49
52
|
export const OUTSIDE_PUBLICATION_POINTS = [
|
|
@@ -55,25 +58,30 @@ export const OUTSIDE_PUBLICATION_POINTS = [
|
|
|
55
58
|
{ label: "Enniskillen, Northern Ireland", latitude: 54.3438, longitude: -7.6316 },
|
|
56
59
|
];
|
|
57
60
|
/**
|
|
58
|
-
* Half-width of the bounding box the service is asked for, in degrees.
|
|
59
|
-
*
|
|
61
|
+
* Half-width of the bounding box the service is asked for, in degrees.
|
|
62
|
+
*
|
|
63
|
+
* About 11 m at this latitude — wide enough that a polygon containing the point is
|
|
64
|
+
* certainly returned, narrow enough that the response stays small.
|
|
60
65
|
*/
|
|
61
66
|
const PROBE_HALF_WIDTH_DEGREES = 0.0001;
|
|
62
67
|
/**
|
|
63
|
-
* How close to a service-polygon edge a disagreement is attributed to the channels'
|
|
64
|
-
* rather than to the conversion.
|
|
68
|
+
* How close to a service-polygon edge a disagreement is attributed to the channels'
|
|
69
|
+
* differing coordinate precision rather than to the conversion.
|
|
70
|
+
*
|
|
71
|
+
* Half a meter.
|
|
72
|
+
* The two channels render the same edge from the same source coordinates through different
|
|
73
|
+
* rounding, so a point between the two renderings lands on opposite sides.
|
|
65
74
|
*
|
|
66
|
-
* Half a
|
|
67
|
-
* point between the two renderings lands on opposite sides; half a metre is far below any real zoning boundary and far
|
|
68
|
-
* above the rounding difference.
|
|
75
|
+
* Half a meter is far below any real zoning boundary and far above the rounding difference.
|
|
69
76
|
*/
|
|
70
77
|
const BOUNDARY_TOLERANCE_METRES = 0.5;
|
|
71
78
|
/**
|
|
72
79
|
* The reader the live check uses: a bounding-box query against the Department's own service.
|
|
73
80
|
*
|
|
74
|
-
* The service answers a BOX
|
|
75
|
-
* in {@link readServiceContainment} against
|
|
76
|
-
*
|
|
81
|
+
* The service answers a BOX rather than a point, so this returns what it published nearby
|
|
82
|
+
* and the containment decision is made in {@link readServiceContainment} against
|
|
83
|
+
* those rings — comparing the artifact's verdict against a bare "the service returned
|
|
84
|
+
* something here" would pass on any polygon within eleven meters.
|
|
77
85
|
*/
|
|
78
86
|
export function createServiceReader(client) {
|
|
79
87
|
return async (latitude, longitude) => client.readFeaturesNear(latitude, longitude, PROBE_HALF_WIDTH_DEGREES);
|
|
@@ -89,16 +97,16 @@ export async function verifyZoningDatabase(options) {
|
|
|
89
97
|
const local = lookup.lookup(point.latitude, point.longitude);
|
|
90
98
|
const service = await readServiceContainment(options.readServiceFeatures, point.latitude, point.longitude);
|
|
91
99
|
const localInside = local.kind === ZoningReadingKind.Designated;
|
|
92
|
-
const nearEdge = service.nearestEdgeMetres !==
|
|
100
|
+
const nearEdge = service.nearestEdgeMetres !== null && service.nearestEdgeMetres <= BOUNDARY_TOLERANCE_METRES;
|
|
93
101
|
agreement.push({
|
|
94
102
|
label: point.label,
|
|
95
103
|
latitude: point.latitude,
|
|
96
104
|
longitude: point.longitude,
|
|
97
105
|
local,
|
|
98
106
|
serviceInside: service.inside,
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
107
|
+
serviceLocalCode: service.localCode,
|
|
108
|
+
result: localInside === service.inside ? "agree" : nearEdge ? "boundary_tolerance" : "disagree",
|
|
109
|
+
nearestEdgeMetres: service.nearestEdgeMetres,
|
|
102
110
|
});
|
|
103
111
|
options.onProgress?.(`${agreement.length}/${options.points.length} points compared`);
|
|
104
112
|
}
|
|
@@ -116,12 +124,12 @@ export async function verifyZoningDatabase(options) {
|
|
|
116
124
|
}
|
|
117
125
|
return {
|
|
118
126
|
agreement,
|
|
119
|
-
agreed: agreement.filter((row) => row.
|
|
120
|
-
disagreed: agreement.filter((row) => row.
|
|
121
|
-
boundaryTolerance: agreement.filter((row) => row.
|
|
122
|
-
codeMismatches: agreement.filter((row) => row.
|
|
127
|
+
agreed: agreement.filter((row) => row.result === "agree").length,
|
|
128
|
+
disagreed: agreement.filter((row) => row.result === "disagree").length,
|
|
129
|
+
boundaryTolerance: agreement.filter((row) => row.result === "boundary_tolerance").length,
|
|
130
|
+
codeMismatches: agreement.filter((row) => row.result === "agree" &&
|
|
123
131
|
row.serviceInside &&
|
|
124
|
-
row.serviceLocalCode !==
|
|
132
|
+
row.serviceLocalCode !== null &&
|
|
125
133
|
!row.local.designations.some((designation) => designation.localCode === row.serviceLocalCode)).length,
|
|
126
134
|
outside,
|
|
127
135
|
outsidePassed: outside.filter((row) => row.passed).length,
|
|
@@ -132,14 +140,15 @@ export async function verifyZoningDatabase(options) {
|
|
|
132
140
|
}
|
|
133
141
|
}
|
|
134
142
|
/**
|
|
135
|
-
* Whether the
|
|
136
|
-
* even-odd rule the artifact's reader uses
|
|
143
|
+
* Whether the service's own geometry contains the point, decided here with the same
|
|
144
|
+
* ring-role resolution and the same even-odd rule the artifact's reader uses.
|
|
145
|
+
* So what is compared is a verdict against a verdict.
|
|
137
146
|
*/
|
|
138
147
|
async function readServiceContainment(readServiceFeatures, latitude, longitude) {
|
|
139
148
|
const features = await readServiceFeatures(latitude, longitude);
|
|
140
149
|
let nearest = Infinity;
|
|
141
150
|
let inside = false;
|
|
142
|
-
let localCode;
|
|
151
|
+
let localCode = null;
|
|
143
152
|
for (const feature of features) {
|
|
144
153
|
const geometry = feature.geometry;
|
|
145
154
|
if (!geometry)
|
|
@@ -151,49 +160,53 @@ async function readServiceContainment(readServiceFeatures, latitude, longitude)
|
|
|
151
160
|
if (distance < nearest) {
|
|
152
161
|
nearest = distance;
|
|
153
162
|
}
|
|
154
|
-
//
|
|
155
|
-
// both channels, so reading this side as nested
|
|
156
|
-
//
|
|
163
|
+
// the service'S rings GET the same role resolution the ingest gave the archive'S.
|
|
164
|
+
// The publisher uses one convention on both channels, so reading this side as nested
|
|
165
|
+
// GeoJSON would answer "inside" for a point in a hole and report the artifact as
|
|
166
|
+
// wrong at exactly the locations the hole handling exists for.
|
|
157
167
|
const resolved = resolveRingRoles(raw, `service feature near ${latitude},${longitude}`);
|
|
158
|
-
//
|
|
159
|
-
// `pointInEncodedRings`, and running the service's geometry through a different
|
|
160
|
-
// that were never asked the same question.
|
|
168
|
+
// encoded and RE-read rather than RAY-cast directly, deliberately: the artifact answers
|
|
169
|
+
// through `pointInEncodedRings`, and running the service's geometry through a different
|
|
170
|
+
// predicate would compare two answers that were never asked the same question.
|
|
161
171
|
if (pointInEncodedRings(encodeRings(resolved.polygons), longitude, latitude)) {
|
|
162
172
|
inside = true;
|
|
163
173
|
const code = feature.properties?.ZONE_ORIG;
|
|
164
|
-
if (typeof code === "string" && localCode
|
|
174
|
+
if (typeof code === "string" && !localCode) {
|
|
165
175
|
localCode = code;
|
|
166
176
|
}
|
|
167
177
|
}
|
|
168
178
|
}
|
|
169
179
|
return {
|
|
170
180
|
inside,
|
|
171
|
-
|
|
172
|
-
|
|
181
|
+
localCode,
|
|
182
|
+
nearestEdgeMetres: Number.isFinite(nearest) ? nearest : null,
|
|
173
183
|
};
|
|
174
184
|
}
|
|
175
185
|
/**
|
|
176
|
-
* Draw a reproducible sample of points from the artifact — interior points of
|
|
177
|
-
* authorities.
|
|
186
|
+
* Draw a reproducible sample of points from the artifact — interior points of
|
|
187
|
+
* stored polygons, spread across authorities.
|
|
178
188
|
*
|
|
179
|
-
*
|
|
180
|
-
* between them and a sample from one would verify
|
|
181
|
-
*
|
|
182
|
-
*
|
|
189
|
+
* Spread across authorities rather than drawn from one, because 30 local authorities
|
|
190
|
+
* publish 581 distinct local codes between them and a sample from one would verify
|
|
191
|
+
* one authority's conversion while reporting on all of them.
|
|
192
|
+
* The stride discipline — keys chosen before any geometry is read, deterministic
|
|
193
|
+
* rather than random — is `strideSampleInteriorPoints`'s.
|
|
183
194
|
*/
|
|
184
195
|
export function sampleAgreementPoints(databasePath, options = {}) {
|
|
185
196
|
const count = options.count ?? 48;
|
|
186
197
|
using database = new DatabaseClient(databasePath, { readOnly: true });
|
|
187
|
-
//
|
|
188
|
-
//
|
|
189
|
-
//
|
|
198
|
+
// Sort by authority so the stride samples across the 30 authorities
|
|
199
|
+
// instead of sampling one authority repeatedly.
|
|
200
|
+
// A stride over `area_id` by itself would follow the publisher's feature numbering.
|
|
201
|
+
// That numbering is grouped by authority, so the stride would select only the
|
|
202
|
+
// authorities that fall on its positions.
|
|
190
203
|
const areaIDs = database.prepare("SELECT area_id FROM zoning_area ORDER BY jurisdiction_id, area_id").all().map((row) => row.area_id);
|
|
191
204
|
const selectArea = database.prepare("SELECT area_id, jurisdiction_id, local_code, min_lat, min_lon, max_lat, max_lon, rings FROM zoning_area WHERE area_id = ?");
|
|
192
205
|
return strideSampleInteriorPoints(areaIDs, count, {
|
|
193
206
|
fetch: (key) => selectArea.get(key),
|
|
194
207
|
gridSteps: 17,
|
|
195
208
|
toPoint: (area, interior) => ({
|
|
196
|
-
label: `${area.jurisdiction_id} ${
|
|
209
|
+
label: `${area.jurisdiction_id} ${stringifyJSON(area.local_code)} polygon ${area.area_id}`,
|
|
197
210
|
localCode: area.local_code,
|
|
198
211
|
...interior,
|
|
199
212
|
}),
|
package/out/sdk/verify.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ver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