Uni Bremen Home MARUM - Sediment Geochemistry - Leobener Str - D-28359 Bremen - Germany
Marine Geochemistry - Laboratory Methods

inLab Main

Tipps-page


Some basics creating 3D buildings in google earth kml files
basics

Google Earth® allows polygons that may be defined in 3D space by xyz coordinates and that may be extruded to a certain height above ground. Using this function, the buildings that appear in some big cities like NewYork when you check the buildings box have been defined for GE. You can also define your own 3D objects. It is recommended to use Google SketchUp to easily create 3D objects. Yet you need the new version of GE (4) to interactively place them on Earth

example GE screen my office placemark

The below file is an example of a small kml file to display a simple building consisting of 4 parts (two outer boxes and two inner parts with a tilted roof).

For some cities such buildings are already included in GE

minimum kml file for placemarks

simple kml - file

multiple placemarks in one file

overlay maps on Googles Earth

fix if kml-files from your server do not open in GE

watch and play route in Google Earth

fix if Google Earth does not connect  to server

example file
GeoBuilding

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.0">
  <Document>
  <Placemark>
    <name>
GeoBuilding</name>
    <LookAt>
      <longitude>8.853193712983327</longitude>
      <latitude>53.10919982492059</latitude>
      <range>500</range>
      <tilt>50</tilt>
      <heading>230</heading>
     </LookAt>
   <Style>
   <PolyStyle>
     <color>78ffffff</color>
   </PolyStyle>
   </Style>
   <MultiGeometry>
   <Polygon>
     <extrude>1</extrude>
     <altitudeMode>relativeToGround</altitudeMode>
     <outerBoundaryIs>
       <LinearRing>
          <coordinates>
8.852856,53.109330,20 8.852975,53.109297,20 8.852455,53.108670,20
8.852336,53.108706,20 8.852856,53.109330,20
         </coordinates>
       </LinearRing>
      </outerBoundaryIs>
     </Polygon>
     <Polygon>
       ...........
2nd polygon
     </Polygon>
     <Polygon>
      <extrude>1</extrude>
      <altitudeMode>relativeToGround</altitudeMode>
      <outerBoundaryIs>
        <LinearRing>
          <coordinates>
8.852975,53.109297,20 8.853031,53.109285,23 8.852509,53.108651,23
8.852455,53.108670,20 8.852975,53.109297,20

         </coordinates>
       </LinearRing>
      </outerBoundaryIs>
     </Polygon>
       ...........
4th polygon
     </Polygon>
    </MultiGeometry>
  </Placemark>
 </Document>
</kml>

xml declaration header
kml tag, opens Google Earth®
Document tag opener
Placemark tag opener
name is optional
LookAt
defines the location, height and angle of the viewpoint.
Here a view like standing on the Bremen DropTower looking southwest is defined.




PolyStyle - color is used to make the 3D object transparent


MultiGeometry. If you want to define more than one object you need to embrace them whith MultiGeometry
Polygon tag.
extrude tells GE to connect the polygon lines vertically to the ground (if in altitudeMode relative to ground)
outerBoundaryIs defines that this is an outer boundary of a 3D object. if you want to cut out things from existing objects you use innerBoundaryIs
LinearRing means its a closed LineString. You need a last point that is identical with the first one to close the polygon
coordinates : several
Point locations are defined by longitude and latitude in decimal degrees and height in m. Western longitude and Southern latitude are written as negative degrees


The third and fourth polygon are tilted to make up the middle part of the building (note the z coordinates are 20 and 23m respectively)

tipps

Defining Polygons or paths is not allowed in the free version of Google Earth. Yet you can create them manually, as the syntax is not too complicated, or you have a program interface, that creates such files in KML format from your own application such as ArcView or AutoCAD. For some programs such export filters have already been written and made available..

In combination with Google Earth 4 you can create 3D objects in SketchUp (Google just released a free version of it) and glue images to the vertical surfaces

If you want to use Google Earth 4, make sure you have a fast computer, a good graphics card and a fast internet connection!

page created by M.Kölling & T.Feseker