Best regards / Med venlig hilsen Lars I. Nielsen GIS & DB Integrator GisPro
Select * from grid_object where not obj intersects any (select obj from
poly_object)
This will select any grid object that doesn't intersect any poly
objects. It might take some time to run and it might be quicker finding
the objects that do intersect and then inverting the selection.
HTH
Greg Driver
System Administrator
Applications Support
ICT
Surrey Police
NOT PROTECTIVELY MARKED
-----Original Message-----
From: mapi...@googlegroups.com [mailto:mapi...@googlegroups.com] On
Behalf Of beemomo
Sent: 09 July 2008 11:36
To: MapInfo-L
Subject: [MI-L] How to select the area which is Not Intersects between 2
objects?
Hi, there everyone. I have two objects, grids and a polygon which shaped
a small island in World Map. The grids were made around the the polygon.
When these objects are putting together, they will intersects with each
other. I wish to select the rest of the grids area which were not
intersects with the polygon. I try to perfom the SQL query in MapInfo
which sounds like this :
Select * From
Poly_Object, Grid_Object
Where Poly_Object.Obj Not Intersects Grid_Object.Obj
but an error message was displayed, "Found [intersects] while searching
for [like]". Is this because the "Not" operator is not "compatible" with
"Intersects" operator?
Can any one teach me on how to do that? Thank you.
*Internet communications are not secure and therefore Surrey Police does not accept legal responsibility for the contents of this message. This email and any attachments may be confidential. They may contain privileged information and are intended for the named addressee (s) only. They must not be distributed without our consent. If you are not the intended recipient, please notify us immediately and delete the message and any attachments from your computer, do not disclose, distribute, or retain this email or any part of it. Unless expressly stated, opinions in this email are those of the individual sender, and not of Surrey Police. We believe but do not warrant that this e-mail and any attachments are virus free. You must therefore take full responsibility for virus checking. Surrey Police reserves the right to monitor all email communications through their networks.*
The 'Invert selection' is an icon on the Main toolbar (black box with an arrow) or can be accessed via the Query menu. You can use this function to select objects/records that aren't currently selected. So for example, if run a SQL query to select all of the points that fall within a region object, inverting the selection will select all of the points that don't fall within the region object (i.e. NOT within).
Hope that helps.