UMEP-dev / UMEP

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

Morphometric Calculator (Grid) clarification #305

Closed DimitrisTsi closed 3 years ago

DimitrisTsi commented 3 years ago

Hello I would like to ask a question regarding the use of non rectangular grids. I want to run the morphometric calculator for the buildings DSM as seen in the attached image for the area denoted by the red polygon. If i run the morphometric calculator using the polygon in red as the 'vector polygon grid' i get the error " LINE 216 "if np.sum(dsm_array) == (dsm_array.shape[0] dsm_array.shape[1] nd):" ERROR MESSAGE: unsupported operand type(s) for *: 'int' and 'NoneType' " So i would like to ask which is the correct way to do this. Should i mask all values outside the red polygon (assigning them to nan), and run the process using the purple rectangle (it's the red polygons extracted extent) ? I know this is not a bug but a technical question, however any help would be greatly appreciated! Thanks!

QGIS version : 3.14 UMEP version : 3.17.3 Στιγμιότυπο 2021-07-13, 9 49 38 πμ

rarygit commented 3 years ago

As I understand it, Issue #12 (Closed, 18 Nov 2016) has resolved this:

"The LandCoverFractionGrid is only working with squared (or rectangular) polygon grids allinged with the CRS used. This will be fixed so that any shape of grids can be used." "Resolved. Option to include NoData values included."

https://github.com/UMEP-dev/UMEP/issues/12

From this one could deduce that masking the Land Cover Fraction grid is the decisive dataset in your situation. If I have time I will try masking the Land Cover Fraction grid a tutorial dataset.