Save ascii raster

Save a MatLab array in a typical ArcInfo ascii raster, with header at top.
2,5K download
Aggiornato 2 feb 2010

Visualizza la licenza

This function saves a spatial matrix into an Arc-Info ascii raster. Two file extension '.asc' or '.txt' are supported.

FIRST CASE
USE: SaveAsciiRaster(varname, header);
It requires two inputs: (1) the z-values to be exported ('varname' variable), and (2) the 'header' vector with the spatial information of the grid. 'varname' can be a 1-D vector or a 2-D spatial grid.

SECOND CASE
USE: SaveAsciiRaster(varname);
If an xyz matrix (with [x_coord,y_coord,z_values]) is given as 'varname', no 'header' has to be defined, since the function will extract all the required header information from the xyz table. The first row contains the x_coord, y_coord and z_value of the most north-western cell; the last row refers to the most south-eastern pixel. Elements in xyz are sorted column-by-column from the geographical grid (geographical_grid=[1st_col,2nd_col,3rd_col,...,last_col]; xyz=[1st_col;2nd_col;3rd_col;...;last_col]).
The xy coordinates have to refer to the center of the cells.

Cita come

Giuliano Langella (2024). Save ascii raster (https://www.mathworks.com/matlabcentral/fileexchange/24442-save-ascii-raster), MATLAB Central File Exchange. Recuperato .

Compatibilità della release di MATLAB
Creato con R2007a
Compatibile con qualsiasi release
Compatibilità della piattaforma
Windows macOS Linux
Categorie
Scopri di più su Workspace Variables and MAT-Files in Help Center e MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Versione Pubblicato Note della release
1.2.0.0

An xyz matrix can now be saved using
SaveAsciiRaster(xyz);

1.0.0.0