[Marble-devel] export kml

Konrad Enzensberger e.konrad at mpegcode.com
Fri Nov 4 10:11:56 UTC 2011


Hi,

i add Export2Kml() methode to my app to be able to export
GeoObjects like Rect, Ellipse, ... into kml files.
If you like to export e.g. a rect with transparent fill color you need
to add PolyStyle to kml.

Using the GeoDataStyle class it is possible to set poly style:
GeoDataStyle::setPolyStyle(...)
But poly style is not written to kml file, because of missing
KmlPolyStyleTagWriter, so i add this (find attached)

Viewing my exported kml in GoogleEarth i faced that the transparent color is
missing.
This is because a LinearRing tag has to be enclosed within:
<Polygon> and <outerBoundaryIs> tags, see Kml reference:

http://code.google.com/intl/de-DE/apis/kml/documentation/kmlreference.html#linearring

So i modified the KmlLinearRingTagWriter to create this tag's
and additional write the altitude value to <coordinates> tag
(find attached)

Now all works like expected.
ToDo: adding <tesselate> and <altitudeMode> tags.

I am not member of marble developer team, maybe some one of you like to add
my modifications to marblewidget,

br, konrad 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kml.zip
Type: application/x-zip-compressed
Size: 2133 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/marble-devel/attachments/20111104/1e464375/attachment.bin>


More information about the Marble-devel mailing list