UMEP-dev / UMEP

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

Tree Generator #33

Closed sunt05 closed 4 years ago

sunt05 commented 6 years ago

Original report by Andrew Speak (Bitbucket: andyspeak33, ).

The original report had attachments: t1.jpg, t2.jpg, t3.jpg, Bolzanoshapefiles.zip, bolzano shapefiles.7z, vittoriashapefiles.7z


I am going through the steps to create a TDSM and CDSM. I have a pointfile containing all the necessary information (I have rounded the heights etc to the nearest meter because I thought this may have been causing the problem before). I have the DSM and DEM in the same resolution and extent.

The tool runs for a few seconds then produces the tiffs but when I load them they are all black and their values are NAN to 0.

Any idea what I am doing wrong?

sunt05 commented 6 years ago

Original comment by Fredrik Lindberg (Bitbucket: fredrik_ucg, ).


QGIS displays raster data, not based on min and max values of your raster, but cuts the data. Go to Properties of your CDSM layer and choose to display based on e.g. 0 to 40 and see if that solves your issue.

sunt05 commented 6 years ago

Original comment by Andrew Speak (Bitbucket: andyspeak33, ).


Hello. Thanks for the quick response but I think the raster is just full of zeros. No amount of playing around with the display and loading min/max values alters this. And using the identity features tool on the layer returns zeros everywhere too.
Andy

sunt05 commented 6 years ago

Original comment by Fredrik Lindberg (Bitbucket: fredrik_ucg, ).


Ok, thanks. Could please attach your DSM, DEM and point file.

sunt05 commented 6 years ago

Original comment by Andrew Speak (Bitbucket: andyspeak33, ).


sunt05 commented 6 years ago

Original comment by Fredrik Lindberg (Bitbucket: fredrik_ucg, ).


The attached DSM and DEM are hillshade models and not actual raster models of height above e.g. sea level. Use correct data and try again. Explore the data used in the tutorial on SOLWEIG (http://urban-climate.net/umep/UMEP_Manual/_Tutorials/IntroductionToSolweig) if you are unsure on what the DEM and DSM should look like.

sunt05 commented 6 years ago

Original comment by Andrew Speak (Bitbucket: andyspeak33, ).


Hello. Sorry I really dont understand what I am doing wrong. I have tried running the tree generator with DSMs and DTMs created from two different source datasets, added to the project as both geoTIFF and ASCII, cropped and uncropped. The problem is always the same. A message pops up instantly (i.e. zero processing wait time) saying the CDSM have been created but then the tool seems to be still processing as the green bar moves across the field at the bottom. Yet every time the CDSM and TDSM are empty of values.screenshot.jpg

sunt05 commented 6 years ago

Original comment by Fredrik Lindberg (Bitbucket: fredrik_ucg, ).


First, your points must be located within your model domian. I removed your point outside and the CDSM was generated. I plan to update the plugin later so that the plugin does not crash if tree points are outside the model domain but that will not be happing now. Second, Your DSM includes vegetation. These should not be included. The DSM should only consist of buildings and ground heights. Otherwise your CDSM will look like below. Clipboard01.jpgClipboard02.jpg

sunt05 commented 6 years ago

Original comment by Andrew Speak (Bitbucket: andyspeak33, ).


Sorry to keep asking questions - i really am trawling through forums before I resort to taking up your time.My problems are getting more specific now. I have managed to succesfully use the tree generator for one of my areas. I cannot do it for the remaining 4 areas though. To get to this point I had to re-clip my rasters after generating building-only DSMs and then I had to re-unify the extent and position of my rasters because one of the previous steps had knocked them slightly out of sync. Now when I try and run the tree generator I get the error message "ValueError: could not broadcast input array from shape (15,15) into shape (14,15)". Any suggestions?

sunt05 commented 6 years ago

Original comment by Fredrik Lindberg (Bitbucket: fredrik_ucg, ).


Attach your DSM, DEM and point file. Please also include full error message generated.

sunt05 commented 6 years ago

Original comment by Andrew Speak (Bitbucket: andyspeak33, ).


Please find attached

sunt05 commented 6 years ago

Original comment by Andrew Speak (Bitbucket: andyspeak33, ).


The error message reads. Traceback (most recent call last): File "C:/Users/aspeak/.qgis2/python/plugins\UMEP\TreeGenerator\tree_generator.py", line 377, in start_progress trunk, dia, rowa, cola, sizex, sizey, scale) File "C:/Users/aspeak/.qgis2/python/plugins\UMEP\TreeGenerator\makevegdems.py", line 65, in vegunitsgeneration vegdemtemp[int(rowmin):int(rowmin + rowmax), int(colmin):int(colmin + colmax)] = trees ValueError: could not broadcast input array from shape (15,15) into shape (14,15)

sunt05 commented 6 years ago

Original comment by Fredrik Lindberg (Bitbucket: fredrik_ucg, ).


As I suspected. There is an issue where points close to the edges of the domain can cause issues if the vegetation unit will extend outside of the grid. I removed some points at the egdses and it worked. We will improve this when we find the time. In the meanwhile, just remove points close to the edge and re-run the plugin. I will change the status of this issue to 'on hold'. Clipboard01.jpg

sunt05 commented 6 years ago

Original comment by Fredrik Lindberg (Bitbucket: fredrik_ucg, ).


Issue with point close to domain edges. Will be improved in future versions.

sunt05 commented 6 years ago

Original comment by Andrew Speak (Bitbucket: andyspeak33, ).


OK thanks! Luckily I am more concerned about the locations in the centre of the area so removing trees at the edge is no problem

sunt05 commented 6 years ago

Original changes by Andrew Speak (Bitbucket: andyspeak33, ).


set attachment to "Bolzanoshapefiles.zip"

sunt05 commented 6 years ago

Original changes by Andrew Speak (Bitbucket: andyspeak33, ).


set attachment to "bolzano shapefiles.7z"

sunt05 commented 6 years ago

Original changes by Andrew Speak (Bitbucket: andyspeak33, ).


set attachment to "vittoriashapefiles.7z"

sunt05 commented 6 years ago

Original changes by Fredrik Lindberg (Bitbucket: fredrik_ucg, ).


changed state from "new" to "on hold"

vsoubry commented 4 years ago

Hello, i am having the exact same problem as you and it doesnt seem clear what corrected the problem. What did you do to make it work? It would mean the world to me if you answered i'm sort of stuck in my masters thesis because of this step. Thank you.

sunt05 commented 4 years ago

Hi @vsoubry, are you using the latest UMEP version? can you report the versions of your QGIS and UMEP? Since I'm not the developer of this plugin, @biglimp may be more helpful?

biglimp commented 4 years ago

As this issue is dealt with else where I am closing this again.