@basemaps/cli-vector 8.6.0 → 8.7.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.
@@ -1,15 +1,7 @@
1
1
  import { LogType } from '@basemaps/shared';
2
2
  import { VectorGeoFeature } from '../../types/VectorGeoFeature.js';
3
- import { VectorGeoPlaceLabelsFeature } from '../schema.js';
4
- export declare const PlaceLabelsFeatures: Map<string, VectorGeoPlaceLabelsFeature>;
5
3
  /**
6
- * Processes a 'place_labels' layer feature of the gazatteer dataset.
7
- *
8
- * The gazatteer dataset contains multiple features that technically describe the same feature, such that:
9
- * - 1. Many features have the same `label` value.
10
- * - a. The 1st feature always contains the properties.
11
- * - b. The 2nd, 3rd, ... features always define the `label`, `zoom_level` and `style` properties. But, all others properties will be `null`.
12
- * - 2. All features with the same `label` value have different `zoom_level` values.
4
+ * Processes a 'place_labels' layer feature.
13
5
  *
14
6
  * @param feature - the feature to process
15
7
  * @param options - the layer's options
@@ -1,14 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  import { zPlaceLabelsProperties } from '../parser.js';
3
- export const PlaceLabelsFeatures = new Map();
4
3
  /**
5
- * Processes a 'place_labels' layer feature of the gazatteer dataset.
6
- *
7
- * The gazatteer dataset contains multiple features that technically describe the same feature, such that:
8
- * - 1. Many features have the same `label` value.
9
- * - a. The 1st feature always contains the properties.
10
- * - b. The 2nd, 3rd, ... features always define the `label`, `zoom_level` and `style` properties. But, all others properties will be `null`.
11
- * - 2. All features with the same `label` value have different `zoom_level` values.
4
+ * Processes a 'place_labels' layer feature.
12
5
  *
13
6
  * @param feature - the feature to process
14
7
  * @param options - the layer's options
@@ -17,90 +10,27 @@ export const PlaceLabelsFeatures = new Map();
17
10
  */
18
11
  export function handleLayerPlaceLabels(feature, logger) {
19
12
  logger.trace({}, 'HandlePlaceLabels:Start');
20
- const newFeature = createNewFeature(feature, logger);
21
- const name = newFeature.properties.name;
22
- // DATA PROBLEM: Multiple features will have the same `label` value. However, only the first feature will
23
- // contain all of the expected properties. All other features with the same `label` value will have null
24
- // values for the expected properties. So, as we encounter each of the 'other' features, we need to copy
25
- // the expected properties from the first feature to it, before returning it.
26
- const storedFeature = PlaceLabelsFeatures.get(name);
27
- if (storedFeature == null) {
28
- PlaceLabelsFeatures.set(name, newFeature);
29
- logger.trace({}, 'HandlePlaceLabels:End');
30
- return newFeature;
31
- }
32
- // update the stored feature's 'minzoom' value
33
- storedFeature.tippecanoe.minzoom = newFeature.tippecanoe.minzoom;
34
- // update the stored feature's 'maxzoom' value
35
- storedFeature.tippecanoe.maxzoom = newFeature.tippecanoe.minzoom;
36
- logger.trace({}, 'HandlePlaceLabels:End');
37
- return structuredClone(storedFeature);
38
- }
39
- /**
40
- * Parses a 'place_labels' layer feature into a VectorGeoPlaceLabelsFeature object.
41
- *
42
- * @param feature - the feature to process
43
- * @param label - the feature's 'label' property
44
- * @param zoomLevel - the feature's 'zoom_level' property
45
- * @param logger - a logger instance
46
- * @returns a VectorGeoPlaceLabelsFeature object
47
- */
48
- function createNewFeature(feature, logger) {
49
13
  try {
14
+ feature = structuredClone(feature);
50
15
  const properties = zPlaceLabelsProperties.parse({
51
16
  label: feature.properties['label'],
52
- zoom_level: feature.properties['zoom_level'],
53
- style: feature.properties['style'],
17
+ admin_level: feature.properties['adminlevel'],
54
18
  natural: feature.properties['natural'],
55
19
  place: feature.properties['place'],
56
20
  water: feature.properties['water'],
57
21
  });
58
- const tippecanoe = {
59
- layer: 'place_labels',
60
- minzoom: properties.zoom_level,
61
- maxzoom: properties.zoom_level,
62
- };
63
- const newFeature = {
64
- type: feature.type,
65
- properties: {
66
- name: properties.label,
67
- kind: convertStyleToKind(properties.style, tippecanoe.minzoom),
68
- natural: properties.natural,
69
- place: properties.place,
70
- water: properties.water,
71
- },
72
- geometry: feature.geometry,
73
- tippecanoe,
74
- };
75
- return newFeature;
22
+ feature.properties = properties;
23
+ // TODO: once we finalise the new style entries, we will update the desired `minzoom` and `maxzoom` values.
24
+ feature.tippecanoe.minzoom = properties.admin_level;
25
+ logger.trace({}, 'HandlePlaceLabels:End');
26
+ return feature;
76
27
  }
77
28
  catch (e) {
29
+ // discard the handful of features with null-valued `label` properties.
78
30
  if (e instanceof z.ZodError) {
79
- logger.trace({ properties: feature.properties }, 'Failed to parse required properties.');
31
+ logger.trace({ properties: feature.properties }, 'Failed to parse required properties. Discarding feature.');
80
32
  }
81
- throw e;
82
- }
83
- }
84
- /**
85
- * Determines a feature's 'kind' based on its 'styles' property.
86
- *
87
- * @param style - the feature's 'style' property
88
- */
89
- function convertStyleToKind(style, minzoom) {
90
- if (style.startsWith('ANT'))
91
- return 'ant';
92
- if (style.startsWith('GEO'))
93
- return 'geo';
94
- if (style.startsWith('TWN')) {
95
- if (minzoom <= 8)
96
- return 'city';
97
- if (style === 'TWN1')
98
- return 'suburb';
99
- if (style === 'TWN2')
100
- return 'town';
101
- if (style === 'TWN3')
102
- return 'city';
33
+ return null;
103
34
  }
104
- return '';
105
35
  }
106
36
  //# sourceMappingURL=place_labels.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"place_labels.js","sourceRoot":"","sources":["../../../src/modify/layers/place_labels.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAGtD,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,GAAG,EAAuC,CAAC;AAElF;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,sBAAsB,CAAC,OAAyB,EAAE,MAAe;IAC/E,MAAM,CAAC,KAAK,CAAC,EAAE,EAAE,yBAAyB,CAAC,CAAC;IAE5C,MAAM,UAAU,GAAG,gBAAgB,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IACrD,MAAM,IAAI,GAAG,UAAU,CAAC,UAAU,CAAC,IAAI,CAAC;IAExC,yGAAyG;IACzG,wGAAwG;IACxG,wGAAwG;IACxG,6EAA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ZodString;
5
- /** @example 8 */
6
- zoom_level: z.ZodNumber;
7
- /** @example "TWN1" */
8
- style: z.ZodString;
9
- /** @example "cape" */
5
+ /** @example 7 */
6
+ admin_level: z.ZodNumber;
7
+ /** @example "peak" */
10
8
  natural: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>;
11
9
  /** @example "city" */
12
10
  place: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>;
13
- /** @example "bay" */
11
+ /** @example "sea" */
14
12
  water: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>;
15
13
  }, "strip", z.ZodTypeAny, {
16
- style: string;
17
14
  label: string;
18
- zoom_level: number;
15
+ admin_level: number;
19
16
  natural?: string | undefined;
20
17
  place?: string | undefined;
21
18
  water?: string | undefined;
22
19
  }, {
23
- style: string;
24
20
  label: string;
25
- zoom_level: number;
21
+ admin_level: number;
26
22
  natural?: unknown;
27
23
  place?: unknown;
28
24
  water?: unknown;
@@ -1,24 +1,15 @@
1
1
  import { z } from 'zod';
2
- const optionalString = z.preprocess((value) => {
3
- if (value === '0' || value === null) {
4
- return undefined;
5
- }
6
- else {
7
- return value;
8
- }
9
- }, z.string().optional());
2
+ const optionalString = z.preprocess((value) => (value == null ? undefined : value), z.string().optional());
10
3
  export const zPlaceLabelsProperties = z.object({
11
4
  /** @example "Kaitaia" */
12
5
  label: z.string(),
13
- /** @example 8 */
14
- zoom_level: z.number(),
15
- /** @example "TWN1" */
16
- style: z.string(),
17
- /** @example "cape" */
6
+ /** @example 7 */
7
+ admin_level: z.number(),
8
+ /** @example "peak" */
18
9
  natural: optionalString,
19
10
  /** @example "city" */
20
11
  place: optionalString,
21
- /** @example "bay" */
12
+ /** @example "sea" */
22
13
  water: optionalString,
23
14
  });
24
15
  //# sourceMappingURL=parser.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"parser.js","sourceRoot":"","sources":["../../src/modify/parser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EA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EAAE,cAAc;IAEvB,sBAAsB;IACtB,KAAK,EAAE,cAAc;IAErB,qBAAqB;IACrB,KAAK,EAAE,cAAc;CACtB,CAAC,CAAC"}
package/dist/index.cjs CHANGED
@@ -80746,9 +80746,9 @@ var ulid2 = __toESM(require_index_umd(), 1);
80746
80746
  var CliInfo = {
80747
80747
  // Detect unlinked packages looks for this string since its a package name, slightly work around it
80748
80748
  package: "@basemaps/cli",
80749
- version: "v8.6.0",
80750
- hash: "bd34894f26d1c7827503e0cb9d48d0773ecd6775",
80751
- buildId: "16790799626-1"
80749
+ version: "v8.7.0",
80750
+ hash: "3e06a16cf523dbbe0e7935afaae909d022425819",
80751
+ buildId: "16867275946-1"
80752
80752
  };
80753
80753
  var CliDate = (/* @__PURE__ */ new Date()).toISOString();
80754
80754
  var CliId = ulid2.ulid();
@@ -91428,97 +91428,43 @@ function handleKindPeak(feature, logger) {
91428
91428
  }
91429
91429
 
91430
91430
  // src/modify/parser.ts
91431
- var optionalString = z.preprocess((value) => {
91432
- if (value === "0" || value === null) {
91433
- return void 0;
91434
- } else {
91435
- return value;
91436
- }
91437
- }, z.string().optional());
91431
+ var optionalString = z.preprocess((value) => value == null ? void 0 : value, z.string().optional());
91438
91432
  var zPlaceLabelsProperties = z.object({
91439
91433
  /** @example "Kaitaia" */
91440
91434
  label: z.string(),
91441
- /** @example 8 */
91442
- zoom_level: z.number(),
91443
- /** @example "TWN1" */
91444
- style: z.string(),
91445
- /** @example "cape" */
91435
+ /** @example 7 */
91436
+ admin_level: z.number(),
91437
+ /** @example "peak" */
91446
91438
  natural: optionalString,
91447
91439
  /** @example "city" */
91448
91440
  place: optionalString,
91449
- /** @example "bay" */
91441
+ /** @example "sea" */
91450
91442
  water: optionalString
91451
91443
  });
91452
91444
 
91453
91445
  // src/modify/layers/place_labels.ts
91454
- var PlaceLabelsFeatures = /* @__PURE__ */ new Map();
91455
91446
  function handleLayerPlaceLabels(feature, logger) {
91456
91447
  logger.trace({}, "HandlePlaceLabels:Start");
91457
- const newFeature = createNewFeature(feature, logger);
91458
- const name = newFeature.properties.name;
91459
- const storedFeature = PlaceLabelsFeatures.get(name);
91460
- if (storedFeature == null) {
91461
- PlaceLabelsFeatures.set(name, newFeature);
91462
- logger.trace({}, "HandlePlaceLabels:End");
91463
- return newFeature;
91464
- }
91465
- storedFeature.tippecanoe.minzoom = newFeature.tippecanoe.minzoom;
91466
- storedFeature.tippecanoe.maxzoom = newFeature.tippecanoe.minzoom;
91467
- logger.trace({}, "HandlePlaceLabels:End");
91468
- return structuredClone(storedFeature);
91469
- }
91470
- function createNewFeature(feature, logger) {
91471
91448
  try {
91449
+ feature = structuredClone(feature);
91472
91450
  const properties = zPlaceLabelsProperties.parse({
91473
91451
  label: feature.properties["label"],
91474
- zoom_level: feature.properties["zoom_level"],
91475
- style: feature.properties["style"],
91452
+ admin_level: feature.properties["adminlevel"],
91476
91453
  natural: feature.properties["natural"],
91477
91454
  place: feature.properties["place"],
91478
91455
  water: feature.properties["water"]
91479
91456
  });
91480
- const tippecanoe2 = {
91481
- layer: "place_labels",
91482
- minzoom: properties.zoom_level,
91483
- maxzoom: properties.zoom_level
91484
- };
91485
- const newFeature = {
91486
- type: feature.type,
91487
- properties: {
91488
- name: properties.label,
91489
- kind: convertStyleToKind(properties.style, tippecanoe2.minzoom),
91490
- natural: properties.natural,
91491
- place: properties.place,
91492
- water: properties.water
91493
- },
91494
- geometry: feature.geometry,
91495
- tippecanoe: tippecanoe2
91496
- };
91497
- return newFeature;
91457
+ feature.properties = properties;
91458
+ feature.tippecanoe.minzoom = properties.admin_level;
91459
+ logger.trace({}, "HandlePlaceLabels:End");
91460
+ return feature;
91498
91461
  } catch (e) {
91499
91462
  if (e instanceof z.ZodError) {
91500
- logger.trace({ properties: feature.properties }, "Failed to parse required properties.");
91463
+ logger.trace({ properties: feature.properties }, "Failed to parse required properties. Discarding feature.");
91501
91464
  }
91502
- throw e;
91465
+ return null;
91503
91466
  }
91504
91467
  }
91505
- function convertStyleToKind(style, minzoom) {
91506
- if (style.startsWith("ANT"))
91507
- return "ant";
91508
- if (style.startsWith("GEO"))
91509
- return "geo";
91510
- if (style.startsWith("TWN")) {
91511
- if (minzoom <= 8)
91512
- return "city";
91513
- if (style === "TWN1")
91514
- return "suburb";
91515
- if (style === "TWN2")
91516
- return "town";
91517
- if (style === "TWN3")
91518
- return "city";
91519
- }
91520
- return "";
91521
- }
91522
91468
 
91523
91469
  // src/modify/shared.ts
91524
91470
  var poly = __toESM(require_polylabel(), 1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@basemaps/cli-vector",
3
- "version": "8.6.0",
3
+ "version": "8.7.0",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
@@ -65,5 +65,5 @@
65
65
  "tar-stream": "^2.2.0",
66
66
  "zod": "^3.24.4"
67
67
  },
68
- "gitHead": "bd34894f26d1c7827503e0cb9d48d0773ecd6775"
68
+ "gitHead": "3e06a16cf523dbbe0e7935afaae909d022425819"
69
69
  }
@@ -1,15 +0,0 @@
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 "cape" */
9
- natural?: string;
10
- /** @example "city" */
11
- place?: string;
12
- /** @example "bay" */
13
- water?: string;
14
- };
15
- }
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=schema.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/modify/schema.ts"],"names":[],"mappings":""}