This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
Hi Adam,
At first sight, if your bodies of water are closed polygons, you could
determine which body of water is the closest of a particular point. To
narrow the search, you could calculate the distance between your point and
the centroid of each body of water and keep, say, the 10 closest ones.
Then you could calculate the distance between your point and each segment
composing the 10 closest polygons. Since the distance between a point and a
line is proportional to the area of the triangle formed by the point and the
two nodes of the line, I would use the determinant method to calculate it.
This method works as follow: calculate the determinant of this matrix:
xp yp 1
x1 y1 1
x2 y2 1
where
xp and yp are the point's coordinates
x1 and y1 are the line's first node coordinates
x2 and y2 are the line's second node coordinates
Of course this can be optimized a lot depending on your data but it can be a
starting point.
Serge
-----Original Message-----
From: Adam Huycke [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 11, 2001 2:35 PM
To: [EMAIL PROTECTED]
Subject: MI-L Re: Calculating distance from a point
to bodies of water
I am currently conducting a study of a particular area using
temperature
data. One of the requirements of the study is to calculate
the distance from
those temperature points to a body of water. I have a .Tab
file that
contains all of the bodies of water that exist in the region
that I am
studying, as well as a .Tab file that contains the Lat. and
Long for the
individual temperature points. How do I go about calculating
the distance of
each of those points to the closest body of water, and
adding that
information to my temperature table?
Thank you for your consideration to my problem in advance
Adam Huycke
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at
http://www.hotmail.com.
_______________________________________________________________________
List hosting provided by Directions Magazine |
www.directionsmag.com |
To unsubscribe, send e-mail to
[EMAIL PROTECTED] and
put "unsubscribe MapInfo-L" in the message body.
_______________________________________________________________________
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, send e-mail to [EMAIL PROTECTED] and
put "unsubscribe MapInfo-L" in the message body.