Skip to content

question on the Solar Energy on Building Envelopes tool #488

Answered by biglimp
yaron1000 asked this question in Q&A
Discussion options

You must be logged in to vote

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 …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@yaron-michael
Comment options

Answer selected by biglimp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants