Under Expression, Type in Con and hit enter to enter your conditional statement. Add you DEM as the Raster Variable and assign a character to it (like x in my below image). I like using Raster Functions as I can test the settings and I don't have to save the final output to disk.įrom Imagery tab, open up Raster Functions and search for Calculator. I will share with you the workflow I would follow to achieve this (but without adding the 1000). See Analysis environments and Spatial Analyst for additional details on the geoprocessing environments that apply to this tool.If you want the original DEM values between 10, why do you want to add 1000? 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. The Set Null tool sets identified cell locations to NoData based on a specified criterion. 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. You can run Con as a tool or in Raster Calculator. ![]() (Optional) A logical expression that determines which of the input cells are to be true or false. It can be an integer or a floating-point raster, or a constant value. If they are all integer, the output raster will be integer. The input whose values will be used as the output cell values if the condition is false. 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 input is multidimensional raster data, all slices from all variables will be processed. The tool will perform the operation on each band in the input. If the input is a multiband raster, the output will be a multiband raster. If the order of rasters changes, the results will change. Is Null can be used along with the Con tool to change NoData cells to a value. ![]() The order of the Input rasters or constant values ( in_rasters_or_constants in Python) is relevant for this tool. ![]() If you are using Python, your code should be adjusted to like this outSetNull SetNull('inRaster', 'inRaster', 'VALUE < 128') Try to avoid starting your variable name with number as Python doesnt accept starting variable names with numbers. 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. The above code can be run using Raster Calculator. 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. 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.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |