How To: Create grid with coordinates of centroids as the values
Steps to create grids whose values are the x and y coordinates of the cell centroids defined by the $$XMAP and $$YMAP variables of GRID. A GRID license is necessary.
- Use SETWINDOW and SETCELL to match the output grids' size and resolution with those of the input grid.
Grid: SETWINDOW in_grd
Grid: SETCELL in_grd
- Use $$XMAP and $$YMAP to create two grids, one recording the X locations of the cell centroids, the other the Y locations.
Grid: elevx = $$XMAP
Grid: elevy = $$YMAP