查看单个帖子
旧 2006-11-30, 11:09 AM   #1
huangyhg
超级版主
 
huangyhg的头像
 
注册日期: 04-03
帖子: 18592
精华: 36
现金: 249466 标准币
资产: 1080358888 标准币
huangyhg 向着好的方向发展
默认 could you help me find a better or rapid search method to get all local coordinate sy

could you help me find a better or rapid search method to get all local coordinate systems?

Dear Robin,
My goal is to find all local coordinate systems from 5000 features. But it takes about 5 seconds when I try to iterate these features via the following code. I think that it is too slow for an iterative operation of features.
Could you help me find a better or rapid search method to get all local coordinate systems?
Thanks in advance.
My code as follows:
LPDISPATCH dFeature = NULL;
LPDISPATCH dNextFeature = NULL;
// import the supported features
while (dFeature != NULL)
{
IFEATURE swFeature(dFeature);
CString featureTypeName = swFeature.GetTypeName();
// is this a coordinate system feature
if (featureTypeName.Compare(swTnCoordinateSystem) == 0)
{
CString CSysName = swFeature.GetName();
// do simple things
}
// get next feature
dNextFeature = swFeature.GetNextFeature();
// release current feature
swFeature.DetachDispatch();
if (dFeature)
{
dFeature->Release();
dFeature = NULL;
}
dFeature = dNextFeature;
}
huangyhg离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)