[mapserver-users] MapServer 6 and KML outputformat
Armin Burger
armin.burger at gmx.net
Thu Mar 10 15:29:47 PST 2011
Hi all
the outputformat KML in the new MS 6 is quite nice and it allows easy
and flexible data export to KML especially via Mapscript. But the
implementation of the export of data attributes could be improved IMHO.
Currently the fields/items of the layers (defined under map file
METADATA KML_INCLUDE_ITEMS) are exported to a KML tag "<description>"
and inserted as HTML table. While this is of course possible, a cleander
way would be how GDAL/OGR exports the attributes:
GDAL/OGR uses the tag <ExtendedData> and places the attribute values in
<SimpleData> tags, like
<Placemark>
...
<ExtendedData><SchemaData schemaUrl="#cities">
<SimpleData name="Name">Berlin</SimpleData>
<SimpleData name="GEONAMEID">3899412</SimpleData>
<SimpleData name="ISO2_CODE">DE</SimpleData>
<ExtendedData>
This leads to a much better display in Google Earth.
In addition to the KML_INCLUDE_ITEMS, another possibility to define a
field/item used in KML for the <name> tag would be useful, like OGR
allows this via the NameField option. So maybe a METADATA definition
like KML_NAME_FIELD could do this.
Best regards
Armin
More information about the MapServer-users
mailing list