I'm trying to put a filled polygon on the ground, following the surface, but up to now none of my trials succeeded. I always get either a filled polygon hovering at some specific height (sometimes cutting through the terrain surface, depending on that height) or a mere outline of the polygon without any filling. I tried
- setting the height information to 0 (in coordinates and with tag
altitude), - setting the
altitudeModetoclampToGround(andclampToSeaFloor), - using the namespace extension
gx, but all to no avail. - using tag
tessellate(0 and 1), - using tag
extrude(0 and 1 and even higher values), - turning the order of the polygon points around (to switch from clockwise to counterclockwise),
but nothing worked.
Here is an example which I think is correct but doesn't work (this one shows no filling for the polygon, just the outline):
<?xml version="1.0" encoding="UTF-8"?>
<kml>
<Placemark>
<name>Filled Polygon Example</name>
<visibility>1</visibility>
<Style>
<LineStyle>
<color>FF00FFFF</color>
<width>1</width>
</LineStyle>
<PolyStyle>
<fill>1</fill>
<outline>1</outline>
<color>FF0000FF</color>
</PolyStyle>
</Style>
<Polygon>
<extrude>1</extrude>
<altitudeMode>clampToGround</altitudeMode>
<tessellate>1</tessellate>
<outerBoundaryIs>
<LinearRing>
<coordinates>
13.213,52.793,0
13.202,52.803,0
13.218,52.829,0
13.226,52.807,0
13.213,52.793,0
</coordinates>
</LinearRing>
</outerBoundaryIs>
</Polygon>
</Placemark>
</kml>
If you replace clampToGround by e. g. relativeToGround, you get the filling of the polygon, but it isn't following the surface but cutting flat through it.
I'm using Google Earth version 7.1.8 on Ubuntu 16.04.
What's curious is that I found some (quite old) forum posts which stated that this worked once (around 2006), unfortunately without a complete example. Is this a dropped feature?
I would be happy if anybody could provide an example KML which displays a filled polygon on the surface of the earth in Google Earth.