Skip to content

feat(kart-import): Add the config and fixups for carto_text. BM-1868 - #393

Open
Wentao-Kuang wants to merge 10 commits into
masterfrom
feat/import-carto-text-config
Open

Wentao-Kuang wants to merge 10 commits into
masterfrom
feat/import-carto-text-config

Conversation

@Wentao-Kuang

@Wentao-Kuang Wentao-Kuang commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Motivation

Adds the kart-import config and fixups for importing nztopo50_carto_text. Reimplement the fixups from LAMBS carto-text import and example-point-id fixups

Modifications

  • Theme config (config/themes/nztopo50_carto_text.yml): maps the raw linz_carto_text source fields and wires up the two fixups below.

  • carto_text_styling fixup: using carto_text_styling.csv to decode and mapping the style fields and populate into the output data. carto_text_styling.csv files is simplified csv file from the original mapping sheet , which is easier for processing.

  • carto_text_example_point_id fixup: links each map-sheet example label to its example point with the following two steps:

  1. Exact name match with only one match from all data.
  2. For duplicated match, find the nearest one within 200 m, based on the geomerty feature.
  • Schema: adds the worddistance field to nztopo50_carto_text.

Verification

Unit test, and data pushed into linz/topographic-product-data-dev#1 for review.

Comment thread packages/kart-import/src/kart_import/fixups.py Outdated
Comment thread packages/kart-import/src/kart_import/fixups.py Outdated
Comment thread packages/kart-import/src/kart_import/fixups_test.py
Comment thread packages/kart-import/config/themes/nztopo50_carto_text.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants