当前位置:首页 >> 信息与通信 >>

使用mapbasic画基站扇区


'################################## ############################ '函数申明 Include "MapBasic.def" Global Length as float Global Path as string Declare SUB Main Declare SUB Creat

e_BCCH Declare SUB Create_900 'declare SUB Create_1800 Declare SUB Create_SiteName Declare SUB Create_CellID Declare SUB Create_BCCH_NameCI Declare Function Alterlon (ByVal 经度 as string,ByVal 纬度 as string,ByVal 方向角 as string,ByVal 定位长度 as string,ByVal FileName as string) as integer '################################## ############################ '########################### MAIN 程序 ############################# '################################## ############################ SUB Main Length=0.0025 '控制总体大小 Path="D:\2" Call Create_900 ' Call Create_BCCH ' Call Create_SiteName ' Call Create_CellID END SUB

'################################## ############################ '######################## 画基站 GSM900 的扇 区 子程序 ####################### '################################## ############################ SUB Create_900 Dim x0,y0,x1,y1,x2,y2 as float

Dim Dim Dim Dim Dim Dim Dim Dim Dim Dim Dim Dim Dim Dim Dim Dim Dim MyRow=1

ABC as ABC1 as i as Integer MyRow as Integer Length1 as Float Row as Freq as Sitestytle as Integer BSC as SiteStyle as Integer BCCH as SiteName as String CellID as String FillBrush as Brush BSCwang as String RowPi as Float ObjCellID as Object

Object Object

Integer String String String

Open Table Path+"\Rio2" As RFinfo1 Interactive '打开基站信息表 Create Map For RFinfo1 'select * from rfinfo where RFinfo.BSC 网类="GSM900" into rfinfo1 Create Table RF2 (NNN integer) File Path+"\Temp" Create Map For RF2 Fetch First From RFinfo1 Do While Not EOT(RFinfo1) FillBrush=MakeBrush(2, white, Blue) Length1=Length Set Style Pen MakePen(1, 2, Black) Row=RFinfo1.Azimuth X0=RFinfo1.Lon Y0=RFinfo1.Lat X1=X0+Cos(3.14/4)*Length1 Y1=Y0+Sin(3.14/4)*Length1 X2=X0+Cos(3.14/4+3.14)*Length1 Y2=Y0+Sin(3.14/4+3.14)*Length1 'BCCH=RFinfo1.BCCH SiteName=RFinfo1.CellName CellID=RFinfo1.CI 'BSCwang=RFinfo1.BSC Sitestytle=1 '画定向天线的方向角

'

Create Arc Into Variable ABC ( X1 , Y1 ) ( X2 , Y2 ) (60-Row) (120-Row) Pen(6, 2, Red) ABC=ConvertToRegion ( ABC ) Alter Object ABC Info OBJ_INFO_BRUSH, FillBrush Node Add ( X0, Y0 ) Update RFinfo1 Set Obj = ABC Where RowID= MyRow ' ' ' row=90-row ' rowpi=(row/180)*3.14 ' ' length1=length ' ' if row=0 or row=-90 or row=-270 or row=-180 then ' length1=length*1.1 ' end if ' ' y2=y0+length1*sin(rowpi) ' x2=x0+length1*cos(rowpi) ' '写字 Insert Into RF2 select SiteName from RFinfo1 Create Text Into Variable ObjCellID SiteName (x2 , y2) ((x2+length1) , (y2+length1)) Update RF2 Set Obj=ObjCellID Where RowID=MyRow ' insert into drawbcch values(x0,y0,bcch,row,sitestyle) ' insert into drawsitename values(sitename,x0,y0,cellid,row,sitestyle) ' Insert Into RF2 (Object) values(ObjCellID ) MyRow=MyRow+1 Note MyRow Fetch Next From RFinfo1 Loop Commit Table RFinfo1 Map From RFinfo1 END SUB '################################## #########################

'改变经纬度 Function alterlon (ByVal 经度 as string,ByVal 纬度 as string,ByVal 方 向角 as string,ByVal 定位长度 as string,ByVal filename as string) as integer dim dim dim dim dim dim dim x0,y0,x2,y2 as float drawobj as object myrow as integer length1 as float row as integer rowpi as float bcch as string

myrow=1 open table path+"\"+filename as filename1 fetch first from filename1 do while not EOT(filename1) length1=val(定位长度) '频点位置 X0=val(经度) Y0=val(纬度) if filename="drawbcch" then row=90-val(方向角) rowpi=(row/180)*3.14 if row=0 or row=-90 or row=-270 or row=-180 then length1=length1*1.1 end if y2=y0+length1*sin(rowpi) x2=x0+length1*cos(rowpi) else row=val(方向角) y2=y0-length1*sin((row/180)*3.14) x2=x0+length1*cos((row/180)*3.14) end if Create Point Into Variable drawobj (X2 ,Y2) Symbol(22,white,1) update filename1 set 经度=x2 where rowid=myrow update filename1 set 纬度=y2 where rowid=myrow update filename1 set obj=objbcch where rowid=myrow MyRow=MyRow+1 fetch next from filename1

Loop commit table filename1 Add Map Auto Layer filename1 alterlon=1 end function '################################## ######################### '画各扇区频点,基站名字,基站 cellid sub create_bcch_nameci dim drawlength as float dim return as integer '画基站频点 'open table path+"\drawbcch" as filename drawlength=length return=alterlon("drawbcch.jindubcch","drawbcch.weidubcch","drawbcch.f angxiangjiaobcch",drawlength,"drawbcch") '画基站名字 'open table path+"\drawsitename" as filename drawlength=length*0.3 return=alterlon("drawsitename.jindusitename","drawsitename.weidusiten ame",10,drawlength,"drawsitename") '画基站 cellid 'open table path+"\drawcellid" as filename drawlength=length*0.3 return=alterlon("drawcellid.jinducellid","drawcellid.weiducellid",50, drawlength,"drawcellid") end sub

