Intersectfeatures的问题(50分)

  • 主题发起人 主题发起人 pandame
  • 开始时间 开始时间
P

pandame

Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TmainForm.Button3Click(Sender: TObject);
var
i,j,num:integer;
cpos:points;
//道路交叉点crosspoints
ftr:feature;
log:Boolean;

begin

num:=map1.layers.Item['roads'].Allfeatures.count;
for i:=1 to numdo

begin

for j:=2 to num-1do

begin

if i=j then
continue;
log:= map1.FeatureFactory.IntersectionTest(map1.layers.Item['roads'].GetFeatureByID(i),map1.layers.Item['roads'].GetFeatureByID(j),1);
//判断有交点否
if log then

begin

ftr:=map1.FeatureFactory.Intersectfeatures(map1.layers.Item['roads'].GetFeatureByID(i),map1.layers.Item['roads'].GetFeatureByID(j));
map1.FeatureFactory.EraseFeature(map1.layers.Item['roads'].GetFeatureByID(i),ftr);
//用重叠部分对两道路进行擦除
map1.FeatureFactory.EraseFeature(map1.layers.Item['roads'].GetFeatureByID(j),ftr);
//用重叠部分对两道路进行擦除
end;

end;

end;

end;


编译可以通过,但运行时报错:project dl.exe raise exception class EOleException witn message'Error combining Feature'.process stopped. 兰条停在有Intersectfeatures的那一行,不知道什么原因,还请大虾们指点!
 
请大家指点!
自己顶~~
 
大家讨论下,帮帮我咯!不甚感激!
 

Similar threads

S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
I
回复
0
查看
658
import
I
I
回复
0
查看
763
import
I
后退
顶部