Skip to main content

HeightMap

Inherits from: object A class to represent a height map, typically derived from LiDAR or depth data. Attributes: data (np.ndarray): A 2D numpy array where each cell contains a height value. The shape is (height, width). resolution (float): The size of each cell in meters. For example, a resolution of 0.1 means each cell is 0.1m x 0.1m. origin (Position): The 3D world coordinates (x, y, z) of the corner of the cell (0,0) in the height map data.

get_world_coordinates

HeightMap.get_world_coordinates() -> Tuple[np.ndarray, np.ndarray, np.ndarray]
Calculates the 3D world coordinates of each cell in the height map. The (i, j)-th cell in the data array corresponds to a physical location. This method computes the X, Y, and Z coordinates for all cells. X and Y are grids representing the planar coordinates. Z is the height data itself.
Returns
returns
Tuple[np.ndarray, np.ndarray, np.ndarray]

to_dict

HeightMap.to_dict() -> dict
Serialize to dictionary for JSON transfer
Returns
returns
dict

from_dict

HeightMap.from_dict(data: dict) -> 'HeightMap'
Deserialize from dictionary
Arguments
data (dict)
dict
required
No description provided.
Returns
returns
'HeightMap'