UMEP-dev / UMEP

Urban Multi-scale Environmental Predictor
https://umep-docs.readthedocs.io/
59 stars 15 forks source link

Error with DSM Generator #553

Closed amerville98 closed 9 months ago

amerville98 commented 10 months ago

Describe the bug I have an AttributeError error when i process DSM Generator

To Reproduce I first tried with my own DEM and Polygon with building height but i had the same error by using data from Goteborg_SWEREF99_1200

Desktop (please complete the following information):

nilswallenberg commented 10 months ago

Hi,

Can you please attach your data.

Cheers, Nils

amerville98 commented 10 months ago

Hi, I had the error when i used data from the tutorial : https://umep-docs.readthedocs.io/projects/tutorial/en/latest/Tutorials/DailyShading.html#dailyshading (and the first time with my own)

nilswallenberg commented 10 months ago

Hmm, okay. I can use that data set (DEM) and create a DSM. Just made a quick test with the buildings shapefile that comes with the data set (used the KVALITET field but shouldn't matter).

Do you have a field in your polygon shapefile with information on building height?

amerville98 commented 10 months ago

I introduced a field with the same height for everyone one . I had also this error : image

I noticed that new fileds appeared after the field "height' each i try to run the function

image

biglimp commented 10 months ago

I updated QGIS to latest version (same as you) and could not replicate your error. Please send you building polygons and DEM for us to try.

amerville98 commented 10 months ago

error_dsm.zip

biglimp commented 10 months ago

You have not send the shapefile but the bdf-file. A shapefile is actually at leat 3 files (shp, dbf, shx). Include all files that is called buildings.

amerville98 commented 9 months ago

Sorry, it's here error_dsm_2.zip

biglimp commented 9 months ago

You are still missing files from the Gothenburg testdata, e.g. buildings.prj which is important as this include info on CRS for the building layer

amerville98 commented 9 months ago

buildings.zip

biglimp commented 9 months ago

Thanks. Just tested. I cannot replicate your error. I used the following settings (extent is taken from the DEM):

image

amerville98 commented 9 months ago

I used the same settings and i have the last error i sent

amerville98 commented 9 months ago

why did you use stats_me_1 which the field automatically create when i run the function ? In any case, I get this error with this field or with HEIGHT, which is my field that I created by hand (=10m for all entities).

nilswallenberg commented 9 months ago

I tried with the HEIGHT field and it worked. Difficult to figure out what could be the problem here.

Have you tried with the long term release of QGIS (Version 3.28.11 LTR)? You are now on 3.32.3, which is less stable.

biglimp commented 9 months ago

I have this settings: QGIS version: 3.32.3-Lima QGIS code revision: 67d46100b5 Qt version: 5.15.3 Python version: 3.9.5 GDAL version: 3.7.2 GEOS version: 3.12.0-CAPI-1.18.0 PROJ version: Rel. 9.3.0, September 1st, 2023 PDAL version: 2.5.5 (git-version: 24f78d)

I suggest that you uninstall QGIS and start a clean new installation. I will close this issue as it is not related to UMEP.