Vinesh

Not sure how to do this with a single in-line query and would love to hear
from someone who does...

The MapInfo operator 'intersect' will give you the answer if you loop the
table in MapBasic - this is how I've done it in the past

Dim i as integer
dim aTemp as alias
dim oTemp as object

aTemp = "MyTable.obj"
For i = 1 to NumRowsInMyTable

        fetch rec i from MyTable
        oTemp = aTemp
        select * from MyTable where obj intersects oTemp into TheseIntersect
noselect

        < Do stuff with your selection - count them? - if you append them to
another table bear in mind that there may be duplicates so use a unique ID to
weed dupes at the end >

Next

The limitation is that intersect does not seem to distinguish between 'touch'
and 'overlap' so you will also need to check for overlaps if that is part of
your requirement.

Paul Crisp

BT Syntegra
Innovation Place Delta Bank Road Newcastle NE11 9DJ
Tel 0191 461 4522 Fax 0191 460 1987


-----Original Message-----
From: Vinesh Govind [mailto:[EMAIL PROTECTED]
Sent: 10 March 2004 11:42
To: MapInfo Lists (E-mail)
Subject: MI-L Touching Polygons


This query has probably been asked a few zillion times so please bear with
me.
I have a dataset of polygons. 
I would like to select all neighbouring polygons from the topographic
polygon database that "touch" my polygons.
Is there a simple SQL query to achieve this?

Thanks.

                                          
Vinesh Govind
Information Management Team
Pen Lloyd Building - Room G48
Chief Executives Department
Leicestershire County Council
(T) (0116) 265 7321
   http://www.leics.gov.uk



_______________________________________________________________________
The contents of this message do not necessarily represent the 
opinions, views, policy or procedures of Leicestershire County Council.



********************************************************************

This email may contain information which is privileged or confidential. If you are not 
the intended recipient of this email, please notify the sender immediately and delete 
it without reading, copying, storing, forwarding or disclosing its contents to any 
other person
Thank you

Check us out at http://www.syntegra.com

********************************************************************

Reply via email to