KML Altitude and Altitude Modes Explained
A plain-language guide to KML’s third coordinate value, altitudeMode behavior, terrain-relative features, and common 3D display problems in Google Earth.
KML coordinates can include a third altitude value, while altitudeMode controls how that value is interpreted. ClampToGround follows terrain, relativeToGround offsets from terrain, and absolute uses height relative to sea level. Choose the mode that matches your data and test it in a KML viewer.
KML Viewer
Preview KML geometry and inspect whether altitude settings place features correctly.
What the Third KML Coordinate Means
KML coordinates are written as longitude,latitude,altitude. The altitude value is optional for many ground features, but it becomes important for 3D points, tracks, buildings, and overlays. A numeric third value alone does not tell the viewer whether the height is above terrain or sea level; altitudeMode supplies that context.
ClampToGround, RelativeToGround, and Absolute
ClampToGround places a feature on the terrain surface and generally ignores a meaningful height value. RelativeToGround adds the altitude above the local terrain. Absolute interprets the height relative to sea level. Google Earth and related viewers may support additional terrain-relative modes for specific geometries, so confirm the target viewer’s behavior.
Fix Features That Float or Disappear
A feature can float when a terrain-relative value is treated as absolute, or appear underground when the sign or reference level is wrong. Check the coordinate order, units, altitude sign, and altitudeMode together. Test a single known point before changing a long track or polygon.
A KML altitude value is only as reliable as its source datum, units, and reference surface.
Validate and Preview 3D KML
Run the file through a KML Validator for XML and coordinate checks, then open it in the KML Viewer or Google Earth. Tilt the camera, inspect a known control point, and compare the visual height with the source survey or GPS data. Keep the original file before editing altitude values.
What Happens When Converting to GPX
When KML is converted to GPX, a supported third coordinate can become an elevation element. The numeric value may transfer, but the original KML altitudeMode semantics do not have a perfect GPX equivalent. Verify the track in the destination app before relying on elevation profiles.
Explore Related Spatial Tools
People Also Ask About KML Altitude and Altitude Modes Explained
Essential questions answered with verified geodesic formulas, datum standards, and practical mapping advice.
altitudeMode tells a KML viewer how to interpret the optional third coordinate value relative to terrain or sea level.
Geospatial Content Team
Specializing in geodetic algorithms, WGS84 coordinate mathematics, and large-scale spatial mobility studies across North America and Europe.
Senior GIS Analyst
Reviewed against the calculation method and source limitations documented for each tool. Provider-backed results and real-world conditions can vary.
More From the Geospatial Blog
View all guidesHow to Draw a Radius on Google Maps (and Free Map Radius Tools)
A definitive guide on drawing 5-mile, 10-mile, or custom distance circles around addresses on Google Maps, overcoming Web Mercator distortion, and using free dedicated radius tools.
How to Calculate Driving Distance Between Two Points (Road vs Straight-Line)
A comprehensive technical and practical guide to calculating road driving distance versus straight-line geodesic distance between addresses, coordinates, and cities.
How to Find the Elevation of an Address or Location (Above Sea Level)
A complete guide to finding the exact elevation above sea level for any home address or coordinate point using USGS LiDAR, Copernicus 30m DEMs, and GPS sensors.