How to Create Cell Sectors in MapInfo using MapBasic?

6,138 views
Skip to first unread message

danny adil

unread,
Feb 13, 2009, 7:08:16 AM2/13/09
to mapi...@googlegroups.com
Hello All,

I would like to use MapBasic to create representations of cellular antenna sectors in MapInfo.
I suppose I also need some way of setting the size of the sectors.  I'd like to make all Alpha sectors Red, Beta sec. Blue and Gamma sectors Green.

Example:
The data provided would be:  ??    Most sites have 3 sectors - so three azimuths
Longitude                                   -91.2166667
Latitude                                       44.7944444   
Azimuth(s)                                   90 , 120,  245   
Beam width of antenna(s)         78,  60,   78     

I have made function:
Function CreateSector(byval Longitude AS Float, byval Latitude AS float, byval Azimuth AS Integer, byval Beamwidth AS Integer, byval Radius AS Float)AS Object
    Dim wedge as Object
    Dim AZ, ang1, ang2, angle as float
    AZ = 90-Azimuth
    ang1 = AZ - Beamwidth/2
    ang2 = AZ + Beamwidth/2
    Create PLine Into Variable Wedge 1 (Longitude, Latitude)
    For angle = ang1 to ang2
        alter object wedge node add (Longitude+cos(angle*3.14/180)*radius, Latitude+sin(angle*3.14/180)*radius)
    Next
    CreateSector = ConvertToRegion(wedge)
End Function


But my question how to combine a region from function above to one table so all cell sectors can be created?

Thanks,

DANNY

Uffe Kousgaard

unread,
Feb 13, 2009, 7:24:13 AM2/13/09
to mapi...@googlegroups.com
After you have called your function 3 times, use this setup for your 3
sectors:

sector123 = combine(sector1,combine(sector2,sector3))

Regards
Uffe Kousgaard

Uffe Kousgaard

unread,
Feb 13, 2009, 7:31:37 AM2/13/09
to mapi...@googlegroups.com
btw: This will turn all sectors into the same colour, so maybe it is not what you want. Perhaps you should keep each sector as a record on its own.

danny adil

unread,
Feb 13, 2009, 7:46:32 AM2/13/09
to mapi...@googlegroups.com
Thanks for all of you.....,

I agree with combine function will turn all sector into the same colour, so i add a new procedure that read one table and keep each sector as a record on its own (CreateSectorAll):

Function CreateSector(byval Longitude AS Float, byval Latitude AS float, byval Azimuth AS Integer, byval Beamwidth AS Integer, byval Radius AS Float)AS Object
    Dim wedge as Object
    Dim AZ, ang1, ang2, angle as float
    AZ = 90-Azimuth
    ang1 = AZ - Beamwidth/2
    ang2 = AZ + Beamwidth/2
    Create PLine Into Variable Wedge 1 (Longitude, Latitude)
    For angle = ang1 to ang2
        alter object wedge node add (Longitude+cos(angle*3.14/180)*radius, Latitude+sin(angle*3.14/180)*radius)
    Next
    CreateSector = ConvertToRegion(wedge)
End Function

Sub CreateSectorAll(byval fTitle AS String)
    Dim wedgeas Object

    Select * from fTitle

    Fetch First From fTitle
    Do While Not EOT(fTitle)
        wedge = CreateSector(Selection.SiteLong, Selection.SiteLat, Selection.AntDir, 60, 0.0025)
        Insert into WindowInfo(FrontWindow(),10) (obj) Values (wedge)
        Fetch Next From fTitle
    Loop
End Sub

But I think this procedure (CreateSectorAll) is not efficient, take a long time for only 500 record.
Can anyone help me to simplify this?

Thanks,

DANNY

Glen

unread,
Feb 13, 2009, 7:46:58 AM2/13/09
to MapInfo-L
I wrote a MB program for this last year I will have to dig it out and
post an example of the output.
I will have to try your code and look at the output it looks cleaner

Glen

