Jon,

Just a thought for you to try:

add a column to your table and populate it with the same thing (make all records = 1 
for instance)
now make a copy of that table (use Save As)
run an SQL query joining the table by the new column (this should give you all the 
combinations, but could well take some time to process knowing MapInfo) and
in the fields to create add the point number form table 1, point number form table 2, 
and the distance using the distance function with the appropriate fields from the two 
tables in the right spot.

Your SQL should look something like this:

Select test1.pointno, test2.pointno,Distance(CentroidX(test1.obj), 
CentroidY(test1.obj),CentroidX(test2.obj),CentroidY(test2.obj),"km") 
from test1, test2 
where test1.common=test2.common 
into Selection

This should give you what you want.


Mark Knudsen
__________________________________________________________________

 Veitch Lister Consulting Pty Ltd        Phone: +61 3 9427 7400
 Suite 14    663 Victoria Street         Fax:     +61 3 9427 0481
 ABBOTSFORD  VIC  3067                   email: [EMAIL PROTECTED]
__________________________________________________________________

-----Original Message-----
From:   Jon Spinney 
Sent:   Wednesday, November 17, 1999 3:16 AM
To:     'Mapinfo User List'
Subject:        MI inter-event distances

Hello list, 

This is a spatial statistics question!  I have a point file composed of
randomly plotted points.  There are 65 points in total.  I need to calculate
the inter-event distance between these points.  From what I understand, the
inter-event distance is the average distance of all the distances from any
one point to all the other points.  If I have 65 points (n), we could say
that there are .5n(n-1) or .5X65 (65-1) = 2080 distances.  Once I have this
number of distances, I am looking for a fast way to measure these 2080
distances.  I have X, Y of the points so I could use the Pathagoras to
calculate the 2080 distances, but only one at a time.  This seems too labor
intensive though.
Then I need to sum the distances, and finally divide the sum by 2080, in
order to give me an average inter-event distance.  The order by which I
choose points is irrelevant - it's stochastic.  Does any body know of a
quick way to calculate the 2080 distances if I know the X and Y of each
point?  Again, the pathagoream theorem will work here, but I would have to
do the calculations one at a time.  I have spoken to others about this, and
they suggested using Excel to calculate the function.  Perhaps there is a
way in MapInfo though?

Many thanks, 

Jon Spinney
      
----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]

----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]

Reply via email to