Dividing two rasters produces a raster of one value (which is zero)!

1899
4
05-25-2012 09:15 AM
JamalNUMAN
Legendary Contributor
Dividing two rasters produces a raster of one value (which is zero)!

The PI raster is divided by the HI raster (shown in the screenshot below also attached) and raster of one value (which is zero) is produced. The manual calculation for the division of the two raster doesn�??t produce a raster of zero value! It should be a raster which has cell values less than one considering the values of the input rasters.
[ATTACH=CONFIG]14649[/ATTACH], [ATTACH=CONFIG]14650[/ATTACH]

Why the ArcGIS produce raster of zero value in this case?

Thank you for the help,

Best
Jamal
----------------------------------------
Jamal Numan
Geomolg Geoportal for Spatial Information
Ramallah, West Bank, Palestine
0 Kudos
4 Replies
DanPatterson_Retired
MVP Emeritus
Integer division, caste one or both of the rasters to a Float
0 Kudos
by Anonymous User
Not applicable
Original User: Jamal432@gmail.com

Integer division, caste one or both of the rasters to a Float


Thank you for the answer. It does work (screenshot below)

[ATTACH=CONFIG]14661[/ATTACH]

What is the justification for taking the Float of both raster? Why the �??direct�?� divisions give integer value by default?
Best
Jamal
0 Kudos
DanPatterson_Retired
MVP Emeritus
If you want a floating point output, then one or both of the inputs need to be floating point, otherwise, integer division is the default.  This is common in many programming languages since it allows you to produce integer output without the need to remove the decimals which is harder
by Anonymous User
Not applicable
Original User: Jamal432@gmail.com

If you want a floating point output, then one or both of the inputs need to be floating point, otherwise, integer division is the default.  This is common in many programming languages since it allows you to produce integer output without the need to remove the decimals which is harder


Thank you for the elaboration. I thought that the default is the real number not the integer.
Best
Jamal
0 Kudos