Skip to content

KML: duplicate ExtendedData keys keep only the first value; a description field comes back renamed #1901

Open

Description

@Mavrick-F

Two KML round-trip gaps found in review of #1900, both older than it:

  1. A placemark with the same ExtendedData key twice keeps only the first value, silently. The reader takes the first <Data name="k"> for each key (kml.rs, the attribute loop in layers), so in <Data name="n">0</Data><Data name="n">5</Data> the 5 is dropped with no notice. This applies to every key. The reader could count such placemarks and say so, or keep the later values under a free name.
  2. A field named description, folder or style comes back renamed on every export and re-read. interop::to_kml writes <name> from the name field and every field as ExtendedData, but never <description>. Since fix(data): KML extended data named like a placemark column keeps its values #1900 the reader keeps such a key as description_1 and says so; before, the values were dropped. Writing <description> from a description field would keep the column's name. folder and style have no such element, so for them the notice stays.

Activity

  1. choupeanut commented on Nov 13, 2026

    @choupeanut
    Contributor

    I'll take part 1: report duplicate ExtendedData entries while retaining the reader's existing first-value-wins behavior. I checked the timeline, assignees, comments and open PRs; I found no claim or PR for this part. #1900 addresses reserved-column collisions, so I will keep that behavior separate, and leave the description/folder/style export discussion (part 2) open. Planned regression coverage: Data/SimpleData duplicates, multiple keys and placemarks, mixed geometry, clean input with no notice, and propagation to session notices. No dependency or serialized-format changes.

  2. choupeanut commented on Nov 15, 2026

    @choupeanut
    Contributor

    I'll take the remaining description-export part. Part 1 landed in #1906; I rechecked the issue comments, assignees, timeline and current open PRs and found no claim or PR for this part. I'll write the canonical text description field to the standard Placemark description as well as retaining its ExtendedData copy, following how the exporter already writes name. Regression coverage will include KML/KMZ round trips, XML/HTML text, null descriptions, repeated exports, and collisions that must still be reported (folder/style, differently-cased or typed description fields). No dependency, command-parameter or project-format changes.

  3. choupeanut commented on Nov 15, 2026

    @choupeanut
    Contributor

    Implemented the canonical text-description export fix in #2174 (ready for review). Three successive KML and KMZ round trips retain the description value and column name, with no rename notice. Existing typed/differently-cased descriptions and folder/style collisions keep their reports. All 12 focused KML tests, full local CI, test-hygiene, pre-commit and strict wasm checks pass. The PR also registers the newly moved GeoLibre parity document, fixing the current main's docs-catalog test failure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions