-
Notifications
You must be signed in to change notification settings - Fork 3
/
height_calculator.py
35 lines (30 loc) · 1.71 KB
/
height_calculator.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# -*- coding: utf-8 -*-
"""
/***************************************************************************
LiDARForestryHeight
A QGIS plugin. LiDAR Forestry Height
generates a DEM with the forest height,
calculated from a classified LiDAR point
cloud using LasPy Library
Generated by Plugin Builder: http://g-sherman.github.io/Qgis-Plugin-Builder/
-------------------
begin : 2018-09-24
copyright : (C) 2019 by PANOimagen S.L.
email : [email protected]
git sha : $Format:%H$
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
"""
import numpy as np
def height_calc(surfaces_array, terrain_array):
""" This function calculates the difference between two raster arrays
"""
difference = surfaces_array - terrain_array
return difference.astype(terrain_array.dtype)