<< XY2rec Vectorization/Rasterization functions Exporting data >>

CLaRiNet 0.1 beta >> Vectorization/Rasterization functions > rec2XY

rec2XY

Returns the X and Y coordinates corresponding to specified record numbers in a georeferenced grid.

Calling Sequence

XY = rec2XY ( Header , C )

Arguments

Header

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.

C

Matrix containing the record numbers in the grid, to be converted in XY coordinates.

XY

Output : vector of size [length(C),2], coordinates of the specified record numbers.

Description

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

Examples

See Also

Authors

<< XY2rec Vectorization/Rasterization functions Exporting data >>