Commit 7c03aa56 authored by luroth's avatar luroth
Browse files

fix: NA if NA in canopy model

parent 145a777d
......@@ -240,18 +240,24 @@ def create_elevation_diff_GeoTiff(file_path_DTM, file_path_DSM, path_output_file
# convert to float16
ph_arr = np.array(ph_arr, dtype=np.float32)
# set to nadata if no value in height model
ph_arr[np.where(dsm_arr == nondata_val)] = nondata_val
# write geoTIFF
driver = gdal.GetDriverByName('GTiff')
ds_ph = driver.Create(path_output_file, xsize=ph_arr.shape[1], ysize=ph_arr.shape[0], bands=1, eType=gdal.GDT_Float32)
band1 = ds_ph.GetRasterBand(1)
# set geotransform from DTM
# set projection
band1 = ds_ph.GetRasterBand(1)
# write to file
ds_ph = None
......@@ -44,7 +44,7 @@ in a windows comand window:
1. Download the python script [](
2. Open Agisoft Metascan
3. Select "Tools" -> "Run Script..." and run the downloaded script
4. The menu "ETHZ CS Plugin" appears: ![cs menu](doc/cs_menu.png)
4. The menu "ETHZ CS Plugin" appears: [cs menu](doc/cs_menu.png)
5. Select "ETHZ CS Plugin" -> "Generate image masks"
6. Select the geojson file with the plot polygons that you prepared
7. Select an empty folder where the masks will be saved
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment