ncols 137
nrows 76
xllcorner 1425.821113
yllcorner 83.073494
cellsize 9.937770
nodata_value 1.701410E+038
1.701410E+038 1.701410E+038 1.701410E+038 1.701410E+038 1.701410E+038 1.701410E+038 1.701410E+038 1.701410E+038 1.701410E+038 2745.000000 1.701410E+038 1.701410E+038 1.701410E+038 2576.630371 1.701410E+038 2502.159912 1.701410E+038 1.701410E+038 1.701410E+038 1.701410E+038
1.701410E+038 1.701410E+038 1.701410E+038 1.701410E+038 1.701410E+038 1.701410E+038 1.701410E+038 1.701410E+038 1.701410E+038 1.701410E+038 1.701410E+038 1.701410E+038 1.701410E+038 1.701410E+038 1.701410E+038 1.701410E+038 1.701410E+038 1.701410E+038 1.701410E+038 1.701410E+038
1.701410E+038 1.701410E+038 1.701410E+038 1.701410E+038 1.701410E+038
怎么办 ???
5 个解决方案
#1
科学记数法,当成字符串读进来自己处理
#2
先一个字符一个字符判断,然后分几种情况判断,find(“E+”)的话就是科学计数法
#3
看文件格式是ARCGIS里的DEM数据;
fprintf(xxx, "%e",..........)
fprintf(xxx, "%e",..........)
#4
#include <stdio.h>
#include <stdlib.h>
int main()
{
float ret;
FILE* f = NULL;
if( ( f = fopen( "test.txt", "r" ) ) == NULL )
exit(1);
while( fscanf( f, "%f", &ret ) != EOF )
printf( "%f\n", ret );
fclose( f );
system( "PAUSE" );
return 0;
}
#include <stdlib.h>
int main()
{
float ret;
FILE* f = NULL;
if( ( f = fopen( "test.txt", "r" ) ) == NULL )
exit(1);
while( fscanf( f, "%f", &ret ) != EOF )
printf( "%f\n", ret );
fclose( f );
system( "PAUSE" );
return 0;
}
#5
fscanf(xxx, "%e",..........)
#1
科学记数法,当成字符串读进来自己处理
#2
先一个字符一个字符判断,然后分几种情况判断,find(“E+”)的话就是科学计数法
#3
看文件格式是ARCGIS里的DEM数据;
fprintf(xxx, "%e",..........)
fprintf(xxx, "%e",..........)
#4
#include <stdio.h>
#include <stdlib.h>
int main()
{
float ret;
FILE* f = NULL;
if( ( f = fopen( "test.txt", "r" ) ) == NULL )
exit(1);
while( fscanf( f, "%f", &ret ) != EOF )
printf( "%f\n", ret );
fclose( f );
system( "PAUSE" );
return 0;
}
#include <stdlib.h>
int main()
{
float ret;
FILE* f = NULL;
if( ( f = fopen( "test.txt", "r" ) ) == NULL )
exit(1);
while( fscanf( f, "%f", &ret ) != EOF )
printf( "%f\n", ret );
fclose( f );
system( "PAUSE" );
return 0;
}
#5
fscanf(xxx, "%e",..........)