unread,
Feb 15, 2009, 8:16:16 PM2/15/09
to MapInfo-L
OK I pulled out my code and it takes about 3 seconds for 300 records
send me your data I will run them for you and give you back a layer

Shentel RF

unread,
Nov 22, 2013, 8:31:14 AM11/22/13
to mapi...@googlegroups.com
i need to download free site see for sectors any help ???

Glen O

unread,
Nov 22, 2013, 8:57:34 AM11/22/13
to mapi...@googlegroups.com
Shentel ? has an RF group wow I did not know that . if you work for Shentel why do you need a free copy?

Shentel RF

unread,
Nov 22, 2013, 9:04:01 AM11/22/13
to mapi...@googlegroups.com
its just one time thing. i dont think they would pay 65 for this 



On Fri, Nov 22, 2013 at 8:57 AM, Glen O <Glen_...@ossman-cg.net> wrote:
Shentel ? has an RF group wow I did not know that . if you work for Shentel why do you need a free copy?

--
--
You received this message because you are subscribed to the
Google Groups "MapInfo-L" group.To post a message to this group, send
email to mapi...@googlegroups.com
To unsubscribe from this group, go to:
http://groups.google.com/group/mapinfo-l/subscribe?hl=en
For more options, information and links to MapInfo resources (searching
archives, feature requests, to visit our Wiki, visit the Welcome page at
http://groups.google.com/group/mapinfo-l?hl=en
 
---
You received this message because you are subscribed to a topic in the Google Groups "MapInfo-L" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mapinfo-l/r6fBRicVfTo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mapinfo-l+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Shentel RF

unread,
Nov 22, 2013, 9:16:48 AM11/22/13
to mapi...@googlegroups.com
Glen . do i have to pay for it

Glen O

unread,
Nov 22, 2013, 9:20:16 AM11/22/13
to mapi...@googlegroups.com
go to the web page and chose contact us
 
I will e-mail you a working copy that will die on dec 1  

Shentel RF

unread,
Nov 22, 2013, 9:42:36 AM11/22/13
to mapi...@googlegroups.com
thanks, i just send you email. hope i dont have to pay for it later. 


On Fri, Nov 22, 2013 at 9:20 AM, Glen O <Glen_...@ossman-cg.net> wrote:
go to the web page and chose contact us
 
I will e-mail you a working copy that will die on dec 1  

--

Shentel RF

unread,
Nov 22, 2013, 9:58:35 AM11/22/13
to mapi...@googlegroups.com
hi Glen are you their

Glen O

unread,
Nov 22, 2013, 11:02:03 AM11/22/13
to mapi...@googlegroups.com
no I have run away to Costa Rica....... so I can learn Spanish so I can understand what my girlfriend say when she is mad at me
 
I e-mailed you a copy
 

Thomas Bacon

unread,
Nov 22, 2013, 11:03:37 AM11/22/13
to mapi...@googlegroups.com

‘no I have run away to Costa Rica....... so I can learn Spanish so I can understand what my girlfriend say when she is mad at me ‘

 

I’m sure that Spanish will come in useful when you get back! ;-)

 

 

Tom Bacon

GIS Engineer, Mouchel

T 01444 472380 │ E thomas...@mouchel.com W www.mouchel.com

Our values: innovation │ excellence │ integrity │ responsibility

--

