zyp911
路人甲
路人甲
  • 注册日期2006-08-22
  • 发帖数1
  • QQ
  • 铜币109枚
  • 威望0点
  • 贡献值0点
  • 银元0个
阅读:898回复:1

高手来解决 读取E00文件的程序的问题啊

楼主#
更多 发布于:2007-07-28 12:14
<P>readARCSection (FILE *archivo, strArcInfo *arcinfo, int precision)<BR>{<BR> int v2, v3, v4, v5, v6, num_coor;</P>
<P> printf ("%s\r", msgReadingARC);<BR> while (!feof (archivo))<BR> {<BR>  fgets (linea, 128, archivo);<BR>  sscanf (linea, "%i %i %i %i %i %i %i", ;id, ;v2, ;v3, ;v4, ;v5, ;v6, ;num_coor);</P>
<P>  if (id == -1)<BR>  {<BR>   printf ("%s[DONE]\n", msgReadingARC);<BR>   return;<BR>  }</P>
<P>  arcinfo->arcs = realloc (arcinfo->arcs, (arcinfo->arcsCount + 1) * sizeof (shapeArcObject));</P>
<P>  arcinfo->arcs[arcinfo->arcsCount].id = id;<BR>  arcinfo->arcs[arcinfo->arcsCount].elements = num_coor;<BR>  arcinfo->arcs[arcinfo->arcsCount].x = malloc (num_coor * sizeof (double));<BR>  arcinfo->arcs[arcinfo->arcsCount].y = malloc (num_coor * sizeof (double));</P>
<P>  if (precision == 2)<BR>   readSinglePrecision (archivo, num_coor,<BR>    arcinfo->arcs[arcinfo->arcsCount].x, arcinfo->arcs[arcinfo->arcsCount].y);<BR>  else if (precision == 3)<BR>   readDoublePrecision (archivo, num_coor,<BR>    arcinfo->arcs[arcinfo->arcsCount].x, arcinfo->arcs[arcinfo->arcsCount].y);<BR>  else<BR>   exit (1);</P>
<P>  arcinfo->arcsCount++;<BR> }</P>
<P> printf ("%s[FAIL]\n", msgReadingARC);<BR>}<BR></P>
<P>这段代码是读取E00文件的 一部分 那位了解E00文件格式高手帮我解释解释这段程序啊</P>
喜欢0 评分0
cl991036
管理员
管理员
  • 注册日期2003-07-25
  • 发帖数5917
  • QQ14265545
  • 铜币29669枚
  • 威望217点
  • 贡献值0点
  • 银元0个
  • GIS帝国居民
  • GIS帝国铁杆
1楼#
发布于:2007-08-07 20:50
<P>你看看E00格式的说明</P>
<P>本论坛可以搜索到</P>
<P>我写过txt转换E00的程序,关键你认识E00格式后就是写txt一样了</P>
没钱又丑,农村户口。头可断,发型一定不能乱。 邮箱:gisempire@qq.com
举报 回复(0) 喜欢(0)     评分
游客

返回顶部