@mailwoman/zoning 9.4.0 → 10.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +169 -163
- package/lib/index.ts +89 -120
- package/lib/paths.ts +24 -0
- package/lib/ring-roles.ts +30 -71
- package/lib/rings.ts +2 -13
- package/lib/schema.ts +96 -114
- package/lib/vocabulary.ts +52 -130
- package/out/index.d.ts +75 -95
- package/out/index.d.ts.map +1 -1
- package/out/index.js +25 -82
- package/out/index.js.map +1 -1
- package/out/paths.d.ts +19 -0
- package/out/paths.d.ts.map +1 -0
- package/out/paths.js +21 -0
- package/out/paths.js.map +1 -0
- package/out/ring-roles.d.ts +16 -50
- package/out/ring-roles.d.ts.map +1 -1
- package/out/ring-roles.js +18 -51
- package/out/ring-roles.js.map +1 -1
- package/out/rings.d.ts +2 -13
- package/out/rings.d.ts.map +1 -1
- package/out/rings.js +2 -13
- package/out/rings.js.map +1 -1
- package/out/schema.d.ts +93 -108
- package/out/schema.d.ts.map +1 -1
- package/out/schema.js +16 -44
- package/out/schema.js.map +1 -1
- package/out/sdk/build-zoning.d.ts +58 -111
- package/out/sdk/build-zoning.d.ts.map +1 -1
- package/out/sdk/build-zoning.js +48 -137
- package/out/sdk/build-zoning.js.map +1 -1
- package/out/sdk/cells.d.ts +20 -61
- package/out/sdk/cells.d.ts.map +1 -1
- package/out/sdk/cells.js +13 -50
- package/out/sdk/cells.js.map +1 -1
- package/out/sdk/client.d.ts +23 -67
- package/out/sdk/client.d.ts.map +1 -1
- package/out/sdk/client.js +29 -77
- package/out/sdk/client.js.map +1 -1
- package/out/sdk/download.d.ts +7 -27
- package/out/sdk/download.d.ts.map +1 -1
- package/out/sdk/download.js +7 -27
- package/out/sdk/download.js.map +1 -1
- package/out/sdk/ingest/chunk.d.ts +106 -0
- package/out/sdk/ingest/chunk.d.ts.map +1 -0
- package/out/sdk/{ingest-chunk.js → ingest/chunk.js} +17 -50
- package/out/sdk/ingest/chunk.js.map +1 -0
- package/out/sdk/ingest/worker.d.ts +9 -0
- package/out/sdk/ingest/worker.d.ts.map +1 -0
- package/out/{scripts/ingest-chunk.js → sdk/ingest/worker.js} +5 -7
- package/out/sdk/ingest/worker.js.map +1 -0
- package/out/sdk/ingest.d.ts +54 -77
- package/out/sdk/ingest.d.ts.map +1 -1
- package/out/sdk/ingest.js +50 -87
- package/out/sdk/ingest.js.map +1 -1
- package/out/sdk/measure-resolutions.d.ts +6 -23
- package/out/sdk/measure-resolutions.d.ts.map +1 -1
- package/out/sdk/measure-resolutions.js +4 -21
- package/out/sdk/measure-resolutions.js.map +1 -1
- package/out/sdk/test-kit.d.ts +75 -0
- package/out/sdk/test-kit.d.ts.map +1 -0
- package/out/{test-kit.js → sdk/test-kit.js} +20 -43
- package/out/sdk/test-kit.js.map +1 -0
- package/out/sdk/verify.d.ts +74 -56
- package/out/sdk/verify.d.ts.map +1 -1
- package/out/sdk/verify.js +70 -57
- package/out/sdk/verify.js.map +1 -1
- package/out/vocabulary.d.ts +52 -120
- package/out/vocabulary.d.ts.map +1 -1
- package/out/vocabulary.js +47 -125
- package/out/vocabulary.js.map +1 -1
- package/package.json +37 -161
- package/{lib/sdk → sdk}/build-zoning.ts +100 -186
- package/{lib/sdk → sdk}/cells.ts +24 -63
- package/{lib/sdk → sdk}/client.ts +34 -82
- package/sdk/download.ts +58 -0
- package/{lib/sdk/ingest-chunk.ts → sdk/ingest/chunk.ts} +32 -61
- package/{lib/scripts/ingest-chunk.ts → sdk/ingest/worker.ts} +4 -6
- package/sdk/ingest.ts +366 -0
- package/{lib/sdk → sdk}/measure-resolutions.ts +8 -25
- package/{lib → sdk}/test-kit.ts +20 -43
- package/{lib/sdk → sdk}/verify.ts +102 -75
- package/lib/sdk/download.ts +0 -78
- package/lib/sdk/index.ts +0 -15
- package/lib/sdk/ingest.ts +0 -398
- package/out/scripts/ingest-chunk.d.ts +0 -11
- package/out/scripts/ingest-chunk.d.ts.map +0 -1
- package/out/scripts/ingest-chunk.js.map +0 -1
- package/out/sdk/index.d.ts +0 -15
- package/out/sdk/index.d.ts.map +0 -1
- package/out/sdk/index.js +0 -15
- package/out/sdk/index.js.map +0 -1
- package/out/sdk/ingest-chunk.d.ts +0 -130
- package/out/sdk/ingest-chunk.d.ts.map +0 -1
- package/out/sdk/ingest-chunk.js.map +0 -1
- package/out/test-kit.d.ts +0 -96
- package/out/test-kit.d.ts.map +0 -1
- package/out/test-kit.js.map +0 -1
package/out/test-kit.d.ts
DELETED
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @copyright Sister Software
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
-
*
|
|
6
|
-
* `@mailwoman/zoning/test-kit` — hand-built geometry for the fixture rung: zones in two plans over the same
|
|
7
|
-
* ground, one with a hole encoded the way this service encodes them, one smaller than a cell, and one the
|
|
8
|
-
* authority states as UNZONED.
|
|
9
|
-
*
|
|
10
|
-
* A PACKAGE SUBPATH RATHER THAN A `test/` FILE, for the same reason `packages/mailwoman/lib/test-kit` is one:
|
|
11
|
-
* the observation route's suite lives in another workspace, and a relative import across two TypeScript
|
|
12
|
-
* projects is refused outright (`TS2878`) because the compiled layout would not match the source layout.
|
|
13
|
-
*
|
|
14
|
-
* NO NETWORK AND NO GDAL. The builder takes a {@linkcode ZoningFeatureSource}, so a fixture is a list of
|
|
15
|
-
* features — which is what lets this rung exercise the ring-role resolution, the vocabulary census, the cell
|
|
16
|
-
* classification, the coverage rows, the manifest and the seal on every machine rather than only the ones
|
|
17
|
-
* with ogr2ogr.
|
|
18
|
-
*
|
|
19
|
-
* THE EXTERIOR RING IS THE CLOCKWISE ONE, WHICH IS THE INVERSE OF THE GEOJSON CONVENTION AND OF EVERY
|
|
20
|
-
* SIBLING FIXTURE. `@mailwoman/spatial`'s `rectangleRing` winds counter-clockwise and its `reversedRing`
|
|
21
|
-
* clockwise, so this file aliases them the other way round from the flood and coastal test kits: under this
|
|
22
|
-
* service a clockwise ring is the EXTERIOR and a counter-clockwise one is a HOLE. A fixture that used the
|
|
23
|
-
* sibling naming would build geometry the ingest reads inside-out, and every assertion on it would pass.
|
|
24
|
-
*
|
|
25
|
-
* THE COORDINATES ARE IN THE IRISH SEA east of Dublin — inside the Department's declared extent, so a
|
|
26
|
-
* fixture stays in the coordinate space the product occupies, and clear of every real zoning polygon.
|
|
27
|
-
*/
|
|
28
|
-
import { rectangleRing as counterClockwiseRing, reversedRing as clockwiseRing, type MultiPolygonRings } from "@mailwoman/spatial";
|
|
29
|
-
import type { ZoningFeatureSource, ZoningSourceFeature } from "#sdk/ingest";
|
|
30
|
-
/**
|
|
31
|
-
* The exterior ring builder, under THIS service's convention. Clockwise.
|
|
32
|
-
*/
|
|
33
|
-
export declare const exteriorRing: typeof clockwiseRing;
|
|
34
|
-
/**
|
|
35
|
-
* The hole ring builder, under THIS service's convention. Counter-clockwise.
|
|
36
|
-
*/
|
|
37
|
-
export declare const holeRing: typeof counterClockwiseRing;
|
|
38
|
-
/**
|
|
39
|
-
* South-west corner of the fixture world, in the Irish Sea east of Dublin.
|
|
40
|
-
*/
|
|
41
|
-
export declare const FIXTURE_ORIGIN: {
|
|
42
|
-
readonly lon: -5.99;
|
|
43
|
-
readonly lat: 53.3;
|
|
44
|
-
};
|
|
45
|
-
/**
|
|
46
|
-
* Side of a fixture zone, in degrees. About 1.1 km at this latitude — several res-10 cells across, so a zone has a real
|
|
47
|
-
* interior AND a real fringe.
|
|
48
|
-
*/
|
|
49
|
-
export declare const FIXTURE_SIDE = 0.01;
|
|
50
|
-
/**
|
|
51
|
-
* The fixture authority and its two plans.
|
|
52
|
-
*/
|
|
53
|
-
export declare const FIXTURE_AUTHORITY: {
|
|
54
|
-
readonly code: "Fx";
|
|
55
|
-
readonly name: "Fixture County Council";
|
|
56
|
-
};
|
|
57
|
-
/**
|
|
58
|
-
* The two plans the fixture set uses, shaped like the real product's: a Development Plan and a Local Area Plan, each
|
|
59
|
-
* with its own stated window, both able to zone the same ground.
|
|
60
|
-
*
|
|
61
|
-
* The dates are in the source's own RFC 1123 form, because that is what the export publishes and this layer carries
|
|
62
|
-
* them as published rather than re-formatting them.
|
|
63
|
-
*/
|
|
64
|
-
export declare const FIXTURE_PLANS: {
|
|
65
|
-
readonly development: {
|
|
66
|
-
readonly id: "FX-DP-2024";
|
|
67
|
-
readonly name: "Fixture County Development Plan 2024-2030";
|
|
68
|
-
readonly level: "DP";
|
|
69
|
-
readonly from: "Mon, 01 Jan 2024 00:00:00 GMT";
|
|
70
|
-
readonly to: "Sun, 31 Dec 2030 00:00:00 GMT";
|
|
71
|
-
};
|
|
72
|
-
readonly localArea: {
|
|
73
|
-
readonly id: "FX-LAP-2022";
|
|
74
|
-
readonly name: "Fixture Town Local Area Plan 2022-2028";
|
|
75
|
-
readonly level: "LAP";
|
|
76
|
-
readonly from: "Sat, 01 Jan 2022 00:00:00 GMT";
|
|
77
|
-
readonly to: "Sun, 31 Dec 2028 00:00:00 GMT";
|
|
78
|
-
};
|
|
79
|
-
};
|
|
80
|
-
/**
|
|
81
|
-
* One fixture feature, with its rings resolved the way the real ingest resolves them.
|
|
82
|
-
*/
|
|
83
|
-
export declare function fixtureFeature(objectID: number, polygons: MultiPolygonRings, overrides?: Partial<Omit<ZoningSourceFeature, "rings">>): ZoningSourceFeature;
|
|
84
|
-
/**
|
|
85
|
-
* The fixture set: two adjacent zones, one of them holed the way this service encodes holes; a second plan over the
|
|
86
|
-
* SAME ground as the first; a zone smaller than a cell; and a zone the authority states as unzoned.
|
|
87
|
-
*
|
|
88
|
-
* THE OVERLAP BETWEEN PLANS IS THE POINT. A point inside the first zone must answer with BOTH rows, each naming its own
|
|
89
|
-
* plan — which is what proves a plan is part of the claim rather than a parameter of it.
|
|
90
|
-
*/
|
|
91
|
-
export declare function fixtureFeatures(): ZoningSourceFeature[];
|
|
92
|
-
/**
|
|
93
|
-
* A feature source over an explicit feature list.
|
|
94
|
-
*/
|
|
95
|
-
export declare function fixtureSource(features: ZoningSourceFeature[]): ZoningFeatureSource;
|
|
96
|
-
//# sourceMappingURL=test-kit.d.ts.map
|
package/out/test-kit.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"test-kit.d.ts","sourceRoot":"","sources":["../lib/test-kit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EACN,aAAa,IAAI,oBAAoB,EACrC,YAAY,IAAI,aAAa,EAC7B,KAAK,iBAAiB,EACtB,MAAM,oBAAoB,CAAA;AAG3B,OAAO,KAAK,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAG3E;;GAEG;AACH,eAAO,MAAM,YAAY,sBAAgB,CAAA;AAEzC;;GAEG;AACH,eAAO,MAAM,QAAQ,6BAAuB,CAAA;AAE5C;;GAEG;AACH,eAAO,MAAM,cAAc;;;CAAqC,CAAA;AAEhE;;;GAGG;AACH,eAAO,MAAM,YAAY,OAAO,CAAA;AAEhC;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;CAA0D,CAAA;AAExF;;;;;;GAMG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;CAehB,CAAA;AAEV;;GAEG;AACH,wBAAgB,cAAc,CAC7B,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,iBAAiB,EAC3B,SAAS,GAAE,OAAO,CAAC,IAAI,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAM,GACzD,mBAAmB,CAwBrB;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,IAAI,mBAAmB,EAAE,CAoEvD;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,mBAAmB,EAAE,GAAG,mBAAmB,CASlF"}
|
package/out/test-kit.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"test-kit.js","sourceRoot":"","sources":["../lib/test-kit.ts"],"names":[],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