0

I am close to finishing the visualization of PRACH in MapInfo.

Here's my output so far (for 4 counters)

enter image description here

Unfortunately, for some sectors it is not working as it should be.

Can you please help out?

Here's my code:

Select * from PRACH_data where Obj into ToUpdate

Fetch First From ToUpdate
Do while not EOT(ToUpdate)
   dim x as float, y as float
   azimuth = ToUpdate.Azimuth
   BW = ToUpdate.HBW
   s = azimuth -(BW/2)
   e = azimuth + (BW/2)
   latitude = ToUpdate.Latitude
   longitude = ToUpdate.Longitude

   circ = CreateCircle(ToUpdate.Longitude, ToUpdate.Latitude, ToUpdate.Dist_Class3)
   Create Arc into Variable pie 
      (ObjectGeography(circ, 1), ObjectGeography(circ, 2)) 
      (ObjectGeography(circ, 3), ObjectGeography(circ, 4)) 
      s e
   pie=converttopline(pie) 
   alter Object pie 
      Node Add (ToUpdate.Longitude, ToUpdate.Latitude)
   pie=converttoregion(pie)
   Insert into WindowInfo(FrontWindow(),10) (obj) Values (pie)

   circ = CreateCircle(ToUpdate.Longitude, ToUpdate.Latitude, ToUpdate.Dist_Class2)
   Create Arc into Variable pie 
      (ObjectGeography(circ, 1), ObjectGeography(circ, 2)) 
      (ObjectGeography(circ, 3), ObjectGeography(circ, 4)) 
      s e
   pie=converttopline(pie) 
   alter Object pie 
      Node Add (ToUpdate.Longitude, ToUpdate.Latitude)
   pie=converttoregion(pie)
   Insert into WindowInfo(FrontWindow(),10) (obj) Values (pie)

   circ = CreateCircle(ToUpdate.Longitude, ToUpdate.Latitude, ToUpdate.Dist_Class1)
   Create Arc into Variable pie 
      (ObjectGeography(circ, 1), ObjectGeography(circ, 2)) 
      (ObjectGeography(circ, 3), ObjectGeography(circ, 4)) 
      s e
   pie=converttopline(pie) 
   alter Object pie 
      Node Add (ToUpdate.Longitude, ToUpdate.Latitude)
   pie=converttoregion(pie)
   Insert into WindowInfo(FrontWindow(),10) (obj) Values (pie)

   circ = CreateCircle(ToUpdate.Longitude, ToUpdate.Latitude, ToUpdate.Dist_Class0)
   Create Arc into Variable pie 
      (ObjectGeography(circ, 1), ObjectGeography(circ, 2)) 
      (ObjectGeography(circ, 3), ObjectGeography(circ, 4)) 
      s e
   pie=converttopline(pie) 
   alter Object pie 
      Node Add (ToUpdate.Longitude, ToUpdate.Latitude)
   pie=converttoregion(pie)
   Insert into WindowInfo(FrontWindow(),10) (obj) Values (pie)

   Fetch Next From ToUpdate
Loop

Commit Table ToUpdate Interactive

Also, how can I calculate the area with every radius I'm plotting the arcs? in the table, I don't have "Area" as a column but when I click on a polygon, it is giving me a value for the area.. Maybe, if I have the Area column, I can order them in a descending order and then map them... that should work, what do you guys think?

  • "Unfortunately, for some sectors it is not working as it should be." Exactly what isn't working as you expect? – Peter Horsbøll Møller Mar 3 '15 at 6:44
  • @PeterHorsbøllMøller Hello again my friend! if you look at the site in the center: for sector 1, it has only 1 arc; however, if you notice, underneath it, there's another arc however it's not on top so that it appears as sectors 2 and 3... Regardless of this issue, I was thinking of creating a dialog box for PRACH. Site ID: User inputs Sector : User inputs Frequency: User inputs and then when they click on "Display" for example, the tool goes to that tab file and selects only that data and display it... Is that possible to do? If so, do you have a reference that you can point me to/guide me? – Karl Mar 3 '15 at 14:04
  • If it still is the display, you still need to either order the sectors so that the bigger ones are below the smaller or you could "erase" the bigger with the smaller so that they don't overlap – Peter Horsbøll Møller Mar 3 '15 at 15:54
  • @PeterHorsbøllMøller It worked for the sectors. Now what i want to do is to write a plugin in mapinfo that asks the user to input "Sector, Site, Frequency" and from the inputs the user provides, the tool will access that table and draw the PRACH of that site's sector.. IS that possible? – Karl Mar 4 '15 at 15:22
  • Sure, have a look at the Dialog statement in the MapBasic Reference Guide - that will lead you on the way to creating a dialog. Maybe using the MapBasic IDE would be a good idea (mustafaozcetin.wordpress.com/mapbasic/mapbasicide-en) – Peter Horsbøll Møller Mar 4 '15 at 20:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.