I would use first
Searchpoint(frontwindow(),x,y)
Frontwindow() can be replaced by the window ID if you have stored it
somewhere
That gives the number of objects found in that location. If 0 then it's a
miss, if =1 it is what you what and you will retrieve the row number of your
object by
Searchinfo(1,search_info_row)
If you are not sure that the object is in the right table, you can check it
with searchinfo(1,search_info_table)
If searchpoint has found more than one object, you will have to loop through
them until you find one in the right table.
To retrieve the county name, fetch the record with the id you have found and
your_table.county_name will hold the county name.
Jacques Paris
e-mail [EMAIL PROTECTED]
MapBasic-MapInfo support http://www.paris-pc-gis.com
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Fast, Tim
Sent: March 18, 2002 09:39
To: MapInfo-L (E-mail)
Subject: MI-L Polygon contains a coordinate
Is there a way in MapBasic to determine what polygon in a table contains a
particular X-Y coordinate? For example if I have a coordinate of:
-101.6618 and 41.8473 What county in the US county table would that
coordinate fall in?
Thanks,
Tim Fast
Pioneer Hi-Bred International
_______________________________________________________________________
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.