如何在mapinfo中绘制两点连线?

目前我有几百个两点需要连线,如何一对一对的连接是非常的麻烦,希望能有简便点的方法,高手帮助!!!(希望是能把点点关系列出来就能解决!)

我前两天写的程序,
不知道你有没有mapbasic.
还有你的文件结构是怎么样的,需要你详细说明一下。

源代码如下,自己参考一下。

include "mapbasic.def"
declare sub main
declare sub drawnetwork

sub main
call drawnetwork
end sub

sub drawnetwork
dim i_id, i_start,i_end as integer
dim f_sx, f_sy, f_ex, f_ey as float

fetch first from netexcel
do until eot(netexcel)
i_id = netexcel.id
i_start = netexcel.node1
i_end = netexcel.node2

select * from node where id = i_start into temp1
f_sx = centroidx(temp1.obj)
f_sy = centroidy(temp1.obj)
select * from node where id = i_end into temp2
f_ex = centroidx(temp2.obj)
f_ey = centroidy(temp2.obj)
insert into link (obj,id,node1,node2)
values (Createline(f_sx, f_sy,f_ex, f_ey),i_id,i_start,i_end)

fetch next from netexcel
loop
end sub
温馨提示:答案为网友推荐,仅供参考
第1个回答  2013-08-01
我有好几百个,一对一两点经纬度之间需要连线,怎么操作?

相关了解……

你可能感兴趣的内容

本站内容来自于网友发表,不代表本站立场,仅表示其个人看法,不对其真实性、正确性、有效性作任何的担保
相关事宜请发邮件给我们
© 非常风气网