-
question on the Solar Energy on Building Envelopes tool |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
We know that the format of Energyyearwall.txt could be improved and we are working on an update. There is no simple way to do this but here is what I would have done: Run a Python code in the QGIS script editor looking something like this:
The code is not tested and will probably not work the first time (I always mess up rows and columns etc.) But what I do is to create an empty matrix with the same size as the DSM used and fill those numbers with the sum of radiation on a wall pixel and then save as a raster geotiff. Then you need to find a way to relate wall pixels to a specific building using e.g. a vector dataset and zonal statistics. |
Beta Was this translation helpful? Give feedback.
We know that the format of Energyyearwall.txt could be improved and we are working on an update. There is no simple way to do this but here is what I would have done:
Run a Python code in the QGIS script editor looking something like this:
from osgeo import gdal
import numpy as np
from osgeo.gdalconst import GDT_Float32
gdal_data= gdal.Open(string_variable_specifying_filepath_to_the_dem_used_in_SEBE)
grid_array = gdal_data.ReadAsArray().astype(np.float)
newraster = grid_array * 0.0
walldata = np.loadtxt(string_variable_specifying_path_to_Energyyearwall.txt, skiprows = 1)
for i in range(0, walldata.shape[0]):
newraster[walldata[i, 0] -1, walldata[i, 1] -1] = np.sum(walldata[i, 2:]
# save …