Any progress in implementing something like Map Algebra's
$$ROWMAP: Row address of the processing cell
$$COLMAP: Column address of the processing cell
$$XMAP: x-map coordinate for the center of the processing cell
$$YMAP: y-map coordinate for the center of the processing cell
## NumPyArrayToRaster (in_array, {lower_left_corner},
## {x_cell_size}, {y_cell_size}, {value_to_nodata})
import os, sys, arcpy
import numpy as NUM
# Set path
sPath = sys.path[0]
outPath = os.path.join(os.path.dirname(sPath),"output")
# Set environment
arcpy.env.workspace = outPath
arcpy.env.overwriteOutput = 1
#------------------------------------------
# Create and populate an array
myArray = NUM.zeros((10,16),dtype='int16')
# Fill row with row number
for i in range(0,10):
myArray = i + 1
print myArray
# Create a raster
rowRas = arcpy.NumPyArrayToRaster(myArray)
rowRas.save("rowRas")
print "...saved rowras"
#------------------------------------------
# Fill col with col number
for j in range(0,16):
myArray[:,j] = j+1
print myArray
# Create a raster
colRas = arcpy.NumPyArrayToRaster(myArray)
colRas.save("colRas")
print "...saved colras"
import numpy as np import arcpy # Setup some rasters of rows and columns # (like old $$ROWMAP and $$COLMAP) nprows = np.indices((10,10))[0] npcols = np.indices((10,10))[1] # Convert the numpy arrays to ESRI rasters (ie Raster objects) # called 'rows' and 'cols' rows = arcpy.NumPyArrayToRaster(nprows) cols = arcpy.NumPyArrayToRaster(npcols)