Returns the X and Y coordinates corresponding to specified record numbers in a georeferenced grid.
XY = rec2XY ( Header , C )
Vector of 7 elements describing the grid georeferencing (as returned by GetFloatRasterHeader
or GetFlowDirGridHeader
) : number of columns, number of lines, cellsize, X coordinate of lower-left pixel, Y coordinate of lower-left pixel, NODATA value, convention for positioning the lower-left pixel.
Matrix containing the record numbers in the grid, to be converted in XY coordinates.
Output : vector of size [length(C),2]
, coordinates of the specified record numbers.
Returns the X and Y coordinates corresponding to specified record numbers in a georeferenced grid.
The point with coordinates (x_i,y_i)
is associated with pixel (row_i,col_i)
in the grid, i.e. record rec_i = row_i * ncols + col_i