If you don't want to write a MapBasic (or don't have it) routine, then try
this out.

Create five new float type columns in your table.
Labels: (or something like this)

Long1
Lat1
Long2
Lat2
Distance

*       Update the long1 column in your whole table with the longitude and
the Lat1 with the Latitude of the fixed point (or street address in your
case)
*       Update the Long2 and Lat2 with the Long and Lat of your variable
points or store locations (use the CentroidX and CentroidY functions in your
update statement)
*       Update the Distance column of your table using the expression
Distance(Long1,Lat1,Long2,Long2,"mi")
*       Sort your table by distance to get a table ordered by the distance
from your address to the store locations

There you have it.  Keep in mind a few things.  This is just ONE way.  There
are several other ways to do it as well.  Also keep in mind that the
distance function returns a "Great Circle" distance if you are in a earth
coord system and a Cartesian distance if you are in a non-earth projection.

Hope this was of some use to you, Ken

Take care,
Kevin Wright
ICF Consulting
Senior GIS Associate
9300 Lee Highway
Fairfax, Virginia  22031-1207
Voice:(703)218-2647
Fax:(703)934-3974
[EMAIL PROTECTED]


        -----Original Message-----
        From:   Ken Fioretti [SMTP:[EMAIL PROTECTED]]
        Sent:   Friday, August 25, 2000 1:34 PM
        To:     'MAPINFO-L'
        Subject:        MI Locate nearest...

        Hello All,
        What is the simplest way to locate the nearest point(s) from a table
of
        multiple points to another point. For example, I have a table of
store
        locations and the point of a single address. How do I determine
which
        are the nearest 3 stores in the store table to the address point? Do
I
        need to write a MapBasic routine, or is there a native MI
        function/command?
        Thanks
        Ken Fioretti

        
----------------------------------------------------------------------
        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