@mailwoman/zoning 10.0.0 → 10.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +47 -136
- 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 +19 -43
- package/out/sdk/ingest/chunk.d.ts.map +1 -1
- package/out/sdk/ingest/chunk.js +16 -49
- 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} +5 -7
- package/out/sdk/ingest/worker.js.map +1 -0
- package/out/sdk/ingest.d.ts +162 -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 -24
- package/out/sdk/measure-resolutions.d.ts.map +1 -1
- package/out/sdk/measure-resolutions.js +5 -22
- 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 +99 -185
- 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 → sdk}/ingest/chunk.ts +33 -62
- 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 +9 -26
- package/{lib → sdk}/test-kit.ts +21 -44
- 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/index.ts +0 -393
- 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/README.md
CHANGED
|
@@ -1,173 +1,176 @@
|
|
|
1
1
|
# `@mailwoman/zoning`
|
|
2
2
|
|
|
3
|
-
Ireland's **Generalised Zoning Types** as a sealed spatial layer
|
|
4
|
-
assigns at a coordinate, in that authority's own vocabulary,
|
|
5
|
-
stated window.
|
|
3
|
+
This package provides Ireland's **Generalised Zoning Types** as a sealed spatial layer. The layer reports
|
|
4
|
+
what a local authority's adopted plan assigns at a coordinate, in that authority's own vocabulary, together
|
|
5
|
+
with the plan and that plan's stated window.
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
**30 of the Republic's 31 local authorities
|
|
9
|
-
(CSO table `FY003A`), **4,982,055 of 5,149,139 residents
|
|
10
|
-
represented in the layer.** That
|
|
11
|
-
|
|
7
|
+
The Department of Housing, Local Government and Heritage publishes the data for the MyPlan.ie project. It
|
|
8
|
+
covers **30 of the Republic's 31 local authorities**, and Donegal County Council is the one missing. Against
|
|
9
|
+
Census 2022 (CSO table `FY003A`), **4,982,055 of 5,149,139 residents (96.76%) live in a local authority whose
|
|
10
|
+
zoning is represented in the layer.** That figure describes jurisdictions only. An address in a covered authority
|
|
11
|
+
does not mean that a zoning polygon covers your address.
|
|
12
12
|
|
|
13
13
|
**The artifact is built locally and never redistributed.** Three published statements disagree about the
|
|
14
|
-
source's license, so the manifest carries `tier: build-local` and `license: NOASSERTION
|
|
15
|
-
|
|
14
|
+
source's license, so the manifest carries `tier: build-local` and `license: NOASSERTION`. The builder refuses
|
|
15
|
+
a `shipped` tier until the license question is resolved in writing. See _Licence and posture_ below.
|
|
16
16
|
|
|
17
17
|
## What it reports, and what it refuses to
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
The layer has two readings. The reading it lacks matters most.
|
|
20
20
|
|
|
21
|
-
| reading | what it means
|
|
22
|
-
| ------------ |
|
|
23
|
-
| `designated` | An adopted plan places the location inside a zoning polygon, and the polygon is the answer
|
|
24
|
-
| `unknown` | No zoning polygon contains the point.
|
|
21
|
+
| reading | what it means |
|
|
22
|
+
| ------------ | ---------------------------------------------------------------------------------------------------------------- |
|
|
23
|
+
| `designated` | An adopted plan places the location inside a zoning polygon, and the polygon is the answer |
|
|
24
|
+
| `unknown` | No zoning polygon contains the point. This reading does not claim absence, and this layer has no absence reading |
|
|
25
25
|
|
|
26
|
-
**
|
|
27
|
-
Environment Agency states England-wide coverage and the Planning Practice Guidance defines Zone 1
|
|
28
|
-
outside Zones 2 and 3, so an empty answer inside England
|
|
29
|
-
|
|
26
|
+
**This layer has no `designated_absence` reading, and zoning is the hardest case of this rule.** For flood
|
|
27
|
+
zones the Environment Agency states England-wide coverage, and the Planning Practice Guidance defines Zone 1
|
|
28
|
+
as the land outside Zones 2 and 3, so an empty flood answer inside England is a designation. The zoning layer has no
|
|
29
|
+
such definition anywhere. A location with no zoning polygon can be in at least four different situations:
|
|
30
30
|
|
|
31
|
-
1. Outside any adopted plan area
|
|
31
|
+
1. Outside any adopted plan area, which covers most land in most countries. The authority has made no statement.
|
|
32
32
|
2. Inside a plan area, on land the plan does not zone.
|
|
33
33
|
3. In a jurisdiction that has never adopted zoning at all.
|
|
34
34
|
4. In a jurisdiction whose records nobody has read or published yet.
|
|
35
35
|
|
|
36
|
-
**
|
|
37
|
-
`ZONE_ORIG = "UNZ - Unzoned"` with `ZONE_GZT = "N/A"` on 4 of its 85,330 rows.
|
|
38
|
-
unzoned it
|
|
36
|
+
**The source states one of these cases explicitly, which shows that the other cases are absences.** It
|
|
37
|
+
carries `ZONE_ORIG = "UNZ - Unzoned"` with `ZONE_GZT = "N/A"` on 4 of its 85,330 rows. When the authority
|
|
38
|
+
means unzoned, it writes that on a row. Every other absence is a missing row.
|
|
39
39
|
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
Every `layer_coverage` row therefore carries `basis = source_present`. The reader refuses to open an artifact
|
|
41
|
+
that carries anything stronger, and the observation stays silent where no polygon contains the point.
|
|
42
42
|
|
|
43
|
-
**Neither reading
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
**Neither reading states what may be built.** The Department states that its data are "not published here as
|
|
44
|
+
legal definitions of the current actuality with regard to Local Authority zoning or their geographic extents"
|
|
45
|
+
and that "Original data should be sourced directly from the relevant Local Authority". Every reading carries
|
|
46
|
+
those exclusions.
|
|
47
47
|
|
|
48
48
|
## The vocabulary decision — the verbatim code, and the crosswalk beside it
|
|
49
49
|
|
|
50
|
-
|
|
51
|
-
already built
|
|
50
|
+
The crosswalk design is what distinguishes this layer. Ireland provides a natural test of it, because a
|
|
51
|
+
national authority has already built a crosswalk for one small country with statutory access to the plans.
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
These figures cover the whole national export:
|
|
54
54
|
|
|
55
55
|
| measurement | value |
|
|
56
56
|
| --------------------------------------------------------------- | ------: |
|
|
57
57
|
| distinct local zone strings (`ZONE_ORIG`) across 30 authorities | **581** |
|
|
58
58
|
| the same, trimmed and case-folded | **555** |
|
|
59
59
|
| distinct national generic types (`ZONE_GZT`) observed | **55** |
|
|
60
|
-
| generic types the service's own coded-value domain
|
|
60
|
+
| generic types the service's own coded-value domain declares | **54** |
|
|
61
61
|
| distinct `(authority, local code)` pairs | **795** |
|
|
62
|
-
| **pairs taking
|
|
62
|
+
| **pairs taking more than one generic type** | **52** |
|
|
63
63
|
|
|
64
|
-
**The
|
|
65
|
-
lookup and the local column would be redundant.
|
|
66
|
-
**14** different generic types, its `Green Infrastructure` **12**,
|
|
67
|
-
|
|
64
|
+
**The last figure decides the design.** If a local code determined a generic type, the mapping could ship as
|
|
65
|
+
a lookup and the local column would be redundant. A local code does not determine the type. Cork County
|
|
66
|
+
Council's `Special Policy Area` takes **14** different generic types, its `Green Infrastructure` takes **12**,
|
|
67
|
+
and Clare's `Utilities` takes **11**. A person assigned the mapping per polygon while reading a plan, and it
|
|
68
|
+
cannot be reconstructed from the pair of columns.
|
|
68
69
|
|
|
69
|
-
|
|
70
|
-
`assertCrosswalkIsNotATable` refuses a build that would write an edge while any pair
|
|
70
|
+
`zoning_area` therefore carries **both** columns, and `zoning_crosswalk_edge` ships **empty**. Code checks
|
|
71
|
+
this: `assertCrosswalkIsNotATable` refuses a build that would write an edge while any pair maps to more than
|
|
72
|
+
one type.
|
|
71
73
|
|
|
72
|
-
The Department says the same thing in
|
|
74
|
+
The Department says the same thing in the item description:
|
|
73
75
|
|
|
74
76
|
> This represents a consistent zoning scheme across all local authorities, and **complements (rather than
|
|
75
77
|
> replaces) the existing statutory zoning used for each individual plan**.
|
|
76
78
|
|
|
77
|
-
**The declared domain is closed and the source already
|
|
78
|
-
on 4 rows and in no domain.
|
|
79
|
-
the
|
|
80
|
-
|
|
81
|
-
|
|
79
|
+
**The declared domain is closed, and the source already violates it.** The domain declares 54 codes and the
|
|
80
|
+
data uses 55, because `N/A` appears on 4 rows and in no domain. `zoning_vocabulary` therefore carries the
|
|
81
|
+
declared domain **plus** the values observed in the data, and the `declared` column separates them. A merge of the
|
|
82
|
+
two would either hide a source-schema change or invent a declaration that the Department never made. For the
|
|
83
|
+
same reason, a declared code that the data never uses is kept with `observed_rows = 0`. `SDZ` is a real plan
|
|
84
|
+
level that nobody has used yet.
|
|
82
85
|
|
|
83
86
|
## Three measured source behaviors a builder has to know
|
|
84
87
|
|
|
85
88
|
### Hole roles come from ring ORIENTATION, and clockwise is the exterior
|
|
86
89
|
|
|
87
|
-
|
|
88
|
-
|
|
90
|
+
This is the inverse of RFC 7946's convention, and it is the one property of this source that silently produces
|
|
91
|
+
a well-formed wrong answer. These figures cover the whole national export (85,330 features, 93,483 rings):
|
|
89
92
|
|
|
90
93
|
| reading | km² |
|
|
91
94
|
| ---------------------------------------------------------- | ----------: |
|
|
92
95
|
| sum of signed ring areas, in the source's own ITM meters | **5,444.5** |
|
|
93
96
|
| the Department's own `Shape__Area` sum | **5,444.5** |
|
|
94
|
-
| sum of
|
|
95
|
-
|
|
96
|
-
**
|
|
97
|
-
(5,444,492,956.43 m² against 5,444,492,956.40)
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
89,967 rings are clockwise and 3,516 counter-clockwise
|
|
105
|
-
nest their holes inside one polygon part
|
|
106
|
-
`MultiPolygon` part
|
|
107
|
-
parts of which 5 are clockwise and 102 counter-clockwise. **Both encodings reach the ingest, and
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
**Two
|
|
111
|
-
parent's boundary
|
|
112
|
-
exterior of
|
|
113
|
-
feature of 85,330** has no ring the rule can read as an exterior
|
|
97
|
+
| sum of absolute ring areas, in the source's own ITM meters | **5,666.6** |
|
|
98
|
+
|
|
99
|
+
**In the source's own projection, the signed sum matches the publisher to eight decimal places**
|
|
100
|
+
(5,444,492,956.43 m² against 5,444,492,956.40), which settles the convention. The build compares a spherical
|
|
101
|
+
reading of the reprojected rings, so its own numbers sit a few tenths of a percent away from both: 5,423.2 km²
|
|
102
|
+
with holes against the publisher's 5,444.5 (**0.392% apart**), and 5,644.4 km² without them (**3.7% away**).
|
|
103
|
+
The gap between those two readings is the signal, and the 1% build tolerance sits between them with room on
|
|
104
|
+
each side. Irish Transverse Mercator's scale factor and the spherical approximation together contribute a few
|
|
105
|
+
tenths of a percent, and ignoring holes contributes ten times that.
|
|
106
|
+
|
|
107
|
+
89,967 rings are clockwise and 3,516 are counter-clockwise, and 1,309 features carry both windings. Of those,
|
|
108
|
+
1,210 nest their holes inside one polygon part as RFC 7946 expects. The rest put every ring in its own
|
|
109
|
+
`MultiPolygon` part. The largest feature in the country, Meath's `RA - Rural Area`, arrives as 107 single-ring
|
|
110
|
+
parts, of which 5 are clockwise and 102 counter-clockwise. **Both encodings reach the ingest, and orientation is
|
|
111
|
+
the only signal that means the same thing in both.**
|
|
112
|
+
|
|
113
|
+
**Two residual cases are measured and handled instead of rejected.** Nine of the 3,516 holes share their
|
|
114
|
+
parent's boundary instead of sitting inside it. Each is a sliver under 1.7 m², and each is assigned to the
|
|
115
|
+
smallest exterior of its own feature, which on eight of the nine is the feature's only exterior. **Exactly one
|
|
116
|
+
feature of 85,330** has no ring that the rule can read as an exterior: `OBJECTID` 74040, Galway County
|
|
114
117
|
Council's `Agriculture`, a three-vertex ring enclosing 3.0 × 10⁻⁷ m². At that magnitude a ring's winding is
|
|
115
|
-
floating-point noise
|
|
116
|
-
Transverse Mercator meters and counter-clockwise after reprojection
|
|
117
|
-
the exterior, which is also the correct reading for a feature published wholly inverted.
|
|
118
|
-
|
|
118
|
+
floating-point noise and not something the publisher stated. It reads clockwise in the source's own Irish
|
|
119
|
+
Transverse Mercator meters and counter-clockwise after reprojection. The largest ring by magnitude therefore
|
|
120
|
+
becomes the exterior, which is also the correct reading for a feature published wholly inverted. The build
|
|
121
|
+
receipt reports both counts explicitly.
|
|
119
122
|
|
|
120
|
-
The area error is 4.1
|
|
121
|
-
exteriors answers "inside `P5` rural zoning" for every location the plan carved out.
|
|
123
|
+
The area error is 4.1%, and it is the harmless consequence. The harmful consequence is that a ray cast
|
|
124
|
+
treating all 107 rings as exteriors answers "inside `P5` rural zoning" for every location the plan carved out.
|
|
122
125
|
|
|
123
|
-
**GDAL
|
|
124
|
-
writer enforces the RFC 7946 winding
|
|
125
|
-
`--config OGR_ORGANIZE_POLYGONS SKIP`
|
|
126
|
-
counter-clockwise exteriors
|
|
127
|
-
written as CSV/WKT keeps the source's 5/102 split intact.
|
|
126
|
+
**GDAL has no option that preserves this orientation**, so the ingest streams WKT instead of GeoJSON. GDAL's
|
|
127
|
+
GeoJSON writer always enforces the RFC 7946 winding. `-lco RFC7946=NO` is not a GeoJSONSeq option, and
|
|
128
|
+
`--config OGR_ORGANIZE_POLYGONS SKIP` has no effect. Through GeoJSONSeq the Meath feature therefore arrives as
|
|
129
|
+
107 counter-clockwise exteriors totaling 2,371.9 km² against the Department's 2,232.1 km². The same
|
|
130
|
+
conversion written as CSV/WKT keeps the source's 5/102 split intact.
|
|
128
131
|
|
|
129
132
|
### The publisher's own area column is not in the archive
|
|
130
133
|
|
|
131
|
-
`Shape__Area` is a service field and the bulk GeoJSON export drops it
|
|
132
|
-
live service
|
|
133
|
-
itself.
|
|
134
|
+
`Shape__Area` is a service field, and the bulk GeoJSON export drops it. The area cross-check therefore reads
|
|
135
|
+
it from the live service, which makes the check compare two independent paths instead of comparing the
|
|
136
|
+
archive with itself. The measured value is 5,444,492,956.40 m² over 85,330 features.
|
|
134
137
|
|
|
135
138
|
### The definition host has no DNS record
|
|
136
139
|
|
|
137
|
-
All 85,330 rows link their generic type's definition to `viewer.myplan.ie`, which has no A or AAAA record,
|
|
138
|
-
three candidate replacements on the live host answer HTTP 404. The 54 code-to-label pairs survive in the
|
|
139
|
-
service's own coded-value domain
|
|
140
|
-
is NULL on every row
|
|
140
|
+
All 85,330 rows link their generic type's definition to `viewer.myplan.ie`, which has no A or AAAA record,
|
|
141
|
+
and three candidate replacements on the live host answer HTTP 404. The 54 code-to-label pairs survive in the
|
|
142
|
+
service's own coded-value domain, but the **definitions** behind them are lost. `zoning_vocabulary.definition_url`
|
|
143
|
+
is therefore NULL on every row instead of holding a plausible guess.
|
|
141
144
|
|
|
142
145
|
### And two acquisition behaviors
|
|
143
146
|
|
|
144
|
-
- The Hub download job answers `{"status":"Completed","resultUrl":…}` in 249 bytes, and the result URL
|
|
145
|
-
|
|
147
|
+
- The Hub download job answers `{"status":"Completed","resultUrl":…}` in 249 bytes, and the result URL returns
|
|
148
|
+
**302**. The transfer follows redirects. A client that took the first response as the file would write a
|
|
146
149
|
redirect page to disk and report a successful download.
|
|
147
|
-
- The bulk export is **EPSG:2157** (IRENET95 / Irish Transverse Mercator) declared in a top-level `crs` member
|
|
148
|
-
RFC 7946 removed from the format. GDAL
|
|
150
|
+
- The bulk export is **EPSG:2157** (IRENET95 / Irish Transverse Mercator), declared in a top-level `crs` member
|
|
151
|
+
that RFC 7946 removed from the format. GDAL honors the legacy member. A strict reader ignores it and places
|
|
149
152
|
Ireland's zoning at latitude 735,435. The ingest asserts the source's declared authority code before reading
|
|
150
|
-
a feature, and asserts every reprojected vertex inside the Department's own declared extent.
|
|
153
|
+
a feature, and asserts that every reprojected vertex lies inside the Department's own declared extent.
|
|
151
154
|
|
|
152
155
|
## The two tiers
|
|
153
156
|
|
|
154
157
|
`zoning_area` holds the authority's **unsimplified** rings with their hole roles resolved, plus a precomputed
|
|
155
|
-
bounding box
|
|
156
|
-
A probe walks the index first and
|
|
158
|
+
bounding box. `zoning_cell` is an H3 containment index above it, `WITHOUT ROWID`, keyed `(h3_cell, area_id)`.
|
|
159
|
+
A probe walks the index first and reads the geometry only for a cell that a boundary crosses.
|
|
157
160
|
|
|
158
|
-
**The index
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
zoning
|
|
161
|
+
**The index records every cell that touches a polygon, never only cells whose center lies in it**, and a
|
|
162
|
+
feature that reaches no cell fails the build. The measurements require this. `polygonToCells`, the usual
|
|
163
|
+
first choice of polyfill, returns no cells for most of these polygons. Every dropped polygon would appear
|
|
164
|
+
downstream as an absence of zoning, which is exactly the question this layer exists to answer.
|
|
162
165
|
|
|
163
|
-
`zoning_cell` rows are **mixed-resolution
|
|
164
|
-
carries its own `resolution
|
|
165
|
-
holds. `layer_coverage` stays single-resolution.
|
|
166
|
+
`zoning_cell` rows are **mixed-resolution**. Each feature's whole tier is compacted toward parent cells, so a
|
|
167
|
+
row carries its own `resolution`, and a probe walks its own `cellToParent` chain over every resolution the
|
|
168
|
+
table holds. `layer_coverage` stays single-resolution.
|
|
166
169
|
|
|
167
|
-
## The resolution is a measurement, and
|
|
170
|
+
## The resolution is a measurement, and not the one the size interface names
|
|
168
171
|
|
|
169
|
-
The inherited size
|
|
170
|
-
statistic carries no signal**, and
|
|
172
|
+
The inherited size interface picks a resolution from the measured `partial` share. **For this subject that
|
|
173
|
+
statistic carries no signal**, and measurement shows why. Most zoning polygons are smaller than a cell:
|
|
171
174
|
|
|
172
175
|
| percentile | p1 | p5 | p10 | p25 | **p50** | p75 | p90 | p95 | p99 |
|
|
173
176
|
| ---------- | --: | --: | --: | ----: | --------: | -----: | -----: | -----: | ------: |
|
|
@@ -175,11 +178,11 @@ statistic carries no signal**, and the reason was measured. Zoning polygons are
|
|
|
175
178
|
|
|
176
179
|
Against H3 average cell areas (h3-js 4.5.0): res 9 = 105,333 m², res 10 = 15,048 m², res 11 = 2,150 m².
|
|
177
180
|
**95.7% of zoning polygons are smaller than an average res-9 cell**, 75.1% smaller than a res-10 cell and
|
|
178
|
-
34.5% smaller than a res-11 cell
|
|
179
|
-
between them.
|
|
181
|
+
34.5% are smaller than a res-11 cell. The `partial` share therefore sits near 100% at every candidate and
|
|
182
|
+
cannot choose between them.
|
|
180
183
|
|
|
181
|
-
Two numbers can
|
|
182
|
-
|
|
184
|
+
Two other numbers can choose. `mailwoman gazetteer build zoning --measure-resolutions 9,10,11` measures both
|
|
185
|
+
over the full national set:
|
|
183
186
|
|
|
184
187
|
| res | features | polyfill-only zero-cell | stored cell rows | touched cells | candidates/cell mean | p90 | max | cells >1 candidate | partial share | coarsened |
|
|
185
188
|
| ------ | -------: | ----------------------: | ---------------: | ------------: | -------------------: | ----: | --: | -----------------: | ------------: | --------: |
|
|
@@ -187,29 +190,29 @@ Two numbers can, and both are measured over the FULL national set by
|
|
|
187
190
|
| **10** | 85,330 | 48,412 (56.7%) | 237,411 | 426,993 | **1.69** | **3** | 55 | 121,884 (28.5%) | 40.6% | 0 |
|
|
188
191
|
| 11 | 85,330 | 19,224 (22.5%) | 1,121,461 | 1,897,777 | 1.32 | 2 | 23 | 432,969 (22.8%) | 37.0% | 1 |
|
|
189
192
|
|
|
190
|
-
**Resolution 10
|
|
191
|
-
threefold reduction in the geometry a fringe probe reads
|
|
192
|
-
p90 3
|
|
193
|
-
|
|
193
|
+
**Resolution 10 was chosen from those numbers.** A move from 9 to 10 reduces the p90 candidate count from 9 to
|
|
194
|
+
3, a threefold reduction in the geometry a fringe probe reads, for 4.9× the stored rows. A move from 10 to 11
|
|
195
|
+
reduces p90 from 3 to 2 for another 4.7× the rows. The curve bends at 10. The `partial` share (58.0 / 40.6 /
|
|
196
|
+
37.0%) shows no bend at all, which confirms that it is the wrong column to choose on.
|
|
194
197
|
|
|
195
|
-
**The
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
198
|
+
**The polyfill column shows the most dangerous failure.** At resolution 9, `polygonToCells` returns no cells
|
|
199
|
+
for **73,068 of 85,330 polygons (85.6%)**, because no cell center falls inside them. A builder that indexed
|
|
200
|
+
only the polyfill output would silently drop six of every seven zoning polygons, and every dropped polygon
|
|
201
|
+
would appear downstream as "no zoning here". Even at resolution 11 it drops 22.5%. The survey measured 86.8% on
|
|
202
|
+
one urban authority, and the national figure, measured directly, is 85.6%.
|
|
200
203
|
|
|
201
|
-
This index's own zero-cell count is **0 at every resolution
|
|
202
|
-
overlapping containment and throws on a feature that reaches no cell.
|
|
203
|
-
|
|
204
|
+
This index's own zero-cell count is **0 at every resolution** by construction. `classifyFeatureCells` uses
|
|
205
|
+
overlapping containment and throws on a feature that reaches no cell. The allocator budget forces one feature
|
|
206
|
+
(Meath's 2,232 km² rural zone) to be indexed coarser than 11, so the `coarsened` column reads 1 there.
|
|
204
207
|
|
|
205
208
|
## The build, as it ran
|
|
206
209
|
|
|
207
|
-
The full national build on this lab
|
|
210
|
+
The full national build ran on this lab at the chosen resolution 10, with coverage at res 6:
|
|
208
211
|
|
|
209
212
|
| what | measured |
|
|
210
213
|
| ------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
|
|
211
214
|
| acquisition | 247,452,342 bytes in 42.0 s, one anonymous request following the Hub job's redirect |
|
|
212
|
-
| features | **85,330
|
|
215
|
+
| features | **85,330**; the archive, the service's `returnCountOnly` and the build all agree |
|
|
213
216
|
| authorities / plans | **30** local authorities, **63** plans |
|
|
214
217
|
| rings | 93,483 total · 89,967 exterior · 3,516 hole · 3,507 holes nested · **9** on a parent's boundary · **1** exterior by magnitude |
|
|
215
218
|
| cells | 64,273 whole (compacted) + 465,702 partial = **529,975** rows, at resolutions 6/7/8/9/10 · 0 features coarsened |
|
|
@@ -221,7 +224,7 @@ The full national build on this lab, at the chosen resolution 10 with coverage a
|
|
|
221
224
|
| verify (positive) | **48/48 agree** with the live service · 0 within boundary tolerance · 0 disagree · 0 local-code mismatches |
|
|
222
225
|
| verify (negative) | **6/6** Donegal and Northern Irish points read `unknown` with no designation |
|
|
223
226
|
|
|
224
|
-
##
|
|
227
|
+
## Build it
|
|
225
228
|
|
|
226
229
|
```bash
|
|
227
230
|
# The whole country. Downloads the 247 MB export on the first run and caches it under its vintage.
|
|
@@ -234,23 +237,24 @@ mailwoman gazetteer build zoning --export <path> --authority SD
|
|
|
234
237
|
mailwoman gazetteer build zoning --export <path> --measure-resolutions 9,10,11 --offline
|
|
235
238
|
```
|
|
236
239
|
|
|
237
|
-
The build is **batched
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
240
|
+
The build is **batched**, with one child process per range of the authority's own feature ids. h3's WASM heap
|
|
241
|
+
cannot be reset from JavaScript and fails after an unbounded number of polyfill calls. This product's 85,330
|
|
242
|
+
features fit inside the 100,000-id default, but the bound ships anyway, because it guarantees the limit instead
|
|
243
|
+
of relying on the current feature count.
|
|
241
244
|
|
|
242
245
|
## Verification
|
|
243
246
|
|
|
244
247
|
`--verify` runs both halves against the Department's own feature service.
|
|
245
248
|
|
|
246
|
-
**Positive half.**
|
|
247
|
-
sealed artifact and then
|
|
248
|
-
the ingest
|
|
249
|
-
of a service-polygon edge is reported as `boundary_tolerance`
|
|
250
|
-
**to the nearest edge
|
|
249
|
+
**Positive half.** The check answers a deterministic sample of interior points, spread across authorities, from
|
|
250
|
+
the sealed artifact and then asks the live service about the same points. The service's rings get the same
|
|
251
|
+
hole-role resolution that the ingest applied to the archive's rings, so the check compares one verdict against
|
|
252
|
+
another. A point within half a meter of a service-polygon edge is reported as `boundary_tolerance` instead of a
|
|
253
|
+
disagreement, together with its distance **to the nearest edge**. A point a centimeter from a long edge can be
|
|
254
|
+
meters from every vertex of that edge.
|
|
251
255
|
|
|
252
|
-
**Negative half
|
|
253
|
-
points must
|
|
256
|
+
**Negative half. This half matters more here than for any sibling layer.** Donegal points and Northern Irish
|
|
257
|
+
points must return `unknown` with no designation. A positive-only check would pass on an artifact that
|
|
254
258
|
reported the whole island as zoned.
|
|
255
259
|
|
|
256
260
|
## License and posture
|
|
@@ -265,49 +269,51 @@ reported the whole island as zoned.
|
|
|
265
269
|
3. `myplan.ie`'s own disclaimer grants distribution and commercial use, and points at a map-viewer splash
|
|
266
270
|
screen for the operative terms.
|
|
267
271
|
|
|
268
|
-
A shipped layer needs one grant it can quote, and this record does not have one.
|
|
272
|
+
A shipped layer needs one grant that it can quote, and this record does not have one. As a result:
|
|
269
273
|
|
|
270
|
-
- `layer_manifest.license` is **`NOASSERTION
|
|
271
|
-
`CC-BY-4.0` there while an all-rights-reserved clause
|
|
272
|
-
grant.
|
|
274
|
+
- `layer_manifest.license` is **`NOASSERTION`**, SPDX's own token for a determination nobody has made. A `CC-BY-4.0` value
|
|
275
|
+
`CC-BY-4.0` there while an all-rights-reserved clause identifies a licensor would mean this program asserting
|
|
276
|
+
a grant.
|
|
273
277
|
- `layer_manifest.tier` is **`build-local`**, and `assertTierMatchesLicense` refuses a `shipped` build while the
|
|
274
|
-
license reads `NOASSERTION`.
|
|
275
|
-
|
|
276
|
-
|
|
278
|
+
license reads `NOASSERTION`. A tier change requires a deliberate edit at a line that states what is
|
|
279
|
+
unresolved.
|
|
280
|
+
- `layer_manifest.attribution` carries **both parts**, the Department's credit line and the Tailte Éireann
|
|
281
|
+
clause, because a re-user who saw only the first would not know that the second exists.
|
|
277
282
|
|
|
278
|
-
**What would change it:**
|
|
279
|
-
of conditions of use please see map viewer splash screen"), and that splash text was not retrieved. Two
|
|
280
|
-
instant-app configurations linked from the viewer page were read and neither
|
|
281
|
-
the single fact that would move this layer from `build-local` to `shipped`.
|
|
283
|
+
**What would change it:** The myplan.ie disclaimer points to a fourth statement as authoritative ("For full
|
|
284
|
+
details of conditions of use please see map viewer splash screen"), and that splash text was not retrieved. Two
|
|
285
|
+
ArcGIS instant-app configurations linked from the viewer page were read, and neither belongs to the zoning
|
|
286
|
+
viewer. The splash text is the single fact that would move this layer from `build-local` to `shipped`.
|
|
282
287
|
|
|
283
|
-
The npm
|
|
284
|
-
workspace list. The `build-local` tier
|
|
288
|
+
The npm package is unaffected. `@mailwoman/zoning` publishes with every release from `.release-it.json`'s
|
|
289
|
+
workspace list. The `build-local` tier applies to the data alone.
|
|
285
290
|
|
|
286
291
|
## The mapped-footprint question — what is settled, and what would change it
|
|
287
292
|
|
|
288
|
-
`zoning_mapped_extent` ships **empty**,
|
|
289
|
-
some Local Authorities - please see map viewer for coverage details" and publishes that
|
|
290
|
-
application. Donegal's absence was
|
|
291
|
-
whether other authorities are partially
|
|
293
|
+
`zoning_mapped_extent` ships **empty**, which records that no mapped footprint is known. The Department states
|
|
294
|
+
"Awaiting data for some Local Authorities - please see map viewer for coverage details" and publishes that
|
|
295
|
+
detail only inside a map application. Donegal's absence was found by measuring `LA_CODE`, not read from a
|
|
296
|
+
coverage statement. It is unknown whether other authorities are only partially represented.
|
|
292
297
|
|
|
293
|
-
**
|
|
294
|
-
forbids it
|
|
295
|
-
|
|
296
|
-
national zoned-area figure by 41%, because Meath County Council zones its entire
|
|
297
|
-
polygon against 32.5 km² for the next largest in the country.
|
|
298
|
+
**A footprint derived from the union of the zoning polygons is forbidden**, for the same reason the flood layer
|
|
299
|
+
forbids it. The union of zoned areas differs from the area the authority examined, and that difference is
|
|
300
|
+
exactly what a negative answer would need to report. The union is not even a stable shape here. One authority's
|
|
301
|
+
drafting convention changes the national zoned-area figure by 41%, because Meath County Council zones its entire
|
|
302
|
+
rural remainder as one 2,232 km² polygon, against 32.5 km² for the next largest polygon in the country.
|
|
298
303
|
|
|
299
|
-
|
|
300
|
-
|
|
304
|
+
The Department would need to publish a statement of the area it mapped, together with its geometry, before this
|
|
305
|
+
layer could move from `source_present` to a stronger basis.
|
|
301
306
|
|
|
302
307
|
## Consumer
|
|
303
308
|
|
|
304
309
|
`packages/mailwoman/lib/observations/zoning-route.ts` reads a finished coordinate and records what an adopted plan
|
|
305
|
-
assigns there, as one additive `authority_designation` marker with `mechanism: layer:zoning`. **
|
|
306
|
-
|
|
307
|
-
file
|
|
310
|
+
assigns there, as one additive `authority_designation` marker with `mechanism: layer:zoning`. **The route is off
|
|
311
|
+
by default and turns on when `$MAILWOMAN_DATA_ROOT/db/zoning/zoning-ireland.db` exists.** The file's presence is the only switch.
|
|
312
|
+
Without the layer file the route does not run, and the geocode result is byte-identical to a build without the
|
|
313
|
+
field.
|
|
308
314
|
|
|
309
315
|
## See also
|
|
310
316
|
|
|
311
|
-
- The survey that produced this layer: `docs/superpowers/specs/2026-08-27-zoning-layer-survey.md
|
|
312
|
-
- The layer
|
|
313
|
-
- The runtime-flag register: `docs/engineering/reference/runtime-flags.mdx
|
|
317
|
+
- The survey that produced this layer: `docs/superpowers/specs/2026-08-27-zoning-layer-survey.md`.
|
|
318
|
+
- The layer interface: `docs/engineering/reference/layer-interface.mdx`.
|
|
319
|
+
- The runtime-flag register: `docs/engineering/reference/runtime-flags.mdx`.
|