Select to view content in your preferred language

Problems when calculating river slopes in HecGeoHMS from a floating point raster

3542
2
03-26-2013 01:53 AM
Labels (1)
MartinJespersen
Emerging Contributor
I tried to calculate "Characteristics" on the HecGeoHMS-toolbar. Length of river works fine, but when it comes to calculate river slope i get the messages attached below. As far as i can see this problem is related to the conversion from my floating point DEM-raster to the Double-columns in the "River-file". So, i tried to convert my floatingpoint DEM-raster to an Integer DEM - and then the slope-calculation runs nicely.
My question is then if this is the only solution on this problem - or is it possible to do something else to calculate the slope based on a floating point DEM-raster??

The error codes are:
Computing river slope..
System.InvalidCastException: Konvertering fra strengen 1730.800049 til typen Double er ikke gyldig. ---> System.FormatException: Input string was not in a correct format.
   at Microsoft.VisualBasic.CompilerServices.Conversions.ParseDouble(String Value, NumberFormatInfo NumberFormat)
   at Microsoft.VisualBasic.CompilerServices.Conversions.ToDouble(String Value, NumberFormatInfo NumberFormat)
   --- End of inner exception stack trace ---
   at Microsoft.VisualBasic.CompilerServices.Conversions.ToDouble(String Value, NumberFormatInfo NumberFormat)
   at Microsoft.VisualBasic.CompilerServices.Conversions.ToDouble(String Value)
   at ESRI.APWR.HECGeoHMS10.GPRiverSlope.RiverSlopeWk(ApLayers apLayers, Int32 debug, ITrackCancel& trackcancel, IGPMessages& messages, String& exMessage)
Failed to execute (RiverSlope).
Failed at Tue Mar 26 10:52:55 2013 (Elapsed Time: 0.00 seconds)
Tags (2)
0 Kudos
2 Replies
MartinJespersen
Emerging Contributor
By the way - i have the same problem when trying to calculate River Profiles with the "River Profiles"-tools. When doing this based on the floating point DEM-raster nothing is calculated, when doing the same to my integer DEM-raster everything works fine. Do i REALLY have to work on integer-rasters?
0 Kudos
ChristineDartiguenave
Esri Contributor
It looks like an issue with your regional settings (raster value comes back as 1730.800049 instead of 1730,800049 and is considered to be an invalid double). I think this issue has been fixed in 10 SP5. Which version of ArcGIS are you using? You can change the delimiter to "." instead of "," in your regional settings to verify this.

It is always a good idea to use integer raster whenever possible. They take less storage space and they speed up the analyses.
With a DEM, one way to keep your precision is to multiply the float raster by 10, 100, etc. to keep the desired level of precision and then set the ZUnit in the projection file associated to the raster (prj.adf) to indicate the zunit of the DEM. When the tool compute the river slope, it used the z-unit to generate the correct result.

For example, if you initial float DEM is in meters, you can create an integer DEM in cm, and set its zunit to 100 (100 cm in 1m).

Christine Dartiguenave
Esri Water Resources Team
0 Kudos