Overlapping areas - simple query

753 views
Skip to first unread message

k1983

unread,
Mar 25, 2009, 11:44:56 AM3/25/09
to MapInfo-L
I have two tables and I want to find out where they overlap.

I only want to know the exact areas that overlap, nothing outside the
area.

How do I go about it?

Archie

unread,
Mar 26, 2009, 2:43:17 AM3/26/09
to MapInfo-L

k1983

unread,
Mar 26, 2009, 5:50:34 AM3/26/09
to MapInfo-L
I'm afraid neither of these are working for me. Any more suggestions?


On Mar 26, 6:43 am, Archie <archie.vela...@gmail.com> wrote:
> The links below are from a previous discussions.
>
> http://groups.google.com/group/mapinfo-l/browse_thread/thread/bf98deb...
>
> http://groups.google.com/group/mapinfo-l/browse_thread/thread/647e4a5...
>
> Hope this helps you to find an answer in what your trying to do.
>
> Cheers!
>
> On Mar 26, 2:44 am, k1983 <katie.oh...@gmail.com> wrote:
>
>
>
> > I have two tables and I want to find out where they overlap.
>
> > I only want to know the exact areas that overlap, nothing outside the
> > area.
>
> > How do I go about it?- Hide quoted text -
>
> - Show quoted text -

Timothy Mashford

unread,
Mar 26, 2009, 7:10:18 AM3/26/09
to mapi...@googlegroups.com
Use the 'Objects --> Erase Outside' function.

First make a copy of one of your tables, so you don't alter the
original data. Make it editable, select all its objects and go Objects
--> Set Target

Then select everything from the second table, and go Objects --> Erase Outside

You will be left with the overlapping areas only.

Tim

k1983

unread,
Mar 26, 2009, 7:20:27 AM3/26/09
to MapInfo-L
When you get to the Erase outside should the first or second table be
editable. I only have the option to use Erase outside when the first
table is editable and this doesn't give me my results. I am still
left with areas that are outside the overlapping area.
> >> - Show quoted text -- Hide quoted text -

behrouz hoseini

unread,
Mar 27, 2009, 4:41:21 PM3/27/09
to mapi...@googlegroups.com
Hi
I also have the same problem as K1983 has.i tried Timothy's method it just shows gaps but with all area and polygons

David R Sherrod

unread,
Mar 27, 2009, 5:20:51 PM3/27/09
to mapi...@googlegroups.com

Doesn't this do it--Tim's instructions and example.

Table1_Circles.  I drew four polylines that are rudely circular, and I converted them to regions. (Must be regions.)
Table 2_Squares.  I drew four rude rectangles (one had five nodes) and converted them to regions.

Saved Copy "Table1_Circles" as "Table1_Circles_EraseOutside" because I sure don't wanna damage my valuable original data.

Use Layer control, stack the layers with (for example)
* Table1_Circles_EraseOutside on the bottom, editable;
* Table2_Squares, above it.
(Not visible or not even open is the original table 1.)

Select all in Table1_Circles_EraseOutside.  These are in the editable layer, the bottom layer, right?
Set those as target (ctrl-t or use the pulldown)
Now select all in Table 2, which is stacked above table 1 in the layer control

Erase Outside.  The damage is done to the table-1 copy.  From the Object menu, Erase Outside.  NOT the Erase sequence.
Use the layer control to hide table 2.  You should see, in table 1, only those items that were in the overlap.  In my case there were seven irregular polygons, the overlapping residua of my circles and squares.

What else?  My two tables are in the same projection.  Probably unimportant, but it goes to the matter of removing carelessness.
None of the items in a given table were themselves overlapping.  That's a different problem to solve, and I didn't want my experiment to become difficult.  I'd be using Objects-->Check Regions for overlap within an individual table.


Dave S.
-----------------------------------------



From: behrouz hoseini <behs...@gmail.com>
To: mapi...@googlegroups.com
Date: 03/27/2009 01:41 PM
Subject: [MI-L] Re: Overlapping areas - simple query
Sent by: mapi...@googlegroups.com


behrouz hoseini

unread,
Mar 27, 2009, 5:47:35 PM3/27/09
to mapi...@googlegroups.com
Thanks David,
you explain very clearly but as far as I grab from your tutorial ,u used two maps( with difference objects) and erased them out. what if I had a map contains some overlapped polygons ?

David R Sherrod

unread,
Mar 27, 2009, 7:36:18 PM3/27/09
to mapi...@googlegroups.com

Behrouz, here's how I'd do it to retain just the overlaps for a single table with multiple polygons (regions).  I'm not good with MapBasic, so I reach for available tools.  In this case, it's the Check Regions tool that has been a part of the OBJECTS menu pulldown since about version 6, I think.

Make your single table editable.  You saved it first to a new name, yes?
Select all in that table.  It's all polygons (regions), yes?

1.  Menu pulldown, OBJECTS-->Check Regions, and then within the options there, check only the box for Overlaps.  Leave the other two boxes unchecked.

The "Check Regions" tool will create polygons (default color fill yellow on my pc) that correspond to the overlaps. These have been added to the table, which still contains all the original polygons.  The newly created overlap polygons are highlighted at this stage (little corner squares are displayed to show the selection, and all the newly created overlap polygons are part of the selection).

2.  Now use the pulldown QUERY-->Invert Selection, and you've reversed the situation.  Everything is selected EXCEPT the new polygons that correspond to overlap areas.

3.  Delete.  All that's left is the overlap areas, as polygons.

behrouz hoseini

unread,
Mar 27, 2009, 9:06:25 PM3/27/09
to mapi...@googlegroups.com
Thanks David,
I know what's going on here now, I appreciate.
Behrouz
Reply all
Reply to author
Forward
0 new messages