I do not think that you can "express direction" with MI. You have to define
by yourself what you understand "within distance d in such direction"; for
example, what will be the aperture of the sector used for the search (45
degrees, 5 degrees ?) ; would the outer limit be along an, or a straight
line ???....

Once you know what you want you can try the following in the MapBasic window

set distance units "mi"
set coordsys table your_table
dim o as object
dim x as float
dim y as float
x=centroidx(selection.obj)
y=centroidy(selection.obj)
o=converttoregion(  combine (
combine(createline(x,y,x-2,y+1),createline(x,y,x-2,y-1))
,createline(x-2,y+1x-2,y-1)  ))

that will create a triangle based on the selected point directed to the
West, 2 mi along the West direction and 2 miles wide at that distance.

You can then try to bring all that into a select by replacing all the x and
y by centroid....but I do not guarantee there will not be some confusion
between the "selection.obj" and the objects selected by that operation that
would be within that triangle..

Looks rather cumbersome but ...that's MI

Jacques Paris
e-mail  [EMAIL PROTECTED]
MapBasic-MapInfo support  http://www.paris-pc-gis.com

-----Original Message-----
From: Ryan_W [mailto:[EMAIL PROTECTED]
Sent: 5-Feb-04 14:42
To: [EMAIL PROTECTED]
Subject: MI-L Follow up to "Geographic Operator Functionality"

Fellow Listserv Members,
As a follow up to my last question, "Geographic Operator Functionality"
I've included the code.
Just to reiterate, I'm trying to locate Ct's that are within 2 miles west of
my known point location.
Again, how does one 'express' direction?
Thanks, RW

Distance (-79.386803, 43.670368,
CentroidX(urban.obj),CentroidY(urban.obj),"mi") < 2




---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 10292

Reply via email to