@basemaps/cli-vector 8.1.0 → 8.3.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.
Files changed (98) hide show
  1. package/build/bin.js +2 -2
  2. package/build/cli/cli.analyse.d.ts +34 -0
  3. package/build/cli/cli.analyse.js +152 -0
  4. package/build/cli/cli.analyse.js.map +1 -0
  5. package/build/cli/cli.create.d.ts +39 -0
  6. package/build/cli/cli.create.js +211 -0
  7. package/build/cli/cli.create.js.map +1 -0
  8. package/build/cli/cli.extract.d.ts +8 -17
  9. package/build/cli/cli.extract.js +43 -33
  10. package/build/cli/cli.extract.js.map +1 -1
  11. package/build/cli/cli.join.d.ts +44 -0
  12. package/build/cli/cli.join.js +149 -0
  13. package/build/cli/cli.join.js.map +1 -0
  14. package/build/extract.js.map +1 -0
  15. package/build/generalization/generalization.d.ts +10 -0
  16. package/build/generalization/generalization.js +168 -0
  17. package/build/generalization/generalization.js.map +1 -0
  18. package/build/generalization/simplify.d.ts +2 -0
  19. package/build/generalization/simplify.js +80 -0
  20. package/build/generalization/simplify.js.map +1 -0
  21. package/build/index.d.ts +83 -5
  22. package/build/index.js +7 -1
  23. package/build/index.js.map +1 -1
  24. package/build/modify/consts.d.ts +1 -0
  25. package/build/modify/consts.js +23 -0
  26. package/build/modify/consts.js.map +1 -0
  27. package/build/modify/layers/__test__/contours.test.d.ts +1 -0
  28. package/build/modify/layers/__test__/contours.test.js +59 -0
  29. package/build/modify/layers/__test__/contours.test.js.map +1 -0
  30. package/build/modify/layers/contours.d.ts +28 -0
  31. package/build/modify/layers/contours.js +90 -0
  32. package/build/modify/layers/contours.js.map +1 -0
  33. package/build/modify/layers/place_labels.d.ts +18 -0
  34. package/build/modify/layers/place_labels.js +117 -0
  35. package/build/modify/layers/place_labels.js.map +1 -0
  36. package/build/modify/layers/pois.d.ts +11 -0
  37. package/build/modify/layers/pois.js +32 -0
  38. package/build/modify/layers/pois.js.map +1 -0
  39. package/build/modify/layers/public_transport.d.ts +12 -0
  40. package/build/modify/layers/public_transport.js +41 -0
  41. package/build/modify/layers/public_transport.js.map +1 -0
  42. package/build/modify/layers/street_labels.d.ts +12 -0
  43. package/build/modify/layers/street_labels.js +34 -0
  44. package/build/modify/layers/street_labels.js.map +1 -0
  45. package/build/modify/layers/streets.d.ts +12 -0
  46. package/build/modify/layers/streets.js +72 -0
  47. package/build/modify/layers/streets.js.map +1 -0
  48. package/build/modify/layers/water.d.ts +13 -0
  49. package/build/modify/layers/water.js +82 -0
  50. package/build/modify/layers/water.js.map +1 -0
  51. package/build/modify/modify.d.ts +11 -0
  52. package/build/modify/modify.js +49 -0
  53. package/build/modify/modify.js.map +1 -0
  54. package/build/modify/parser.d.ts +47 -0
  55. package/build/modify/parser.js +24 -0
  56. package/build/modify/parser.js.map +1 -0
  57. package/build/modify/schema.d.ts +17 -0
  58. package/build/modify/schema.js +2 -0
  59. package/build/modify/schema.js.map +1 -0
  60. package/build/modify/shared.d.ts +7 -0
  61. package/build/modify/shared.js +53 -0
  62. package/build/modify/shared.js.map +1 -0
  63. package/build/schema-loader/parser.d.ts +16 -0
  64. package/build/schema-loader/parser.js +2 -0
  65. package/build/schema-loader/parser.js.map +1 -1
  66. package/build/schema-loader/schema.d.ts +21 -5
  67. package/build/schema-loader/schema.loader.d.ts +3 -1
  68. package/build/schema-loader/schema.loader.js +18 -6
  69. package/build/schema-loader/schema.loader.js.map +1 -1
  70. package/build/stac.d.ts +41 -0
  71. package/build/stac.js +185 -0
  72. package/build/stac.js.map +1 -0
  73. package/build/transform/covt.d.ts +5 -0
  74. package/build/transform/covt.js +23 -0
  75. package/build/transform/covt.js.map +1 -0
  76. package/build/transform/mbtiles.to.ttiles.d.ts +14 -0
  77. package/build/transform/mbtiles.to.ttiles.js +60 -0
  78. package/build/transform/mbtiles.to.ttiles.js.map +1 -0
  79. package/build/transform/nztm.d.ts +4 -0
  80. package/build/transform/nztm.js +13 -0
  81. package/build/transform/nztm.js.map +1 -0
  82. package/build/transform/ogr2ogr.d.ts +9 -0
  83. package/build/transform/ogr2ogr.js +43 -0
  84. package/build/transform/ogr2ogr.js.map +1 -0
  85. package/build/transform/tippecanoe.d.ts +15 -0
  86. package/build/transform/tippecanoe.js +69 -0
  87. package/build/transform/tippecanoe.js.map +1 -0
  88. package/build/types/VectorGeoFeature.d.ts +9 -0
  89. package/build/types/VectorGeoFeature.js +2 -0
  90. package/build/types/VectorGeoFeature.js.map +1 -0
  91. package/build/util.d.ts +35 -0
  92. package/build/util.js +43 -0
  93. package/build/util.js.map +1 -0
  94. package/dist/index.cjs +20809 -9550
  95. package/package.json +23 -8
  96. package/build/extract/extract.js.map +0 -1
  97. /package/build/{extract/extract.d.ts → extract.d.ts} +0 -0
  98. /package/build/{extract/extract.js → extract.js} +0 -0
@@ -0,0 +1,34 @@
1
+ import { handleRoadFeature } from '../shared.js';
2
+ /**
3
+ * Processes a 'street_labels' layer feature.
4
+ *
5
+ * @param feature - the feature to process
6
+ * @param options - the layer's options
7
+ * @param logger - a logger instance
8
+ * @returns the processed feature
9
+ */
10
+ export function handleLayerStreetLabels(feature, options, logger) {
11
+ logger.trace({}, 'HandleStreetLabels:Start');
12
+ const kind = options.layer.tags['kind'];
13
+ switch (kind) {
14
+ case 'road':
15
+ feature = handleKindRoad(feature, options, logger);
16
+ break;
17
+ }
18
+ logger.trace({}, 'HandleStreetLabels:End');
19
+ return feature;
20
+ }
21
+ /**
22
+ * Processes a 'street_labels' layer feature with a 'kind' value of 'road'.
23
+ *
24
+ * @param feature - the feature to process
25
+ * @param logger - a logger instance
26
+ * @returns the processed feature
27
+ */
28
+ function handleKindRoad(feature, options, logger) {
29
+ logger.trace({}, 'HandleKindRoad:Start');
30
+ feature = handleRoadFeature(feature, options, logger);
31
+ logger.trace({}, 'HandleKindRoad:End');
32
+ return feature;
33
+ }
34
+ //# sourceMappingURL=street_labels.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"street_labels.js","sourceRoot":"","sources":["../../../src/modify/layers/street_labels.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEjD;;;;;;;GAOG;AACH,MAAM,UAAU,uBAAuB,CACrC,OAAyB,EACzB,OAA8B,EAC9B,MAAe;IAEf,MAAM,CAAC,KAAK,CAAC,EAAE,EAAE,0BAA0B,CAAC,CAAC;IAC7C,MAAM,IAAI,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAExC,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,MAAM;YACT,OAAO,GAAG,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;YACnD,MAAM;IACV,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,EAAE,EAAE,wBAAwB,CAAC,CAAC;IAC3C,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;;;;;GAMG;AACH,SAAS,cAAc,CAAC,OAAyB,EAAE,OAA8B,EAAE,MAAe;IAChG,MAAM,CAAC,KAAK,CAAC,EAAE,EAAE,sBAAsB,CAAC,CAAC;IACzC,OAAO,GAAG,iBAAiB,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IAEtD,MAAM,CAAC,KAAK,CAAC,EAAE,EAAE,oBAAoB,CAAC,CAAC;IACvC,OAAO,OAAO,CAAC;AACjB,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { LogType } from '@basemaps/shared';
2
+ import { VectorCreationOptions } from '../../stac.js';
3
+ import { VectorGeoFeature } from '../../types/VectorGeoFeature.js';
4
+ /**
5
+ * Processes a 'streets' layer feature.
6
+ *
7
+ * @param feature - the feature to process
8
+ * @param options - the layer's options
9
+ * @param logger - a logger instance
10
+ * @returns the processed feature
11
+ */
12
+ export declare function handleLayerStreets(feature: VectorGeoFeature, options: VectorCreationOptions, logger: LogType): VectorGeoFeature;
@@ -0,0 +1,72 @@
1
+ import { handleRoadFeature } from '../shared.js';
2
+ /**
3
+ * Processes a 'streets' layer feature.
4
+ *
5
+ * @param feature - the feature to process
6
+ * @param options - the layer's options
7
+ * @param logger - a logger instance
8
+ * @returns the processed feature
9
+ */
10
+ export function handleLayerStreets(feature, options, logger) {
11
+ logger.trace({}, 'HandleStreets:Start');
12
+ feature = structuredClone(feature);
13
+ const kind = options.layer.tags['kind'];
14
+ switch (kind) {
15
+ case 'road':
16
+ feature = handleKindRoad(feature, options, logger);
17
+ break;
18
+ case 'track':
19
+ feature = handleKindTrack(feature, logger);
20
+ break;
21
+ }
22
+ Object.entries(feature.properties).forEach(([key, value]) => {
23
+ // Update bridge and tunnel to boolean
24
+ if (value === 'true') {
25
+ feature.properties[key] = true;
26
+ }
27
+ else if (value === 'false') {
28
+ feature.properties[key] = false;
29
+ }
30
+ });
31
+ logger.trace({}, 'HandleStreets:End');
32
+ return feature;
33
+ }
34
+ /**
35
+ * Processes a 'streets' layer feature with a 'kind' value of 'road'.
36
+ *
37
+ * @param feature - the feature to process
38
+ * @param logger - a logger instance
39
+ * @returns the processed feature
40
+ */
41
+ function handleKindRoad(feature, options, logger) {
42
+ logger.trace({}, 'HandleKindRoad:Start');
43
+ feature = handleRoadFeature(feature, options, logger);
44
+ logger.trace({}, 'HandleKindRoad:End');
45
+ return feature;
46
+ }
47
+ /**
48
+ * Processes a 'streets' layer feature with a 'kind' value of 'track'.
49
+ *
50
+ * @param feature - the feature to process
51
+ * @param logger - a logger instance
52
+ * @returns the processed feature
53
+ */
54
+ function handleKindTrack(feature, logger) {
55
+ logger.trace({}, 'HandleKindTrack:Start');
56
+ feature = structuredClone(feature);
57
+ // calculate the 'subclass' property
58
+ let subclass = feature.properties['track_use'];
59
+ const trackType = feature.properties['track_type'];
60
+ if (trackType != null)
61
+ subclass += `_${trackType}`;
62
+ const status = feature.properties['status'];
63
+ if (status != null)
64
+ subclass += `_${status}`;
65
+ // append/override tags
66
+ feature.properties['subclass'] = subclass;
67
+ logger.trace({ subclass }, 'new/overidden tags');
68
+ // return feature
69
+ logger.trace({}, 'HandleKindTrack:End');
70
+ return feature;
71
+ }
72
+ //# sourceMappingURL=streets.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"streets.js","sourceRoot":"","sources":["../../../src/modify/layers/streets.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEjD;;;;;;;GAOG;AACH,MAAM,UAAU,kBAAkB,CAChC,OAAyB,EACzB,OAA8B,EAC9B,MAAe;IAEf,MAAM,CAAC,KAAK,CAAC,EAAE,EAAE,qBAAqB,CAAC,CAAC;IACxC,OAAO,GAAG,eAAe,CAAC,OAAO,CAAC,CAAC;IACnC,MAAM,IAAI,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAExC,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,MAAM;YACT,OAAO,GAAG,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;YACnD,MAAM;QACR,KAAK,OAAO;YACV,OAAO,GAAG,eAAe,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;YAC3C,MAAM;IACV,CAAC;IAED,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;QAC1D,sCAAsC;QACtC,IAAI,KAAK,KAAK,MAAM,EAAE,CAAC;YACrB,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;QACjC,CAAC;aAAM,IAAI,KAAK,KAAK,OAAO,EAAE,CAAC;YAC7B,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;QAClC,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,MAAM,CAAC,KAAK,CAAC,EAAE,EAAE,mBAAmB,CAAC,CAAC;IACtC,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;;;;;GAMG;AACH,SAAS,cAAc,CAAC,OAAyB,EAAE,OAA8B,EAAE,MAAe;IAChG,MAAM,CAAC,KAAK,CAAC,EAAE,EAAE,sBAAsB,CAAC,CAAC;IACzC,OAAO,GAAG,iBAAiB,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IAEtD,MAAM,CAAC,KAAK,CAAC,EAAE,EAAE,oBAAoB,CAAC,CAAC;IACvC,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;;;;;GAMG;AACH,SAAS,eAAe,CAAC,OAAyB,EAAE,MAAe;IACjE,MAAM,CAAC,KAAK,CAAC,EAAE,EAAE,uBAAuB,CAAC,CAAC;IAC1C,OAAO,GAAG,eAAe,CAAC,OAAO,CAAC,CAAC;IAEnC,oCAAoC;IACpC,IAAI,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;IAE/C,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;IACnD,IAAI,SAAS,IAAI,IAAI;QAAE,QAAQ,IAAI,IAAI,SAAS,EAAE,CAAC;IAEnD,MAAM,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;IAC5C,IAAI,MAAM,IAAI,IAAI;QAAE,QAAQ,IAAI,IAAI,MAAM,EAAE,CAAC;IAE7C,uBAAuB;IACvB,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,GAAG,QAAQ,CAAC;IAC1C,MAAM,CAAC,KAAK,CAAC,EAAE,QAAQ,EAAE,EAAE,oBAAoB,CAAC,CAAC;IAEjD,iBAAiB;IACjB,MAAM,CAAC,KAAK,CAAC,EAAE,EAAE,qBAAqB,CAAC,CAAC;IACxC,OAAO,OAAO,CAAC;AACjB,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { LogType } from '@basemaps/shared';
2
+ import { VectorCreationOptions } from '../../stac.js';
3
+ import { VectorGeoFeature } from '../../types/VectorGeoFeature.js';
4
+ export declare const LargeLakeSize = 4000000;
5
+ /**
6
+ * Processes a 'water_lines' or 'water_polygons' layer feature.
7
+ *
8
+ * @param feature - the feature to process
9
+ * @param options - the layer's options
10
+ * @param logger - a logger instance
11
+ * @returns the processed feature
12
+ */
13
+ export declare function handleLayerWater(feature: VectorGeoFeature, options: VectorCreationOptions, logger: LogType): VectorGeoFeature;
@@ -0,0 +1,82 @@
1
+ export const LargeLakeSize = 4_000_000;
2
+ /**
3
+ * Processes a 'water_lines' or 'water_polygons' layer feature.
4
+ *
5
+ * @param feature - the feature to process
6
+ * @param options - the layer's options
7
+ * @param logger - a logger instance
8
+ * @returns the processed feature
9
+ */
10
+ export function handleLayerWater(feature, options, logger) {
11
+ logger.trace({}, 'HandleWaterPolygons:Start');
12
+ feature = structuredClone(feature);
13
+ const kind = options.layer.tags['kind'];
14
+ switch (kind) {
15
+ case 'water':
16
+ feature = handleKindWater(feature, logger);
17
+ break;
18
+ case 'river':
19
+ feature = handleKindRiver(feature, options, logger);
20
+ break;
21
+ }
22
+ const orientatn = feature.properties['orientatn'];
23
+ if (orientatn != null) {
24
+ const direction = orientatn;
25
+ feature.properties['direction'] = direction;
26
+ logger.trace({ direction }, 'new/overidden tags');
27
+ }
28
+ logger.trace({}, 'HandleWaterPolygons:End');
29
+ return feature;
30
+ }
31
+ /**
32
+ * Processes a 'water_polygons' layer feature with a 'kind' value of 'water'.
33
+ *
34
+ * @param feature - the feature to process
35
+ * @param logger - a logger instance
36
+ * @returns the processed feature
37
+ */
38
+ function handleKindWater(feature, logger) {
39
+ logger.trace({}, 'HandleKindWater:Start');
40
+ feature = structuredClone(feature);
41
+ const name = feature.properties['name'];
42
+ if (name == null) {
43
+ // inherit the lake's name from the feature's 'grp_name' property
44
+ const grpName = feature.properties['grp_name'];
45
+ feature.properties['name'] = grpName;
46
+ logger.trace({ name: grpName }, 'new/overidden tags');
47
+ }
48
+ // determine if the lake is large
49
+ if (feature.properties['water'] === 'lake') {
50
+ const aera = feature.properties['_derived_area'];
51
+ if (aera != null && Number(aera) >= LargeLakeSize) {
52
+ feature.tippecanoe.minzoom = 1;
53
+ }
54
+ else {
55
+ feature.tippecanoe.minzoom = 9;
56
+ }
57
+ }
58
+ logger.trace({}, 'HandleKindWater:End');
59
+ return feature;
60
+ }
61
+ /**
62
+ * Processes a 'water_polygons' layer feature with a 'kind' value of 'river'.
63
+ *
64
+ * @param feature - the feature to process
65
+ * @param logger - a logger instance
66
+ * @returns the processed feature
67
+ */
68
+ function handleKindRiver(feature, options, logger) {
69
+ logger.trace({}, 'HandleKindRiver:Start');
70
+ feature = structuredClone(feature);
71
+ if (options.layer.style.minZoom < 11) {
72
+ const name = feature.properties['name'];
73
+ if (name === '' && feature.tippecanoe.minzoom < 11) {
74
+ const minzoom = 11;
75
+ feature.tippecanoe.minzoom = minzoom;
76
+ logger.trace({ minzoom }, 'overidden styles');
77
+ }
78
+ }
79
+ logger.trace({}, 'HandleKindRiver:End');
80
+ return feature;
81
+ }
82
+ //# sourceMappingURL=water.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"water.js","sourceRoot":"","sources":["../../../src/modify/layers/water.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,MAAM,aAAa,GAAG,SAAS,CAAC;AAEvC;;;;;;;GAOG;AACH,MAAM,UAAU,gBAAgB,CAC9B,OAAyB,EACzB,OAA8B,EAC9B,MAAe;IAEf,MAAM,CAAC,KAAK,CAAC,EAAE,EAAE,2BAA2B,CAAC,CAAC;IAC9C,OAAO,GAAG,eAAe,CAAC,OAAO,CAAC,CAAC;IACnC,MAAM,IAAI,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAExC,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,OAAO;YACV,OAAO,GAAG,eAAe,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;YAC3C,MAAM;QACR,KAAK,OAAO;YACV,OAAO,GAAG,eAAe,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,CAA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C,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,UAAU,CAAC,OAAO,GAAG,CAAC,CAAC;QACjC,CAAC;IACH,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,EAAE,EAAE,qBAAqB,CAAC,CAAC;IACxC,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;;;;;GAMG;AACH,SAAS,eAAe,CAAC,OAAyB,EAAE,OAA8B,EAAE,MAAe;IACjG,MAAM,CAAC,KAAK,CAAC,EAAE,EAAE,uBAAuB,CAAC,CAAC;IAC1C,OAAO,GAAG,eAAe,CAAC,OAAO,CAAC,CAAC;IAEnC,IAAI,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,GAAG,EAAE,EAAE,CAAC;QACrC,MAAM,IAAI,GAAG,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QAExC,IAAI,IAAI,KAAK,EAAE,IAAI,OAAO,CAAC,UAAU,CAAC,OAAO,GAAG,EAAE,EAAE,CAAC;YACnD,MAAM,OAAO,GAAG,EAAE,CAAC;YACnB,OAAO,CAAC,UAAU,CAAC,OAAO,GAAG,OAAO,CAAC;YACrC,MAAM,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,EAAE,kBAAkB,CAAC,CAAC;QAChD,CAAC;IACH,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,EAAE,EAAE,qBAAqB,CAAC,CAAC;IACxC,OAAO,OAAO,CAAC;AACjB,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { LogType } from '@basemaps/shared';
2
+ import { VectorCreationOptions } from '../stac.js';
3
+ import { VectorGeoFeature } from '../types/VectorGeoFeature.js';
4
+ /**
5
+ * special tag function to check if the name to decide whether to do special tags
6
+ * Include like place_labels, pois(for building poi), contours, public_transport, street_labels/streets, water_lines/water_polygons
7
+ *
8
+ * For a given feature and the Shortbread layer to which we've assigned it, we may need to adjust the feature's metadata (i.e. properties) so that we can distinguish it from others in the same layer.
9
+ * Such distinctions include marking road-type features based on whether they describe motorway, primary, or secondary roads, so we can style each set differently.
10
+ */
11
+ export declare function modifyFeature(feature: VectorGeoFeature, options: VectorCreationOptions, logger: LogType): VectorGeoFeature | null;
@@ -0,0 +1,49 @@
1
+ import { handleLayerContours } from './layers/contours.js';
2
+ import { handleLayerPlaceLabels } from './layers/place_labels.js';
3
+ import { handleLayerPois } from './layers/pois.js';
4
+ import { handleLayerPublicTransport } from './layers/public_transport.js';
5
+ import { handleLayerStreetLabels } from './layers/street_labels.js';
6
+ import { handleLayerStreets } from './layers/streets.js';
7
+ import { handleLayerWater } from './layers/water.js';
8
+ /**
9
+ * special tag function to check if the name to decide whether to do special tags
10
+ * Include like place_labels, pois(for building poi), contours, public_transport, street_labels/streets, water_lines/water_polygons
11
+ *
12
+ * For a given feature and the Shortbread layer to which we've assigned it, we may need to adjust the feature's metadata (i.e. properties) so that we can distinguish it from others in the same layer.
13
+ * Such distinctions include marking road-type features based on whether they describe motorway, primary, or secondary roads, so we can style each set differently.
14
+ */
15
+ export function modifyFeature(feature, options, logger) {
16
+ const id = options.layer.id; // lds dataset id
17
+ const layerName = options.name; // shortbread layer
18
+ logger.trace({ id, layerName }, 'ModifyFeature:Start');
19
+ let modifiedFeature;
20
+ switch (layerName) {
21
+ case 'contours':
22
+ modifiedFeature = handleLayerContours(feature, options, logger);
23
+ break;
24
+ case 'place_labels':
25
+ modifiedFeature = handleLayerPlaceLabels(feature, logger);
26
+ break;
27
+ case 'pois':
28
+ modifiedFeature = handleLayerPois(feature, logger);
29
+ break;
30
+ case 'public_transport':
31
+ modifiedFeature = handleLayerPublicTransport(feature, options, logger);
32
+ break;
33
+ case 'street_labels':
34
+ modifiedFeature = handleLayerStreetLabels(feature, options, logger);
35
+ break;
36
+ case 'streets':
37
+ modifiedFeature = handleLayerStreets(feature, options, logger);
38
+ break;
39
+ case 'water_polygons':
40
+ case 'water_lines':
41
+ modifiedFeature = handleLayerWater(feature, options, logger);
42
+ break;
43
+ default:
44
+ modifiedFeature = structuredClone(feature);
45
+ }
46
+ logger.trace({ id, layerName }, 'ModifyFeature:End');
47
+ return modifiedFeature;
48
+ }
49
+ //# sourceMappingURL=modify.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modify.js","sourceRoot":"","sources":["../../src/modify/modify.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAErD;;;;;;GAMG;AACH,MAAM,UAAU,aAAa,CAC3B,OAAyB,EACzB,OAA8B,EAC9B,MAAe;IAEf,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,iBAAiB;IAC9C,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,mBAAmB;IAEnD,MAAM,CAAC,KAAK,CAAC,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,qBAAqB,CAAC,CAAC;IACvD,IAAI,eAAwC,CAAC;IAE7C,QAAQ,SAAS,EAAE,CAAC;QAClB,KAAK,UAAU;YACb,eAAe,GAAG,mBAAmB,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;YAChE,MAAM;QACR,KAAK,cAAc;YACjB,eAAe,GAAG,sBAAsB,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;YAC1D,MAAM;QACR,KAAK,MAAM;YACT,eAAe,GAAG,eAAe,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;YACnD,MAAM;QACR,KAAK,kBAAkB;YACrB,eAAe,GAAG,0BAA0B,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;YACvE,MAAM;QACR,KAAK,eAAe;YAClB,eAAe,GAAG,uBAAuB,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;YACpE,MAAM;QACR,KAAK,SAAS;YACZ,eAAe,GAAG,kBAAkB,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;YAC/D,MAAM;QACR,KAAK,gBAAgB,CAAC;QACtB,KAAK,aAAa;YAChB,eAAe,GAAG,gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;YAC7D,MAAM;QACR;YACE,eAAe,GAAG,eAAe,CAAC,OAAO,CAAC,CAAC;IAC/C,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,mBAAmB,CAAC,CAAC;IACrD,OAAO,eAAe,CAAC;AACzB,CAAC"}
@@ -0,0 +1,47 @@
1
+ import { z } from 'zod';
2
+ export declare const zPlaceLabelsProperties: z.ZodObject<{
3
+ /** @example "Kaitaia" */
4
+ label: z.ZodString;
5
+ /** @example "TWN1" */
6
+ style: z.ZodString;
7
+ /** @example "city" */
8
+ place: z.ZodString;
9
+ /** @example 7 */
10
+ adminlevel: z.ZodNumber;
11
+ /** @example "0" */
12
+ natural: z.ZodString;
13
+ /** @example "0" */
14
+ water: z.ZodString;
15
+ }, "strip", z.ZodTypeAny, {
16
+ style: string;
17
+ label: string;
18
+ place: string;
19
+ adminlevel: number;
20
+ natural: string;
21
+ water: string;
22
+ }, {
23
+ style: string;
24
+ label: string;
25
+ place: string;
26
+ adminlevel: number;
27
+ natural: string;
28
+ water: string;
29
+ }>;
30
+ export declare const zPlaceLabelsTippecanoe: z.ZodObject<{
31
+ /** @example "place_labels" */
32
+ layer: z.ZodString;
33
+ /** @example 8 */
34
+ minzoom: z.ZodNumber;
35
+ /** @example 8 */
36
+ maxzoom: z.ZodNumber;
37
+ }, "strip", z.ZodTypeAny, {
38
+ layer: string;
39
+ minzoom: number;
40
+ maxzoom: number;
41
+ }, {
42
+ layer: string;
43
+ minzoom: number;
44
+ maxzoom: number;
45
+ }>;
46
+ export type zTypePlaceLabelsProperties = z.infer<typeof zPlaceLabelsProperties>;
47
+ export type zTypePlaceLabelsTippecanoe = z.infer<typeof zPlaceLabelsTippecanoe>;
@@ -0,0 +1,24 @@
1
+ import { z } from 'zod';
2
+ export const zPlaceLabelsProperties = z.object({
3
+ /** @example "Kaitaia" */
4
+ label: z.string(),
5
+ /** @example "TWN1" */
6
+ style: z.string(),
7
+ /** @example "city" */
8
+ place: z.string(),
9
+ /** @example 7 */
10
+ adminlevel: z.number(),
11
+ /** @example "0" */
12
+ natural: z.string(),
13
+ /** @example "0" */
14
+ water: z.string(),
15
+ });
16
+ export const zPlaceLabelsTippecanoe = z.object({
17
+ /** @example "place_labels" */
18
+ layer: z.string(),
19
+ /** @example 8 */
20
+ minzoom: z.number(),
21
+ /** @example 8 */
22
+ maxzoom: z.number(),
23
+ });
24
+ //# sourceMappingURL=parser.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parser.js","sourceRoot":"","sources":["../../src/modify/parser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,yBAAyB;IACzB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IAEjB,sBAAsB;IACtB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IAEjB,sBAAsB;IACtB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IAEjB,iBAAiB;IACjB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IAEtB,mBAAmB;IACnB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IAEnB,mBAAmB;IACnB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;CAClB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,8BAA8B;IAC9B,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IAEjB,iBAAiB;IACjB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IAEnB,iBAAiB;IACjB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;CACpB,CAAC,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { VectorGeoFeature } from '../types/VectorGeoFeature.js';
2
+ export interface VectorGeoPlaceLabelsFeature extends VectorGeoFeature {
3
+ properties: {
4
+ /** @example "Kaitaia" */
5
+ name: string;
6
+ /** @example "ant" */
7
+ kind: string;
8
+ /** @example "city" */
9
+ place: string;
10
+ /** @example 7 */
11
+ adminlevel: number;
12
+ /** @example "0" */
13
+ natural: string;
14
+ /** @example "0" */
15
+ water: string;
16
+ };
17
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/modify/schema.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ import { LogType } from '@basemaps/shared';
2
+ import { Geometry, Position } from 'geojson';
3
+ import { VectorCreationOptions } from '../stac.js';
4
+ import { VectorGeoFeature } from '../types/VectorGeoFeature.js';
5
+ export declare const polylabel: (polygon: number[][][], precision?: number, debug?: boolean) => number[];
6
+ export declare function handleRoadFeature(feature: VectorGeoFeature, options: VectorCreationOptions, logger: LogType): VectorGeoFeature;
7
+ export declare function getCoordinates(geometry: Geometry, logger: LogType): Position[][];
@@ -0,0 +1,53 @@
1
+ import * as poly from 'polylabel';
2
+ import { MajorHighWays } from './consts.js';
3
+ export const polylabel = poly.default;
4
+ export function handleRoadFeature(feature, options, logger) {
5
+ logger.trace({}, 'HandleRoadFeature:Start');
6
+ feature = structuredClone(feature);
7
+ const highwayNum = feature.properties['hway_num'];
8
+ if (highwayNum != null && typeof highwayNum === 'string') {
9
+ // append/override tags
10
+ const kind = 'motorway';
11
+ feature.properties['kind'] = kind;
12
+ const ref = highwayNum;
13
+ feature.properties['ref'] = ref;
14
+ logger.trace({ kind, ref }, 'new/overidden tags');
15
+ // Keep the highways with names below zoom 8.
16
+ if (feature.tippecanoe.minzoom < 8) {
17
+ const minzoom = MajorHighWays.has(highwayNum) ? feature.tippecanoe.maxzoom : 8;
18
+ feature.tippecanoe.minzoom = minzoom;
19
+ logger.trace({ minzoom }, 'overidden styles');
20
+ }
21
+ // return feature
22
+ logger.trace({}, 'HandleRoadFeature:End');
23
+ return feature;
24
+ }
25
+ const laneCount = feature.properties['lane_count'];
26
+ if (typeof laneCount === 'number') {
27
+ // append/override tags
28
+ const kind = laneCount >= 4 ? 'primary' : 'secondary';
29
+ feature.properties['kind'] = kind;
30
+ logger.trace({ kind }, 'new/overidden tags');
31
+ }
32
+ // override styles
33
+ if (options.layer.style.minZoom < 10) {
34
+ const minzoom = 10;
35
+ feature.tippecanoe.minzoom = minzoom;
36
+ logger.trace({ minzoom }, 'overidden styles');
37
+ }
38
+ // return feature
39
+ logger.trace({}, 'HandleRoadFeature:End');
40
+ return feature;
41
+ }
42
+ export function getCoordinates(geometry, logger) {
43
+ switch (geometry.type) {
44
+ case 'MultiPolygon':
45
+ // TODO: Worth to try create a point for each polygon and see how it looks line.
46
+ return geometry.coordinates[0];
47
+ case 'Polygon':
48
+ return geometry.coordinates;
49
+ }
50
+ logger.error({ type: geometry.type }, 'Unsupported geometry type');
51
+ throw new Error('Unsupported geometry type');
52
+ }
53
+ //# sourceMappingURL=shared.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared.js","sourceRoot":"","sources":["../../src/modify/shared.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAIlC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,CAAC,MAAM,SAAS,GAAG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ClC,uBAAuB;QACvB,MAAM,IAAI,GAAG,SAAS,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC;QACtD,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;QAClC,MAAM,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,EAAE,oBAAoB,CAAC,CAAC;IAC/C,CAAC;IAED,kBAAkB;IAClB,IAAI,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,GAAG,EAAE,EAAE,CAAC;QACrC,MAAM,OAAO,GAAG,EAAE,CAAC;QACnB,OAAO,CAAC,UAAU,CAAC,OAAO,GAAG,OAAO,CAAC;QACrC,MAAM,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,EAAE,kBAAkB,CAAC,CAAC;IAChD,CAAC;IAED,iBAAiB;IACjB,MAAM,CAAC,KAAK,CAAC,EAAE,EAAE,uBAAuB,CAAC,CAAC;IAC1C,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,QAAkB,EAAE,MAAe;IAChE,QAAQ,QAAQ,CAAC,IAAI,EAAE,CAAC;QACtB,KAAK,cAAc;YACjB,gFAAgF;YAChF,OAAO,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;QACjC,KAAK,SAAS;YACZ,OAAO,QAAQ,CAAC,WAAW,CAAC;IAChC,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,QAAQ,CAAC,IAAI,EAAE,EAAE,2BAA2B,CAAC,CAAC;IACnE,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;AAC/C,CAAC"}
@@ -57,6 +57,7 @@ export declare const zSimplify: z.ZodObject<{
57
57
  export declare const zLayer: z.ZodObject<{
58
58
  id: z.ZodString;
59
59
  name: z.ZodString;
60
+ version: z.ZodOptional<z.ZodNumber>;
60
61
  source: z.ZodString;
61
62
  tags: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
62
63
  attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
@@ -104,6 +105,7 @@ export declare const zLayer: z.ZodObject<{
104
105
  tolerance?: number | undefined;
105
106
  }>, "many">>;
106
107
  tippecanoe: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
108
+ includeDerivedArea: z.ZodOptional<z.ZodBoolean>;
107
109
  }, "strip", z.ZodTypeAny, {
108
110
  tags: Record<string, string | boolean>;
109
111
  style: {
@@ -114,6 +116,7 @@ export declare const zLayer: z.ZodObject<{
114
116
  id: string;
115
117
  name: string;
116
118
  source: string;
119
+ version?: number | undefined;
117
120
  attributes?: Record<string, string> | undefined;
118
121
  simplify?: {
119
122
  style: {
@@ -124,6 +127,7 @@ export declare const zLayer: z.ZodObject<{
124
127
  tolerance?: number | undefined;
125
128
  }[] | undefined;
126
129
  tippecanoe?: string[] | undefined;
130
+ includeDerivedArea?: boolean | undefined;
127
131
  }, {
128
132
  tags: Record<string, string | boolean>;
129
133
  style: {
@@ -134,6 +138,7 @@ export declare const zLayer: z.ZodObject<{
134
138
  id: string;
135
139
  name: string;
136
140
  source: string;
141
+ version?: number | undefined;
137
142
  attributes?: Record<string, string> | undefined;
138
143
  simplify?: {
139
144
  style: {
@@ -144,6 +149,7 @@ export declare const zLayer: z.ZodObject<{
144
149
  tolerance?: number | undefined;
145
150
  }[] | undefined;
146
151
  tippecanoe?: string[] | undefined;
152
+ includeDerivedArea?: boolean | undefined;
147
153
  }>;
148
154
  export declare const zSchema: z.ZodObject<{
149
155
  name: z.ZodString;
@@ -187,6 +193,7 @@ export declare const zSchema: z.ZodObject<{
187
193
  layers: z.ZodArray<z.ZodObject<{
188
194
  id: z.ZodString;
189
195
  name: z.ZodString;
196
+ version: z.ZodOptional<z.ZodNumber>;
190
197
  source: z.ZodString;
191
198
  tags: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
192
199
  attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
@@ -234,6 +241,7 @@ export declare const zSchema: z.ZodObject<{
234
241
  tolerance?: number | undefined;
235
242
  }>, "many">>;
236
243
  tippecanoe: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
244
+ includeDerivedArea: z.ZodOptional<z.ZodBoolean>;
237
245
  }, "strip", z.ZodTypeAny, {
238
246
  tags: Record<string, string | boolean>;
239
247
  style: {
@@ -244,6 +252,7 @@ export declare const zSchema: z.ZodObject<{
244
252
  id: string;
245
253
  name: string;
246
254
  source: string;
255
+ version?: number | undefined;
247
256
  attributes?: Record<string, string> | undefined;
248
257
  simplify?: {
249
258
  style: {
@@ -254,6 +263,7 @@ export declare const zSchema: z.ZodObject<{
254
263
  tolerance?: number | undefined;
255
264
  }[] | undefined;
256
265
  tippecanoe?: string[] | undefined;
266
+ includeDerivedArea?: boolean | undefined;
257
267
  }, {
258
268
  tags: Record<string, string | boolean>;
259
269
  style: {
@@ -264,6 +274,7 @@ export declare const zSchema: z.ZodObject<{
264
274
  id: string;
265
275
  name: string;
266
276
  source: string;
277
+ version?: number | undefined;
267
278
  attributes?: Record<string, string> | undefined;
268
279
  simplify?: {
269
280
  style: {
@@ -274,6 +285,7 @@ export declare const zSchema: z.ZodObject<{
274
285
  tolerance?: number | undefined;
275
286
  }[] | undefined;
276
287
  tippecanoe?: string[] | undefined;
288
+ includeDerivedArea?: boolean | undefined;
277
289
  }>, "many">;
278
290
  }, "strip", z.ZodTypeAny, {
279
291
  name: string;
@@ -290,6 +302,7 @@ export declare const zSchema: z.ZodObject<{
290
302
  id: string;
291
303
  name: string;
292
304
  source: string;
305
+ version?: number | undefined;
293
306
  attributes?: Record<string, string> | undefined;
294
307
  simplify?: {
295
308
  style: {
@@ -300,6 +313,7 @@ export declare const zSchema: z.ZodObject<{
300
313
  tolerance?: number | undefined;
301
314
  }[] | undefined;
302
315
  tippecanoe?: string[] | undefined;
316
+ includeDerivedArea?: boolean | undefined;
303
317
  }[];
304
318
  simplify?: {
305
319
  style: {
@@ -324,6 +338,7 @@ export declare const zSchema: z.ZodObject<{
324
338
  id: string;
325
339
  name: string;
326
340
  source: string;
341
+ version?: number | undefined;
327
342
  attributes?: Record<string, string> | undefined;
328
343
  simplify?: {
329
344
  style: {
@@ -334,6 +349,7 @@ export declare const zSchema: z.ZodObject<{
334
349
  tolerance?: number | undefined;
335
350
  }[] | undefined;
336
351
  tippecanoe?: string[] | undefined;
352
+ includeDerivedArea?: boolean | undefined;
337
353
  }[];
338
354
  simplify?: {
339
355
  style: {
@@ -17,12 +17,14 @@ export const zSimplify = z.object({
17
17
  export const zLayer = z.object({
18
18
  id: z.string(),
19
19
  name: z.string(),
20
+ version: z.number().optional(),
20
21
  source: z.string(),
21
22
  tags: zTags,
22
23
  attributes: zAttributes.optional(),
23
24
  style: zStyling,
24
25
  simplify: z.array(zSimplify).optional(),
25
26
  tippecanoe: z.array(z.string()).optional(),
27
+ includeDerivedArea: z.boolean().optional(),
26
28
  });
27
29
  export const zSchema = z.object({
28
30
  name: z.string(),
@@ -1 +1 @@
1
- {"version":3,"file":"parser.js","sourceRoot":"","sources":["../../src/schema-loader/parser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC9B,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;AAE1D,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CA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