Hi,
This is the pseudo-SQL query that I'd like to acheive :
Select A.ID, B.ID, Distance (A.Lat, A.Long, B.Lat, B.Long, "m")
From MyTable As A, MyTable as B
Where A.ID > B.ID
And A.Lat is not Null
And B.Lat is not Null
And Distance (A.Lat, A.Long, B.Lat, B.Long, "m") < 500
I looked in the MapInfo SQL, and there is indeed a Distance function.
But it doesn't allow me to join a table with itself.
And to answer your question, if A, B and C are on a straight line, each one separated by 300m, I'd like to have the results :
A, B, 300
B, C, 300
------------------------------
JJ CASALONGA
Knowledge Community Shared Account
------------------------------
Original Message:
Sent: 07-22-2022 10:19
From: Uffe Kousgaard
Subject: Query to find records that are closed from each other
Assume your points are on a line, 300 meters apart. Still using a threshold of 500 meters.
Now A and B are within distance and so are B and C. But A and C are not (dist=600 meters).
Which result do you expect?
------------------------------
Uffe Kousgaard
ROUTEWARE
Roskilde
Original Message:
Sent: 07-20-2022 04:43
From: JJ CASALONGA
Subject: Query to find records that are closed from each other
Hi all,
I'm new to MpaInfo, so excuse me in advance if my question is trivial...
I've got records on the map that contains Lat-Long.
I'd like to run a query that would give me groups of records that are within a certain distance (in meters, or kilometers) from each other.
For example records A and D are 200m apart. If I put my threshold at 500m, I'd like to have as a result (A,D).
Thanks in advance
------------------------------
JJ CASALONGA
Knowledge Community Shared Account
------------------------------