关于Arc/Info ASCII Grid 格式写入的问题

choosecrying 2009-12-22 11:18:19
想将dem数据写入Arc/Info ASCII Grid 格式,我是直按照文件格式说明写入,只是没有加空格和换行,fopen(file,“wb”),可是写出来软件不识别,请高手指点一下,谢谢!

格式说明:
Records 1 - 6
Geographic header in ARC ASCIIGRID format:
*ncols xxxxx

ncols refers to the number of columns in the grid and xxxxx is the numerical value
*nrows xxxxx

nrows refers to the number of rows in the grid and xxxxx is the numerical value
*xllcorner xxxxx

xllcorner refers to the western edge of the grid and xxxxx is the numerical value
*yllcorner xxxxx

yllcorner refers to the southern edge of the grid and xxxxx is the numerical value
*cellsize xxxxx

cellsize refers to the resolution of the grid and xxxxx is the numerical value
*nodata_value xxxxx

nodata_value refers to the value that represents missing data and xxxxx is the numerical value.

Coordinates may be in decimal or integer format. DD:MM:SS format for geodetic coordinates is not supported.
Record 7 -> end of file

The following is an example ARC/INFO ASCIIGRID data file.

ncols 157
nrows 171
xllcorner -156.08749650000
yllcorner 18.870890200000
cellsize 0.00833300
0 0 1 1 1 2 3 3 5 6 8 9 12 14 18 21 25 30 35 41 47 53
59 66 73 79 86 92 97 102 106 109 112 113 113 113 111 109 106
103 98 94 89 83 78 72 67 61 56 51 46 41 37 32 29 25 22 19
...全文
349 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

16,548

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC相关问题讨论
社区管理员
  • 基础类社区
  • AIGC Browser
  • encoderlee
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……

试试用AI创作助手写篇文章吧