Skip to content

Conversation

@tawera-manaena
Copy link
Contributor

@tawera-manaena tawera-manaena commented Jun 17, 2025

This PR is a sibling of this PR in the basemaps-config repository.


Motivation

As a general rule, all features assigned to a particular Shortbread layer should have the same geometry type, with exceptions (i.e. the contours and land layers).

Currently, we have a few Shortbread layers that comprise features of differing geometry types (e.g. Points and Polygons, rather than Points only). We also have some datasets that are duplicated across layers and that are not targeted by any style entries. Such duplicates can be removed.

Modifications

I have identified and resolved the following inconsistencies for the following Shortbread layers:

  • pois

    The pois layer contains Point and Polygon features. It should only contain Point features.

    I've changed the tags for the following features to more appropriate OSM key-value pairs:

  • streets

    The streets layer contains LineString, Point and Polygon features. It should only contain LineString features.

    • Moved the following datasets to the pois layer and updated the stylesheet:

      • 50275-nz-ford-points-topo-150k
      • 50080-nz-chatham-island-ford-points-topo-150k
    • Removed the following datasets as they already live under the street_polygons layer and are not targeted by any style entries under the streets layer:

      • airports:

        • 50237-nz-airport-polygons-topo-150k
        • 50063-nz-chatham-island-airport-polygons-topo-150k
        • 52231-cook-islands-airport-polygons-topo-125k-zone4
        • 52168-niue-airport-polygons-topo-150k
      • runways:

        • 50333-nz-runway-polygons-topo-150k
        • 50914-nz-kermadec-is-runway-polygons-topo-125k
        • 52302-cook-islands-runway-polygons-topo-125k-zone3
        • 52268-cook-islands-runway-polygons-topo-125k-zone4
        • 52211-cook-islands-runway-polygons-topo-150k-zone4
        • 52190-niue-runway-polygons-topo-150k
        • 50103-nz-chatham-island-runway-polygons-topo-150k

I have adjusted the 'special tagging' logic for the following Shortbread layers:

  • place_labels

    The logic for handling place_labels features currently preserves null-like values for certain properties. For example:

    { ... "natural": "cape", "place": "city", "water": "0" }
    

    I've adjusted the logic so that properties with values of "0" are interpreted as undefined. This is desired as such properties are already optional. This now allows us to discard such property key-value pairs instead of carrying them through.

    Before After

Verification

I built this pull request as a container and triggered a Vector ETL Argo workflow using it. Once the workflow finished, I updated the topographic-v2 tileset to point to the 2193 and 3857 Cotar files generated by the workflow. This gave me previews links from which I could check that my schema and stylesheet changes were in-sync:

@tawera-manaena tawera-manaena added the container build pull request container for testing label Jun 18, 2025
@tawera-manaena tawera-manaena marked this pull request as ready for review June 18, 2025 21:55
@tawera-manaena tawera-manaena requested a review from a team as a code owner June 18, 2025 21:55
@tawera-manaena tawera-manaena marked this pull request as draft June 19, 2025 02:05
@tawera-manaena
Copy link
Contributor Author

One moment. Something doesn't seem right about the place_labels features.

@tawera-manaena
Copy link
Contributor Author

tawera-manaena commented Jun 22, 2025

One moment. Something doesn't seem right about the place_labels features.

Before - In this commit, I had adjusted the logic for place_labels features with the intent of resolving properties with values of "0" as undefined. However, my zod changes meant that any feature with a "0" valued property was resolved to undefined at the wrong point in the sequence of checks. In other words, because undefined is not of type string, such properties failed the zod check, resulting in the feature being discarded.

After - In this commit, I've corrected the logic by pre-processing "0" valued properties as undefined before zod checks that it is an optional string, i.e. string | undefined. In other words, the zod check now works the way it was supposed to. So, features with "0" valued properties are no longer being discarded.

In the following screenshots, we can see that all of the expected place_labels features pass through intact:

Before After

@tawera-manaena tawera-manaena marked this pull request as ready for review June 22, 2025 21:34
@tawera-manaena tawera-manaena added this pull request to the merge queue Jun 23, 2025
Merged via the queue into master with commit 0770163 Jun 23, 2025
15 checks passed
@tawera-manaena tawera-manaena deleted the feat/vector-code-and-schema-refinements branch June 23, 2025 01:29
@ccbblin ccbblin mentioned this pull request Jun 23, 2025
@tawera-manaena tawera-manaena mentioned this pull request Jun 25, 2025
github-merge-queue bot pushed a commit that referenced this pull request Jun 25, 2025
# [8.4.0](v8.3.0...v8.4.0)
(2025-06-25)

