# Getting raster values on grid nodes [closed]

I have my raster layers of Digital Elevation Model, aspect, slope and curvature for a certain region. In this region I want to apply a grid with a certain spacing in its nodes, and then get the corresponding values of DEM, aspect, slope, curvature for the grid nodes sites. I have tried in ArcMap 10.2 to apply the fishnet, but it doesn't seem to give me this option (get raster values exactly on grid nodes).

Any idea on how can I perform this in ArcMap or R?

## closed as too broad by PolyGeo♦May 17 '17 at 9:34

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

This can be achieved with `raster::extract` in R:

``````library(raster)
s <- stack(setNames(replicate(4, raster(matrix(runif(100), 10))),
c('elev', 'aspect', 'slope', 'curv')))
``````

Create a matrix of x,y coordinates:

``````xy <- expand.grid(x=seq(0, 1, 0.15), y=seq(0, 1, 0.15))
``````

Sample the layers of `s` at each of the points in `xy`:

``````z <- cbind(xy, extract(s, xy))

#      x y       elev    aspect     slope      curv
# 1 0.00 0 0.58459710 0.5485367 0.7734856 0.1174515
# 2 0.15 0 0.76056989 0.2542434 0.9856833 0.1138580
# 3 0.30 0 0.02464270 0.7523499 0.5728196 0.7115031
# 4 0.45 0 0.71639151 0.8863490 0.9395645 0.8747950
# 5 0.60 0 0.01663264 0.9300632 0.1605902 0.4179168
# 6 0.75 0 0.75622080 0.8461625 0.7695283 0.3135819
``````

I think this should be possible to do using ArcGIS for Desktop by:

1. Using Create Fishnet (Data Management) to make label points that are located where you want them i.e. perhaps offsetting their origin coordinate by half a fishnet cell height and width.
2. Using Extract Values to Points (Spatial Analyst) which:

Extracts the cell values of a raster based on a set of point features and records the values in the attribute table of an output feature class.

If you do not have a Spatial Analyst license then it should be possible to emulate the functionality needed for step 2 by using ArcPy cursors and GetCellValue_management.