-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tree planter tool bug #52
Comments
Also, the model runs correctly and produces desired results with the example data provided (https://umep-docs.readthedocs.io/projects/tutorial/en/latest/Tutorials/IntroductionToTreePlanter.html). This issue comes up when I am using my data. Thanks |
Fixed problem with TreePlanter error "0 possible locations for trees"
Hi, I have updated the code. Hopefully it works now. Please give it a try (download from the repository and install in qgis via zip). :) Cheers, |
Is this resolved? Can I close this issue? Cheers, |
Hi Nils, Yes, the issue is now resolved. I could successfully run the model over my study area. Many thanks, |
Good to hear Harsh! A side note and maybe you're already aware of this, but I saw that you ran SOLWEIG with UTC0, whereas Austin is UTC-6 (I think). I will close this issue now. Best, |
Hi,
I am trying to use the tree planter tool over Austin, Texas USA. I am using the latest version of UMEP for processing (2.0.13). I could run the SOLWEIG model to generate the mean radiant temperature maps successfully. However, I ran into some issues while using the tree planter tool. Here is the issue:
Traceback (most recent call last):
File "C:/Users/user/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\processing_umep\postprocessor\treeplanter_algorithm.py", line 408, in processAlgorithm
shadow_rg, tmrt_1d, nTree, ITERATIONS, sa, feedback)
File "C:/Users/user/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\processing_umep\functions\TreePlanter\TreePlanter\TreePlanterHillClimber.py", line 74, in treeoptinit
r_iters, counter, dia)
File "C:/Users/userAppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\processing_umep\functions\TreePlanter\TreePlanter\StartingPositions.py", line 35, in genetic_start
tree_pos, tp_c, break_loop = random_start(pos, trees, tree_pos_all, r_iters)
File "C:/Users/user/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\processing_umep\functions\TreePlanter\TreePlanter\StartingPositions.py", line 7, in random_start
tree_pos = np.random.choice(pos, trees) # Random positions for trees
File "mtrand.pyx", line 915, in numpy.random.mtrand.RandomState.choice
ValueError: 'a' cannot be empty unless no samples are taken
Execution failed after 1.91 seconds
Running with greedy algorithm...
0 possible locations for trees...
Not enough space for all trees! Found locations for 0 out of 3 trees.
TreePlanter: Model calculation finished.
Execution completed in 2.06 seconds
Results:
{'OUTPUT_DIR': 'C:\Users\user\Desktop\Tree_planter\Tree_planter_output'}
When greedy algorithm is used, it does create a CDSM.tif and points.shp file but the point.shp does not have any trees and CDSM.tif is the same as input CDSM.
I am facing the same issue on both Windows and Ubuntu systems.
Please find my input files, SOLWEIG output and planting area shape file here:
https://utexas.box.com/s/wcra2gb0voujfrpkcbprdst63f52wq32
All the files can be imported to QGIS using the 'Example.qgz' project file.
Any help will be much appreciated.
Thank you
The text was updated successfully, but these errors were encountered: