Arcpy_directional derivations


#1

This is code for implementation of directional derivation (x) to ArcGis Toolbox.

import numpy as np
import arcpy

folder = arcpy.GetParameterAsText(0)
raster = arcpy.GetParameterAsText(1)
arr = arcpy.RasterToNumPyArray(raster)

x_x, y_y = arr.shape
result_dx = np.zeros(shape=(x_x,y_y)

for column in range (1,(y_y-1)):
for row in range (0, x_x):
result_dx[row,column] = (arr[row,column+1]-arr[row,column-1])/20

`


#2

A post was merged into an existing topic: Basic operations with NUMPY


#3