I am working on analyzing the elevation/height of buildings and various areas within Cesium by clicking on the map. The goal is to determine whether signals are being obstructed or passing through without interference. To achieve this, I am interacting with the map in 2D view, clicking on multiple locations that include buildings, parks, stadiums, and other structures.
Each time I click on the map, I record the coordinates and pass them to the sampleTerrainMostDetailed
method to retrieve precise elevation data. Using this data, I intend to generate a distance vs. height graph to visualize the terrain and building heights accurately.
However, I am encountering an issue specifically with buildings and their surrounding areas. While terrain regions correctly return positive height values, large buildings are producing negative height values (e.g., -20 or -26 meters). Since signal towers are typically located within urban environments, I need accurate altitude data for buildings within the city rather than incorrect negative values.
To resolve this, I have experimented with various methods such as:
getPickRay
pickEllipsoid
pickPosition
Despite these attempts, I am still receiving negative height values for buildings. I need a reliable way to obtain the true height of buildings from the ground level rather than a negative offset.
Could you suggest an effective approach to ensure accurate elevation readings for buildings within city areas?