For this specific sector, it could seem that the nearest sector is the one to the southwest but that sector doesn't point towards it.
As you can see in the image below. The red line doesn't go through the sector.
Original Message:
Sent: 01-13-2025 12:31
From: H. H
Subject: Distance Calculator taking Orientation in consideration
I think we are very close,
just don't know why some sector/ cells come without nearest cell
------------------------------
H. H
Knowledge Community Shared Account
Original Message:
Sent: 01-13-2025 11:03
From: Peter Møller
Subject: Distance Calculator taking Orientation in consideration
With a slight adjustment, it takes the issue of the sectors going all the way into the center of the site into account.
When comparing the line between the potential sectors, I remove the centerpiece of the sectors using a 10-meter buffer around the site.
Here's the same position as you shared before:The blue center part is a zoomed example of the sectors in the top left corner where you can see that the centerpiece has been removed from the sector. This is only visible for the sectors where no nearest sector was found.
------------------------------
Peter Horsbøll Møller
Principal Presales Consultant | Distinguished Engineer
Precisely | Trust in Data
Original Message:
Sent: 01-13-2025 10:09
From: Peter Møller
Subject: Distance Calculator taking Orientation in consideration
Hey
In your initial image, your cells didn't go all the way into the center of the site. So I took that as the way you had your sectors.
I can see that if the sectors start from the center the line between the current site and potential nearest sites will always touch/intersect the sectors.
Would you be able to share a small subset of your sectors so that I can test using these? If so, send them to peter.moller@precisely.com.
------------------------------
Peter Horsbøll Møller
Principal Presales Consultant | Distinguished Engineer
Precisely | Trust in Data
Original Message:
Sent: 01-13-2025 09:12
From: H. H
Subject: Distance Calculator taking Orientation in consideration
Thanks Dear Peter,
We have very good progress just I worry is the tool take in Azimuth/ Orientation in consideration
I just run it, and i think it doesn't take Azimuth/ Orientation in calculation
below is an example:
Site ID: 9606 (Red Pin) both sectors have nearest cell from Site ID: 9607 (Blue Pin)
however Site ID: 9606 Cell ID: 5 was supposed to have nearest cell from Site ID: 7256 (Green Pin)
------------------------------
H. H
Knowledge Community Shared Account
Original Message:
Sent: 01-13-2025 01:43
From: Peter Møller
Subject: Distance Calculator taking Orientation in consideration
Hey
I have now included the Site column in the output and I'm using the Site to ensure the tool doesn't select cells from the same Site as the Source Site.
------------------------------
Peter Horsbøll Møller
Principal Presales Consultant | Distinguished Engineer
Precisely | Trust in Data
Original Message:
Sent: 01-10-2025 14:38
From: H. H
Subject: Distance Calculator taking Orientation in consideration
Important issue, to highlight please
Source cell and Nearest Cell can have same Cell ID or it can be different, no issue
but Site ID of Source & Nearest must be different
------------------------------
H. H
Knowledge Community Shared Account
Original Message:
Sent: 01-10-2025 10:02
From: H. H
Subject: Distance Calculator taking Orientation in consideration
Really appreciate your great effort and support
Can we add a condition that nearest sector (can not be related to the same site of source sector)
as you can see below that almost all results are from same site.
------------------------------
H. H
Knowledge Community Shared Account
Original Message:
Sent: 01-10-2025 02:07
From: Peter Møller
Subject: Distance Calculator taking Orientation in consideration
Hey
The tool now allows you to also select a Site column in case your Cell column doesn't hold unique values.
The tool will combine the value from the Site column with the value from the Cell column into a unique value and use this.
If your Cell column holds unique values, you can just leave the Site column blank.
------------------------------
Peter Horsbøll Møller
Principal Presales Consultant | Distinguished Engineer
Precisely | Trust in Data
Original Message:
Sent: 01-09-2025 19:59
From: H. H
Subject: Distance Calculator taking Orientation in consideration
Thanks a lot Peter, the tool is much better now
One small favor, please:
in my database, Cell ID is repeated in all sites
to make it unique, can we make the tool check Site ID Plus Cell ID
and give final output in format of:
Source Site ID & Cell ID
Target Site ID & Cell ID
Distance
------------------------------
H. H
Knowledge Community Shared Account
Original Message:
Sent: 01-09-2025 11:07
From: Peter Møller
Subject: Distance Calculator taking Orientation in consideration
Hey
Give this a spin. Took less than a minute with 1,200 sectors
Peter
------------------------------
Peter Horsbøll Møller
Principal Presales Consultant | Distinguished Engineer
Precisely | Trust in Data
Original Message:
Sent: 01-09-2025 04:18
From: H. H
Subject: Distance Calculator taking Orientation in consideration
yes please better add this option to control distance limit as my Database is huge
don't know if we could also add an option to get (Only First nearest sector cell, or First & Second) so tool finish check operation faster
------------------------------
H. H
Knowledge Community Shared Account
Original Message:
Sent: 01-09-2025 04:08
From: Peter Møller
Subject: Distance Calculator taking Orientation in consideration
PS: I have only tried this with a small table holding 100 sectors.
If this turns out to run very slow on larger datasets, we could consider adding a distance limit. In this way, the tool would only analyze the sectors within say 10 km of each sector.
------------------------------
Peter Horsbøll Møller
Principal Presales Consultant | Distinguished Engineer
Precisely | Trust in Data
Original Message:
Sent: 01-09-2025 04:02
From: Peter Møller
Subject: Distance Calculator taking Orientation in consideration
Hey
I created a small tool that uses the SQL statement above and loops over the records in the Sector table.
I have attached the tool as source code and a compiled MapBasic application.
You will be prompted using 5 separate dialogs to select the sector table, columns with Cell ID, longitude and Latitude, and the resulting output table.
That part could be improved with a single input dialog.
------------------------------
Peter Horsbøll Møller
Principal Presales Consultant | Distinguished Engineer
Precisely | Trust in Data
Original Message:
Sent: 01-09-2025 02:03
From: Peter Møller
Subject: Distance Calculator taking Orientation in consideration
Morning
Let me think about how to do this for all cells.
As for the table, I refer to a table called Sectors
in two places in my script. In the Set Coordsys statement
in the first line and the Select
statement.
From the screenshot, I can't tell what your table is called. Can you try to delete the table name, and use the Table dropdown to insert your table name? Sometimes, a single character in the table name is off.
------------------------------
Peter Horsbøll Møller
Principal Presales Consultant | Distinguished Engineer
Precisely | Trust in Data
Original Message:
Sent: 01-08-2025 20:45
From: H. H
Subject: Distance Calculator taking Orientation in consideration
Thanks a lot Peter for your great effort
it loos very good, just two points:
1) when I have tried the same SQL in my mapinfo, it keep telling my (Table sectors is not open)
while it is already opened as shown in below map,
seems i miss something, if you could advise me please
2) is it possible to make SQL script make this check for all cells and give one output table,
as i need this for global study
Example:
Source Site1/ Cell A - Nearest Cell: Site2/ Cell A - Distance between them: 120 Meters
.........
.....
------------------------------
H. H
Knowledge Community Shared Account
Original Message:
Sent: 01-08-2025 09:25
From: Peter Møller
Subject: Distance Calculator taking Orientation in consideration
I had a closer look to see how this could be done.
If the use case is to select one sector and then find the nearest x sectors in the direction of this sector - and maybe also taking the direction of the other sector into account, I came up with this possible solution.
The initial case is a table of sectors. The table has a Cell ID and also a coordinate of the cell tower.
I'll select the sector I want to find nearby sectors for that also lie in the direction of the sector.
So I select my sector - the one in the lower right corner of the map.
And then I run the query. I'll get back to that in a bit.
As a result, I get, in this example, two sectors selected as you can see in the map below.
The query I use looks like this:
I start by reading some attributes from the selected sector such as the Cell ID, the center of the cell tower, and the sector polygon.
Next, I'll be using a Select statement to query out sectors:
I set 3 conditions:
------------------------------
Peter Horsbøll Møller
Principal Presales Consultant | Distinguished Engineer
Precisely | Trust in Data
Original Message:
Sent: 01-08-2025 01:41
From: Peter Møller
Subject: Distance Calculator taking Orientation in consideration
Hey
The Distance Calculator creates lines between the cells.
You could create lines between each cell and its x nearest cells, as shown below.
As a next step, you can delete all the lines that don't intersect a sector belonging to the same cell.
As a final step, you find the remaining line with the short length.
A MapBasic tool would be the obvious solution here.
You could do a spatial query using an extended sector. As shown below, an extended sector (polygon) has been created for Site C Sector 3. You can select all the sectors intersecting this polygon and from these find the nearest.
------------------------------
Peter Horsbøll Møller
Principal Presales Consultant | Distinguished Engineer
Precisely | Trust in Data
Original Message:
Sent: 01-07-2025 10:46
From: H. H
Subject: Distance Calculator taking Orientation in consideration
Dears,
Could you kindly support
I would like to calculate the nearest distance between Sectors not between Sites
For example:
If I have used the Distance calculator tool, it will consider site A the nearest one to site B
however site B, Sector 1 Orientation is in the direction to Site C
so Site C should be the nearest to Site B if we take Orientation in consideration
Any idea, how to do this?
------------------------------
H. H
Knowledge Community Shared Account
------------------------------