Skip to content

LIBKML: numerical <name>s trigger <SimpleData> #14325

@jidanni

Description

@jidanni

What is the bug?

LIBKML_USE_SIMPLEFIELD=YES/NO needs a third choice to prevent any
hijacking of <name> fields.

Steps to reproduce the issue

Currently the only workaround is to make strings out of numbers:

$ ogr2ogr workaround.kml :memory: -f LIBKML -sql \
"SELECT ST_Point(121,24), 41 || '' AS name"
$ grep 41 workaround.kml
    <name>41</name>

Without || '' the <name> tag gets gobbled up into <SimpleData>.

https://gis.stackexchange.com/questions/500530/how-to-stop-ogr2ogr-f-libkml-simpledata

Versions and provenance

GDAL 3.10.3, released 2025/04/01

Metadata

Metadata

Assignees

No one assigned

    Labels

    not for AI loversSee https://gdal.org/en/stable/community/ai_tool_policy.html

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions