MapInfo Products KnowledgeBase

Product: MapInfo
Version: 6.5&Higher
Platform: All Windows Platforms
Category: Table Operations

Summary:
Selecting points within overlapping buffers.

Question:
In the example, there is a table of points and a table with two intersecting polygons.



1. How can the points that are only within the intersecting polygons be selected and saved to a table?
2. How can the points that are only outside the intersecting areas be selected and saved to a table?

Answer:
The following two links to other Knowledgebase documents describe methods that use queries and Table>update column to achieve the results desired.
http://testdrive.mapinfo.com/techsupp/miprod.nsf/kbase_by_product/6D2690815D13E564852569130055FB4C

http://testdrive.mapinfo.com/techsupp/miprod.nsf/kbase_by_product/5E420E820A5B7C67852569130053FD17

This document describes an alternative method that uses Objects>Check Regions and a simplified query to accomplish the same task.

Start with a table of overlapping polygons and and a table of points that where some points are within those polygons.
(In this case, the polygons are 10 mile buffers that were created around store locations.)
The red circles represent a table named StoreBuffers10miles. And, the blue diamonds represent a table named Customers.


1. Go to File>New Table. Check the box next to Add to Current Mapper. Select the option Using Table. From the dropdown, choose the table that contains the buffers, in this example the table is named StoreBuffers10miles.



2. Click Create. Then click Create again. In the next dialog, give your new table a name and save it in a folder of your choice. For this example, the new table will be called Overlaps.

3. Go to Map>Layer Control. The new table should be added to the current mapper and will already be editable. Check Regions will use this new, editable table in the next step.



4. Go to Query>Sql Select. From the Tables dropdown, choose The StoreBuffers10miles. Uncheck the box next to Browse Results and click OK.



5. Go to Objects>Check Regions. Place a check mark next to Detect Overlaps.



Click on the Yellow Icon and choose a fill pattern of “N” for None to create borders only. The color of the border can be changed as well.


Click OK. Then OK again. Polygons will be created for the areas that overlap. In this case they will look like yellow “footballs”.



6. Go to File>Save Table to make the new table permanent.
7. To select the points within the overlaps, go to Query>Sql Select. Fill out the dialog with syntax similar to the screen shot below. Substitute your table names where appropriate.

The key is to choose the Customers table first (point table) in the From Tables section. Then, choose the table that the customer objects are within (Overlapping polygon table).

In this example, the Customers table objects (blue diamonds) are within the Overlaps table objects (yellow polygons or “footballs”). The where condition should be Customers.obj Within Overlaps.obj.



8. Click OK, and the objects within the overlaps will be selected.

(If any points or objects are “stacked” on top of each other, some points may appear unselected. All points are actually selected, but will appear unselected if an even number of objects are on top of each other.)

9. Go to File>Save Copy as and choose the highest Query# in the list. Click Save As and give your table a new name and save it to a folder of your choice.



10. To select the objects or points in the areas that do not overlap, click on the invert selection button from the main button pad.



10. Go to File>Save Copy as and choose “Selection”. Click Save as and name your new table and save it in a folder of your choice.


11. Go to File>Close Table and Close the queries. Go to File>Open and open the new tables that were just created and saved.

Last Modified:
Document URL: http://testdrive.mapinfo.com/techsupp/miprod.nsf/kbase_by_product/498038CF2E4FF24085256E43006091F6

Selecting points within overlapping buffers.^498038CF2E4FF24085256E43006091F6^Y