lundi 2 mars 2015

PRACH data plotted in a better way but not completely


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 im plotting the arcs? in the table, i dont 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?


cheers!





Aucun commentaire:

Enregistrer un commentaire