'########################################################### '?????? sub create_bcch dim x0,y0,x2,y2 as float dim objbcch as object dim i as integer dim myrow as integer dim length1 as float dim row as integer dim rowpi as float dim bcch as string length=length*0.7

myrow=1 open table path+"\drawbcch" as drawbcch fetch first from drawbcch do while not EOT(drawbcch) ' '??1800?900???? ' ' ' if drawbcch.bscwangxing="DCS1800" then length1=length*0.5 else length1=length end if X0=drawbcch.jindubcch Y0=drawbcch.weidubcch row=90-val(drawbcch.fangxiangjiaobcch) rowpi=(row/180)*3.14 if row=0 or row=-90 or row=-270 or row=-180 then length1=length1*1.1 end if y2=y0+length1*sin(rowpi) x2=x0+length1*cos(rowpi) Create Point Into Variable objbcch (X2 ,Y2) Symbol(22,white,1) update drawbcch set jindubcch=x2 where rowid=myrow update drawbcch set weidubcch=y2 where rowid=myrow update drawbcch set obj=objbcch where rowid=myrow MyRow=MyRow+1 fetch next from drawbcch Loop commit table drawbcch Add Map Auto Layer drawbcch browse * from drawbcch end sub '########################################################### '?????? sub Create_SiteName

dim dim dim dim dim dim dim dim dim dim dim dim dim

x0,y0,x1,y1,x2,y2 as float objsitename as object i as integer myrow as integer length1 as float row as integer rowpi as float bsc as string sitestyle as string bcch as string sitename as string cellid as string ci as integer

myrow=1 open table path+"\drawsitename" as drawsitename fetch first from drawsitename do while not EOT(drawsitename) length1=length*0.3 '??? X0=drawsitename.jindusitename Y0=drawsitename.weidusitename sitestyle=drawsitename.zhanxingsitename cellid=drawsitename.cisitename sitename=drawsitename.sitenamesitename ci=val(left$(cellid, 1)) y1=y0-length1*sin((10/180)*3.14) x1=x0+length1*cos((10/180)*3.14) 'y2=y0-length2*sin((10/180)*3.14) 'x2=x0+length2*cos((10/180)*3.14) if ci=1 then Create Symbol(22,white,1) update rowid=myrow update rowid=myrow update rowid=myrow end if MyRow=MyRow+1 '10 ???????

Point Into Variable objsitename (X1 ,Y1) drawsitename set jindusitename=x1 where drawsitename set weidusitename=y1 where drawsitename set obj=objsitename where

fetch next from drawsitename Loop commit table drawsitename Add Map Auto Layer drawsitename browse * from drawsitename end sub '########################################################### '????cellid sub Create_CellID dim x0,y0,x1,y1,x2,y2 as float dim objcellid as object dim i as integer dim myrow as integer dim length1 as float dim row as integer dim rowpi as float dim bsc as string dim sitestyle as string dim bcch as string dim sitename as string dim cellid as string dim ci as integer myrow=1 open table path+"\drawcellid" as drawcellid fetch first from drawcellid do while not EOT(drawcellid) length1=length*0.3 '?? X0=drawcellid.jinducellid Y0=drawcellid.weiducellid sitestyle=drawcellid.zhanxingcellid cellid=drawcellid.cicellid sitename=drawcellid.sitenamecellid ci=val(left$(cellid, 1)) y1=y0-length1*sin((50/180)*3.14) x1=x0+length1*cos((50/180)*3.14) 'y2=y0-length2*sin((40/180)*3.14) '50 ???????

'x2=x0+length2*cos((10/180)*3.14) if ci=1 then Create Symbol(22,white,1) update rowid=myrow update rowid=myrow update rowid=myrow end if MyRow=MyRow+1 fetch next from drawcellid Loop commit table drawcellid Add Map Auto Layer drawcellid browse * from drawcellid end sub

Point Into Variable objcellid (X1 ,Y1) drawcellid set jinducellid=x1 where drawcellid set weiducellid=y1 where drawcellid set obj=objcellid where


相关文章:
使用mapbasic画基站扇区
使用mapbasic画基站扇区_计算机软件及应用_IT/计算机_专业资料。mapbasic画扇区实例'### '函数申明 Include "MapBasic.def" Global Length as float Global Path as...
基站扇区图形绘制工具
基站扇区图形绘制工具_信息与通信_工程科技_专业资料。基站扇区图形绘制工具今日...喜欢此文档的还喜欢 使用mapbasic画基站扇区 9页 1下载券 ©2014 Baidu 使用...
使用CELLTOOL画扇区图
使用CELLTOOL画扇区图_信息与通信_工程科技_专业资料。1、在 CellMaker 下拉菜单...使用mapbasic画基站扇区 9页 1下载券 Mapinfo制作基站三扇区图... 12页 2下载...
mapinfo画扇形
mapinfo 中绘制基站扇形的算法讨论和工具共享 【资料名称】:mapinfo 中绘制基站...MAPINFO画测试路线 10页 免费 喜欢此文档的还喜欢 使用mapbasic画基站扇区 9页 ...
几种mapinfo插件的使用
“工具->运行 MapBasic程序打开” ,如果是经常使用,可从“工具—>工具管理器”...neighbourdata.txt,其中 sitedata 用于生成基站扇区图,neighbourdata 用于生成...
更多相关标签:
基站扇区 | 基站扇区绘制工具 4.5 | 谷歌基站扇区绘制工具 | 基站扇区绘制工具下载 | 基站扇区绘制工具 | 基站天线扇区功率比 | googleearth基站扇区 | 基站扇区划分 |