Terrain elevation and altitude types?

I’ve been digging around through Cesium source, docs, and group posts to get a better grasp on how to implement various application requirements based on Cesium’s current features. I’ve previously implemented things using Google Earth, so I’ve been trying to put together a mental mapping of GE concepts to Cesium concepts.

There’s two particular scenarios that I’m not sure about at the moment. The first is being able to define altitudes in terms of “AGL” (“Above Ground Level”). The GE equivalent would be AltitudeMode.ALTITUDE_RELATIVE_TO_GROUND. Looking at the Cesium.Cartographic class, the “height” parameter is defined as “The height, in meters, above the ellipsoid.” I interpret that to be equivalent to MSL (“Mean Sea Level” / AltitudeMode.ABSOLUTE). Am I correct that Cesium does not have any particular support for AGL altitudes right now? (I’m assuming not, especially since terrain support was just added.) I’m particularly looking to be able to show billboards and polylines whose positions are automatically rendered appropriately above terrain. It’d be great if the polylines would automatically flow up and over the terrain mid-segment, but I’d settle for just having the specifically-entered points be rendered at the right places.

The other related thing I’m looking to do is query Cesium about terrain elevation at a given lat/lon. I see a previous discussion from earlier this month that says some people have put something together, but no indication that that feature has made it into Cesium’s source yet. Anyone know if that ability is coming soon?

Thanks!

Mark Erikson

Hi Mark,

These are reasonable requests, and they’re on the roadmap (https://github.com/AnalyticalGraphicsInc/cesium/issues/526), but it may be a little while before we get to them. In the meantime, your best bet is to adopt one of the approaches mentioned in that previous discussion in order to find heights at a point and manually place objects at those heights.

Just a clarification, the ellipsoid and MSL are not the same thing. The ellipsoid (usually WGS84 for Earth), is a commonly-used mathematical approximation of the Earth’s shape. Mean sea level (usually EGM96 or EGM2008 for Earth) is a much messier shape determined by measuring the Earth’s gravitational field at a bunch of locations, and it may be either above or below the ellipsoid. Mixing up the ellipsoid and MSL will make your heights incorrect on the order of tens of meters.

Kevin

Hi Mark,

I'm working with Patrick Cozzi on collecting showcases for the Cesium website: http://cesiumjs.org/demos.html. You've been an active member of the Cesium community for a long time, and I wondered whether you had a project that might be a good fit for our demos page. Let me know if you're interested.

-Sarah

Unfortunately, the two applications I’ve been working on are internal and proprietary, so there’s nothing I can share publicly. That said, I appreciate the request, and am amused that my participation has been noticed :slight_smile:

Oh, that's too bad we can't showcase them. I hope Cesium's meeting all your needs, though, and that you keep contributing to the forum!

Sarah