ascii2xyz

版本 1.1.0.0 (2.6 KB) 作者: Andrew Stevens
convert ARC ASCII text file to xyz
2.8K 次下载
更新时间 2008/10/27

查看许可证

ASCII2XYZ reads in a raster text file in ARC ASCII format and converts values to a m x 3 matrix of x, y, a z values.

This code is mostly vectorized and performs well with reasonably large files (see example below).

%read in a 25 MB file
a=dir('foo.txt')

a =

name: 'foo.txt'
date: '17-Oct-2008 08:53:34'
bytes: 25437683
isdir: 0
datenum: 7.3370e+005

tic
xyz=ascii2xyz('foo.txt');
toc
Elapsed time is 8.110956 seconds.

引用格式

Andrew Stevens (2024). ascii2xyz (https://www.mathworks.com/matlabcentral/fileexchange/21785-ascii2xyz), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2008a
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Low-Level File I/O 的更多信息
致谢

参考作品: Raster to XYZ

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.1.0.0

fixed error in how y-values are allocated

1.0.0.0

Added support for ASCII files that specify either the corner of the grid or the center of the lower left pixel in the header.