jeffreyevans / GradientMetrics

ArcGIS Geomorphometry & Gradient Metrics toolbox
GNU General Public License v3.0
20 stars 10 forks source link

Heat Load Index #5

Open jackieg2017 opened 6 years ago

jackieg2017 commented 6 years ago

Hi @jeffreyevans,

Thanks for this toolbox. It has been extremely helpful. I am having issues with the Heat Load Index. I have used the same data with other tools such as Compound Topographic Index. I am trying to use a DEM to get heat load index and keep getting the following error. I looked at the code and any adjustments I made didn't seem to help. Any suggestions? I included the error below.

Running script hli... Running HLI ...... Failed script Heat Load Index... Traceback (most recent call last): File "C:\Users\jaclynguz\Documents\GradientMetrics-master\GradientMetrics-master\scripts\hli.py", line 57, in outRasterName = arcpy.GetParameterAsText(2) File "c:\program files\arcgis\pro\Resources\arcpy\arcpy__init__.py", line 648, in GetParameterAsText return gp.getParameterAsText(index) File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\geoprocessing_base.py", line 233, in getParameterAsText self._gp.GetParameterAsText(*gp_fixargs(args, True))) RuntimeError: Object: Error in getting parameter as text Failed to execute (hli).

jeffreyevans commented 6 years ago

Can you please indicate what version of ArcGIS you are using?

jackieg2017 commented 6 years ago

ArcPro 2.1

jeremyg19 commented 5 years ago

I had this problem as well. ArcGIS Desktop 10.5.1. The issue exists in the tool properties. It looks like there is a missing input (getparamaterastext(1)) that takes in the z-units of the dem. It is there in many of the other tools that JE has created. If you edit the tool properties and create another input and put it second that takes in a string with either "Meters" or "Feet" the tool will run just fine. For examples on how to do that just right click on one of the other tools that takes in a z-unit input and look at the properties

rspre commented 4 years ago

Thanks jeffreyevans for the toolbox and jeremyg19 your comment is very useful.

Hadargi commented 4 years ago

Hi, I encountered the same issue with ArcGIS desktop 10.6.1 and I'm not sure what to do in order to solve it. I tried jeremyg19 solution and added "inZUnits = arcpy.GetParameterAsText(2)" but it didn't seem to work. Can you please suggest any other solution to this issue. Thanks