telecomright.blogg.se

Arcmap raster calculator con pick setnull
Arcmap raster calculator con pick setnull










CheckOutExtension ( "Spatial" ) # Execute SetNull outSetNull = SetNull ( inRaster, inFalseRaster, whereClause ) # Save the output outSetNull.

#Arcmap raster calculator con pick setnull license

workspace = "C:/sapyexamples/data" # Set local variables inRaster = "landclass" inFalseRaster = 1 whereClause = "VALUE 7" # Check out the ArcGIS Spatial Analyst extension license arcpy. # Requirements: Spatial Analyst Extension # Import system modules import arcpy from arcpy import env from arcpy.sa import * # Set environment settings env.

arcmap raster calculator con pick setnull

# Name: SetNull_Ex_02.py # Description: Returns NoData if a conditional evaluation is # true and returns the value specified by another # raster if it is false, on a cell-by-cell basis. It returns NoData if a conditional evaluation is true, and returns the value. In the first step, IsNull gives the NoData areas a value of 1 and the non-NoData areas a value. Input false raster or constant value : InRas1. Input true raster or constant value : 100. SQL reference for query expressions used in ArcGIS Set Null sets identified cell locations to NoData based on a specified criteria. Use Con on the results to give the original NoData areas a value: Input conditional raster : OutNullRas.See the following topics for more details on creating queries in the Query Builder: If it contains all integer values, the output will be an integer raster. If the input false raster (or constant value) contains floating-point values, the output raster will be floating point. The input conditional raster does not affect whether the output data type is integer or floating point. If no where clause is specified, the output raster will have NoData wherever the conditional raster is not 0. If the evaluation is false, the output raster will be defined by the input false raster or constant value. To set any cell with a value greater than 5 to NoData and have the remaining cells retain their original values, the following parameters could be used on the tool dialog box: Input conditional raster : InRas1. If the evaluation of the where clause is true, the cell location on the output raster will be assigned NoData. Learn more about setting cell values to NoData with Set Null Illustration OutRas = SetNull(InRas1, InRas2, "Value = 4") Usage It returns NoData if a conditional evaluation is true, and returns the value specified by another raster if it is false. Set Null sets identified cell locations to NoData based on a specified criteria. CheckOutExtension ( "Spatial" ) # Execute Pick outPick = Pick ( inPositionRaster, ) # Save the output outPick. workspace = "C:/sapyexamples/data" # Set local variables inPositionRas = "cost" inRas01 = "degs" inRas02 = "negs" inRas03 = "fourgrd" # Check out the ArcGIS Spatial Analyst extension license arcpy. # Name: Pick_Ex_02.py # Description: Assigns output values using one of a list of rasters # determined by the value of an input raster. Syntax Pick(in_position_raster, in_rasters_or_constants) Parameter See Analysis environments and Spatial Analyst for additional details on the geoprocessing environments that apply to this tool.

arcmap raster calculator con pick setnull

If they are all integer, the output raster will be integer.

arcmap raster calculator con pick setnull

If any of the rasters in the input list is floating point, the output raster will be floating point. If the 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.

arcmap raster calculator con pick setnull

If a cell value in the 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 list 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 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 position raster determines which input will be used to obtain the output raster value. Illustration OutRas = Pick(InRas1, ) Usage The value from a position raster is used to determine from which raster in a list of input rasters the output cell value will be obtained.










Arcmap raster calculator con pick setnull