![]() ![]() ![]() Performs an arithmetic operation on the bands of a raster dataset.Ĭreates a raster output that divides your raster into two distinct classes.Ĭreates a preprocessed cache dataset at the point in the function chain where it's added for an item in a mosaic dataset.Ĭlassifies a raster dataset based on an Esri Classifier Definition (. Identifies the downslope direction of the maximum rate of change in value from each cell to its neighbors.ĭefines an attribute table that will be used to symbolize a single-band mosaic dataset. Performs an arithmetic operation between two partially or completely spatially overlapping rasters or a raster and one or more constant values. Statistics functions: ArgMax, ArgMin, ArgMedian, and Duration. Functions Function nameĪdjusts image brightness values (DN) for some The functions are organized within a function chain, allowing you to create various processed products by chaining together multiple functions. These functions are applied to the raster data on the fly as theĭata is accessed and viewed therefore, they can be applied quickly without having to endure the time it would otherwise take to create a processed product on disk.įunctions can be applied to various rasters (or images), including the following: The raster functions allow you to define processing operations that checking for upstream issues), but perhaps this can be useful in some situations.What are the functions used by a raster or mosaic dataset? The result has an extent that is identical to the input "correct" extent.Īgain, this is probably the wrong way to go 90% of the time (vs. Right_wrong = float(arcpy.GetRasterProperties_management(in_rast, "RIGHT").getOutput(0))īottom_wrong = float(arcpy.GetRasterProperties_management(in_rast, "BOTTOM").getOutput(0))Īrcpy.Shift_management(in_raster=in_rast, out_raster=out_rast_temp, x_value=x_shift, y_value=y_shift, in_snap_raster="")Īrcpy.Rescale_management(in_raster=out_rast_temp, out_raster=out_rast_extent, x_scale=x_scale, y_scale=y_scale) ![]() Left_wrong = float(arcpy.GetRasterProperties_management(in_rast, "LEFT").getOutput(0)) Top_wrong = float(arcpy.GetRasterProperties_management(in_rast, "TOP").getOutput(0)) Y_dim_correct = top_correct - bottom_correct X_dim_correct = right_correct - left_correct I was able to do so using the Shift and Rescale tools. Nevertheless, I was interested to see whether I could use ArcPy to achieve the same results as editing the extent manually in the raster properties window. As noted by Vince, this shouldn't be this hard. This turned out to be a case of a projection issue (see my edits). Among other clues, a curved Canadian border on a Mercator projection (ugg) is pretty obviously wrong, in retrospect. When I use the right one, the map is displayed in the correct location. I was using the wrong projection definition. The Shift tool alone won't work because the dimensions of the raster need to be adjusted in addition to location.Although the Get Raster Properties tool can access the extent values (Top, Left, Right, Bottom), it does not appear that Set Raster Properties allows the extent properties to be modified. I looked at the Set Raster Properties tool.However, I need to update the extent for 100s of these files, so need a scriptable/arcpy solution. I can manually edit the extent in the properties window.I am looking for an ArcPy tool that would allow me to define the extent of the raster manually in the same way that I can define the projection using Define Projection. However, the raster appears in the wrong place on the map (centered at (0,0)). Using the Define Projection tool, I am able to set the coordinate system without issue. However, I have the correct values for these parameters. ArcGIS doesn't read the projection or extent correctly due to issues with the input file. I have a raster data set I imported to ArcGIS from a netCDF file. ![]()
0 Comments
Leave a Reply. |