### Bug Fixes

* **cli-vector:** Fix the stac item format missing datetime in
properties. BM-1317
([#3464](#3464))
([6c7719f](6c7719f))
* **cli-vector:** revert polylabel version to 1.1.0 BM-1309
([#3467](#3467))
([e2039fa](e2039fa))

### Features

* **cli-config:** Support vector preview links and reports for NZTM.
BM-1253 ([#3463](#3463))
([5ab6a5b](5ab6a5b))
* **cli-vector:** adjust the layers assigned to each schema layer
BM-1299 ([#3462](#3462))
([0770163](0770163))
github-merge-queue bot pushed a commit to linz/basemaps-config that referenced this pull request Jun 26, 2025
…1299 (#1193)

This PR is a sibling of [this PR] in the **basemaps** repository.

[this PR]: linz/basemaps#3462

---

### Motivation

This PR's [sibling] re-homes various datasets from one Shortbread layer
to another. It also adjusts the tags for various datasets. We need to
update the affected style entries in the `topographic-v2` stylesheet to
reflect the changes.

[sibling]: linz/basemaps#3462

### Modifications

- **labels-v2**

- Adjusted the `filter` and `source-layer` for **rifle range** features
to reflect its new tag and Shortbread layer.

- **topographic-v2**

- Adjusted the `filter` and `source-layer` for **rifle range** features
to reflect its new tag and Shortbread layer.
- Adjusted the `filter` and `source-layer` for **ford** features to
reflect its new tag and Shortbread layer.
- Adjusted the `filter` for **historic site** features to reflect its
new tag.
- Adjusted the `filter` for **ladder** features to reflect its new tag.

- **topolite-v2**

   - _No changes._

### Verification

- **1st attempt
([Argo](https://argo.linzaccess.com/workflows/argo/test-basemaps-vector-etl-shortbread-7szck))**
   - Problems:
- Code-side issue. A lot of features under the `place_labels` layer are
[missing from the map].

- **2nd attempt
([Argo](https://argo.linzaccess.com/workflows/argo/test-basemaps-vector-etl-shortbread-mfk5m))**
   - Problems:
- Code-side issue. We've noticed that the Airport labels are on the
wrong place.
   - Resolved:
- Code-side issue. All of the features under the `place_labels` layer
are now [displayed from the map].
         - [Explanation][1]

- **3rd attempt
([Argo](https://argo.linzaccess.com/workflows/argo/basemaps-vector-etl-shortbread-f52gq))**
   - Resolved:
- Code-side issue. All of the Airport labels are now [positioned
correctly on the map].
         - [Explanation][2]

<!-- external links -->

[missing from the map]:
https://basemaps.linz.govt.nz/@-44.6569182,168.5341070,z5?style=topographic-v2&i=topographic-v2&config=TmVmbYRQjL9T2JWgyaSie193b4D1qZnBD8hjaSqPFYSsEvEYYhaGYKrcjvsX1rDa8Rg42PReNbTHS4EK5h81M7foD7FFEegLN4mQz1di15yxdgjFRsr5LNmVQ6RFCFs&debug=true

[displayed from the map]:
https://basemaps.linz.govt.nz/@-44.6569182,168.5341070,z5?style=topographic-v2&i=topographic-v2&config=TmVmbYRQjL9T2JWgyaSie193b4D1qZnBD8hjaSqPFYSsEvEYYhaGYKrcjhEfXv3EK4AaPrUWqcZ4yq7mfih5opwKDAqtRdCcNF77exzMeyAZKrWAKVNf2Yx4mC4xfzH&debug=true

[positioned correctly on the map]:
https://basemaps.linz.govt.nz/@-41.3275878,174.8088966,z14?style=topographic-v2&i=topographic-v2&config=TmVmbYRQjL9T2JWgyaSie193b4D1qZnBD8hjaSqPFYSsEvEYYhaGYKrck9sbtrzRGUV1RMdVV7hv5TNfkSghCTZXt6rPYifGdjc8vgvmKhhjCGqRPyw1vPDAHJkwvpZ&debug=true

[1]: linz/basemaps#3462 (comment)
[2]: linz/basemaps#3467
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

container build pull request container for testing

Development

Successfully merging this pull request may close these issues.

3 participants