--
You received this message because you are subscribed to the
Google Groups "MapInfo-L" group.To post a message to this group, send
email to mapi...@googlegroups.com
To unsubscribe from this group, go to:
http://groups.google.com/group/mapinfo-l/subscribe?hl=en
For more options, information and links to MapInfo resources (searching
archives, feature requests, to visit our Wiki, visit the Welcome page at
http://groups.google.com/group/mapinfo-l?hl=en
 
---

You received this message because you are subscribed to the Google Groups "MapInfo-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapinfo-l+...@googlegroups.com.



Mouchel logo

Mouchel Limited (Mouchel) is registered in England and Wales with registered number 01686040 at Export House, Cawsey Way, Woking, Surrey, UK, GU21 6QX.  The information in this e-mail is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorised. Any views or opinions expressed in this e-mail may be solely those of the author and are not necessarily those of Mouchel. No contracts may be concluded on behalf of Mouchel by means of email communications. Mouchel reserves the right to monitor and intercept emails sent and received on our network. 

David Reid

unread,
Nov 22, 2013, 11:24:01 AM11/22/13
to mapi...@googlegroups.com
OHHHHHH!!!, so it's Spanish the wife's been yelling all these years!!!


From: mapi...@googlegroups.com [mailto:mapi...@googlegroups.com] On Behalf Of Glen O
Sent: Friday, November 22, 2013 10:02 AM

To: mapi...@googlegroups.com
Subject: Re: [MI-L] Re: How to Create Cell Sectors in MapInfo using MapBasic?
no I have run away to Costa Rica....... so I can learn Spanish so I can understand what my girlfriend say when she is mad at me
 
I e-mailed you a copy
 

--

Shentel RF

unread,
Nov 22, 2013, 3:48:31 PM11/22/13
to mapi...@googlegroups.com
hay guys i need to see these 570 site in googel .. waht i have to do for that



You received this message because you are subscribed to a topic in the Google Groups "MapInfo-L" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mapinfo-l/r6fBRicVfTo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mapinfo-l+...@googlegroups.com.

Glen O

unread,
Nov 22, 2013, 5:41:52 PM11/22/13
to mapi...@googlegroups.com
as 3 sector cell sites? or just as a kml point file (this can be done with excel)?
 
in google earth 3 sector cells will be problematic
 
you need to switch to cell ICONS for scaling reasons or Arrows pointing in the correct direction.
 
or use QGIS and import goggle maps as the base layer and PDF or print your map.
 
I can give you a price to do the work if you would like
 
   

Joe Schmo

unread,
Feb 1, 2016, 3:57:02 PM2/1/16
to MapInfo-L
Hi Glen - 

I am looking for a tool to make sectors on a map.  If possible, I would like to color code each sector with some parameter.

Is there a tool out there that _really_ works?

Thanks!

Jay

MEHMET HINC

unread,
Feb 2, 2016, 8:25:30 AM2/2/16
to mapi...@googlegroups.com
Hi Joe, 

I've written a toolbox when I was working in a radio network planning department. Tool brings lots of things to mapinfo when it comes to Radio purposes. One of these functions is Create Site/Sector map based on coordinates , horizontal beam-width, environment info of the cell and with different carriers you can also define different length of the cell so e.g. if you have 2 carriers in umts sector you can show them at the same time with different length.

I stopped 3 years ago development and now I found my passion once again to port my whole toolbox into x64 platform which is pain in the ass because x86 version has dlls, .net application inside and so on :)

Anyway, here is the snapshot

Inline image 1

Cheers,
Mehmet



--
--
You received this message because you are subscribed to the
Google Groups "MapInfo-L" group.To post a message to this group, send
email to mapi...@googlegroups.com
To unsubscribe from this group, go to:
http://groups.google.com/group/mapinfo-l/subscribe?hl=en
For more options, information and links to MapInfo resources (searching
archives, feature requests, to visit our Wiki, visit the Welcome page at
http://groups.google.com/group/mapinfo-l?hl=en

---
You received this message because you are subscribed to the Google Groups "MapInfo-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapinfo-l+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

MEHMET HINC

unread,
Feb 2, 2016, 8:32:18 AM2/2/16
to mapi...@googlegroups.com
Btw, yes if you share your data without any spesific info all I need is in previous email, I can run and give the output to you.

Cheers,
Mehmet

Glen O

unread,
Feb 2, 2016, 9:19:31 AM2/2/16
to MapInfo-L
last test on mapinfo 10 should work on the new stuff


evil G
sectormaker.pdf
user Sector Maker MB10.mb.MBX
Reply all
Reply to author
Forward
0 new messages