there is a function distance
Distance(CentroidX(obj1), 
CentroidY(obj1),CentroidX(obj2),CentroidY(obj2),"km")
You would have to write a mapbasic program to process it for all points 
however.

I tried it in sql, but you have to figure a way of joining each record to 
all of the others in the same table which do not intersect with it.  MI did 
not allow this type of join.  Maybe there is another way.
Still the distance function may help.

-----Original Message-----
From:   Jon Spinney [SMTP:[EMAIL PROTECTED]]
Sent:   Wednesday, November 17, 1999 2:16 AM
To:     'Mapinfo User List'
Subject:        MI inter-event distances
Importance:     High

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