岁月流转,往昔空明

C++博客 首页 新随笔 联系 聚合 管理
  118 Posts :: 3 Stories :: 413 Comments :: 0 Trackbacks
今天老板把实验程序又改了改,提高点实验的自动化程度,我就跟在后面继续磨了一点python。没想到在我磨程序的时候,老李在群里面搞了一个很诡异的问题,说他的_tstoi不能用了。但是MSDN是有着正常解释的。然后这厮就把MSDN一通狂骂。我也跟着狂骂,主要是发泄一下而已。

这小伙子憋得不行,就去看头文件,一看全是
#define _tcstod     strtod
#define _tcstol     _tcstol
#define _tcstoul    _tcstoul
#define _tstof      _tstof
#define _tstol      atol
#define _tstoi      _tstoi
#define _tstoi64    __tstoi64
#define _tcstod_l     _strtod_l
#define _tcstol_l     __tcstol_l
#define _tcstoul_l    __tcstoul_l
#define _tstof_l      __tstof_l
#define _tstol_l      _atol_l
#define _tstoi_l      __tstoi_l
#define _tstoi64_l    __tstoi64_l

看见没?

#define _tcstol _tcstol

这猪一般的头文件...

我当时心里那个毛啊,毛茸茸的!

但是我一Try,一看头文件,没这回事啊,我的是

#define _tcstod     strtod
#define _tcstol     strtol
#define _tcstoul    strtoul
#define _tstof      atof
#define _tstol      atol
#define _tstoi      atoi
#define _tstoi64    _atoi64
#define _tcstod_l     _strtod_l
#define _tcstol_l     _strtol_l
#define _tcstoul_l    _strtoul_l
#define _tstof_l      _atof_l
#define _tstol_l      _atol_l
#define _tstoi_l      _atoi_l
#define _tstoi64_l    _atoi64_l 

 然后拿我的头文件和他的头文件WinDiff一下,他又郁闷了,73K的文件就这点不同。。。

所以说,真正害人的往往都是小东西。还有一句话,不是这么说来着,一切有可能发生的糟糕事情,往往都会以最糟糕的形式发生。墨菲法则无敌啊~~。

给可能出现此问题人提个醒~呵呵。

再说Geoprocessing。

Geoprocessing看起来挺美,但是实际使用中限制颇多,要不Test一下还真不知道。

即使Geoprocessing的某项在ArcToolbox中能使用,绝不代表你弄个脚本就能OK的。脚本的GP的限制比ArcToolbox里面的限制要多得多。

例如,当栅格数据是整数格式的时候,ArcToolbox中的Geoprocessing可以照常工作,但是脚本里面你调用ExtractValuesToPoints就行不通。所以在写脚本的时候,记得看文档中的适应条件,如果有AO的原形对象,则最好按照AO的数据类型的许可来构造程序。

posted on 2007-01-09 20:23 空明流转 阅读(1842) 评论(1)  编辑 收藏 引用

评论

# re: 老李与Geoprocessing 2007-01-10 11:46 李锦俊
这样的问题都遇到,真的很郁闷。。。  回复  更多评论
  


只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理