![]() ![]() If any of the Input rasters or constant values is a constant, it will be interpreted as a multiband raster, in which the cell values of all bands are the same as the constant and have the same number of bands as the output raster. If the cell value of the Input position raster picks value one from the missing band, the output raster will receive NoData. If any of the Input rasters or constant values is a raster with a smaller number of bands than the output raster, the missing bands will be interpreted as a band filled with NoData. If the Input position raster is a multiband, the output raster will have the same number of bands as the Input position raster. If the Input position raster is a single band, the number of bands on the output raster will be the same as the maximum number of bands of all multiband rasters from the Input rasters or constant values. The number of bands in the output depends on the Input position raster. If the Process as multiband parameter is checked ( process_as_multiband is set to MULTI_BAND in Python), each multiband raster input will be processed as a multiband raster. Each band from a multiband Input rasters or constant values ( in_rasters_or_constants in Python) will be processed separately as a single-band raster. If the Process as multiband parameter is unchecked ( process_as_multiband is set to SINGLE_BAND in Python), only the first band of a multiband Input position raster ( in_position_raster in Python) will be used. If they are all integer, the output raster will be integer. If any of the rasters in the input list is floating point, the output raster will be floating point. ![]() If the Input position raster is floating point, the values will be truncated to be integers before they are processed.Īny cell with a NoData value on the position raster will receive NoData on the output raster. If the position value is larger than the number of rasters in the list, the result will be NoData. If a cell value on the Input position raster is zero or negative, the result will be NoData. If the order of rasters changes, the results will change. The order of the Input rasters or constant values ( in_rasters_or_constants in Python) is relevant for this tool. If the position input has a value of 2, the output value will come from the second input in the raster list, and so on. For example, if a cell in the Input position raster has a value of 1, the value from the first input in the raster list will be used for the output cell value. More information on conditional statements is available here.The value of each cell of the Input position raster ( in_position_raster in Python) determines which input will be used to obtain the output raster value. You could just use the reclassify tool to convert the null values to 0 before running the raster calculator, but that's an extra step. This works for ArcGIS Desktop 10.5 and you probably need the Spatial Analyst extension to be able to use the Raster Calculator. So, if you want to sum two raster layers with null values and want to substitute zeros for the nulls, do this:Ĭon(IsNull("raster_layer_1"), 0, "raster_layer_1") +Ĭon(IsNull("raster_layer_2"), 0, "raster_layer_2") The way around this is to use a conditional statement.Ĭon( condition, value if true, value if false )įor example, to check if a cell value is null and reassign that cell value to zero if it is null:Ĭon(isNull("raster_layer"), 0, "raster_layer") If one of the rasters has a cell with a null value, then when that cell is added to values from other cells it still equals null. I got stuck adding together multiple raster layers with null values in ArcMap. The Raster Calculator can do a lot, but the documentation is pretty scarce. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |