could you 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;
} |
回复: could you find a better or rapid search method to get all local coordinate systems?
Hello ,
Have a look at FeatureManager.GetFeatures. While this will not filter on feature types, it will give you all of the features for that document. Regards, -Earl |
所有的时间均为北京时间。 现在的时间是 11:57 AM. |