Elevation comparison differences using global or local SceneView in JS API

661
4
11-25-2020 06:10 AM
Jay_Gregory
Occasional Contributor III

I have users that compare (visually) elevations of different features in a JS API 4.11 SceneView.  I've noticed different behavior based on whether the SceneView viewingMode is global or local in the application, and I was hoping someone could explain it to me so I can explain it to my users.  

For example, I have a roughly 40x40 mile polygon extruded to 16500 feet, and then plot a plane flight path that does not get higher than 16400 feet.  When the SceneView viewingMode is set to global, the plane appears above the extruded polygon (by about 330 feet).  But when the viewingMode attribute is set to local, the plane, as expected, appears below the roof of the polygon.  Please see attachments for screenshots. 

I was hoping someone could explain to me why this is happening. 

Thanks!

0 Kudos
4 Replies
JohnGrayson
Esri Regular Contributor

I wonder if it has to do with the earth curvature?  Extruded polygons only extrude around the edges, and thus the polygon interior is flat.  On a globe, the closer to the center of the polygon you are the lower it will be.

0 Kudos
Jay_Gregory
Occasional Contributor III

@JohnGrayson Very interesting - I guess that would explain it, though it doesn't really make it easier to explain to my users.  So the top of an extruded polygon will be closer to the ground in the center than the edges because it's only extruded at the edges and the earth curvature is convex w/r/t the polygon (see image).  

0 Kudos
JohnGrayson
Esri Regular Contributor

That is my understanding, but I'll double-check with the dev team...

RalucaNicola1
Esri Contributor

John and Jay, you are right, that is how polygons are currently extruded on the globe. The top of the extrusion is a plane, it doesn't follow the curvature of the Earth.