Graphics appearing under the base layer

1062
5
Jump to solution
10-19-2021 02:05 PM
KaiBawcom
New Contributor II

Hello,

I am pulling in real location data for planes in the air. When I set the altitude of these planes in our test tool to a low number such as 10, when I zoom in on the tracks they will go under the elevation layer. This is using the #d Scene View. When I take off the elevation layer the tracks appear better. Is there a way I can prevent graphics from going through the elevation layer? I would use the surface placement feature but I still want the tracks to appear in the air when they actually are in the air. I have also tried to add the elevation if where the plane is above to the Z offset of the graphic but no luck. I know there are NavigationConstreaints for the camera but what about graphics? The view in the picture is from under the surface of the earth.. If I zoom out enough I can get the tracks to appear above the surface. 

 

-Kai

0 Kudos
1 Solution

Accepted Solutions
MarkBaird
Esri Regular Contributor

@KaiBawcom it may help if you looked at how Z values work with the difference surface placement modes which are explained in this sample.

I suspect you are using the ABSOLUTE surface placement mode which you can think of as height above sea level which is exactly what you should be using for tracking aircraft elevation.  This does however mean that if your surface is 20m high and you place your aircraft 10m high, it disappears beneath the terrain; this is as expected.

If you want to have an elevation which is a number of meters above the terrain then you can consider using the RELATIVE surface placement mode.

Does this help?

 

View solution in original post

5 Replies
KaiBawcom
New Contributor II

I was able to add the calculation of the elevation to the altitude of the track. I was getting null for the elevation future because I did not set a spatial reference for the point I was measuring the elevation of. Looks much better. However I am still worried about all the async calls to the elevation. Is there a better way to approach what I am doing?

0 Kudos
MarkBaird
Esri Regular Contributor

@KaiBawcom it may help if you looked at how Z values work with the difference surface placement modes which are explained in this sample.

I suspect you are using the ABSOLUTE surface placement mode which you can think of as height above sea level which is exactly what you should be using for tracking aircraft elevation.  This does however mean that if your surface is 20m high and you place your aircraft 10m high, it disappears beneath the terrain; this is as expected.

If you want to have an elevation which is a number of meters above the terrain then you can consider using the RELATIVE surface placement mode.

Does this help?

 

KaiBawcom
New Contributor II

If I am receiving data in ECEF xyz in meters should I use Absolute or Relative? Our code also converts the ecef xyz to LLA. Also does calculating the elevation of a point every 2 seconds for x amount of graphics use up a lot of processing? If so should I avoid using Absolute and just use Relative? Thanks for the help @MarkBaird

0 Kudos
MarkBaird
Esri Regular Contributor

@KaiBawcom the conversion from ECEF to LLA will be giving you a height above sea level so the correct mode for an aircraft flying in the air is ABSOLUTE.  For an aircraft if you use RELATIVE and fly over a mountain, then the path followed will look very odd and would be completely incorrect.

As you have seen if you have an asset on the ground and there is an inaccuracy in either the calculated altitude or indeed the terrain data, it is possible you end up with a location disappearing underground.  Although it might not be desirable for your application this is expected behaviour as we also need to support sub-surface items such as the location of things underground, or maybe submarines beneath the water for example.

You've come up with one solution to check the height of the terrain and fudge the altitude, but this sounds messy and may not scale very well once you've got many thousands of items on your display.  If you've only got a few items it might be okay, but we wary of this solution.

Another option you could consider if you have a way of detecting if something is on the ground (a vehicle or an aircraft which you know is landed), is to use DRAPED_BILLBOARDED.  This basically ignores the Z value and just fixes an item to the ground regardless of the terrain.

Without fully understanding your application its hard to give you a definite solution, but hopefully I've helped with telling you about the options.

KaiBawcom
New Contributor II

Thank you so much @MarkBaird ! That is very helpful information.

0 Kudos