1

I've done a little bit of SQL query in MapBasic, but somehow get lost in this problem. I'm hoping that someone can help me out.

I have a table of polygons in 2 groups, F and E. F polygons are larger than E in size. Some E polygons are inside the boundary of some F polygons. Some are not.

How can I select the F polygons where there are E polygons inside its boundary?

It can be very simple, I guess...

2 Answers 2

3

You will have create a copy of your table to be able to join these.

Once you have made the copy, try running this query:

Select *
From MYTABLE, MYTABLE_COPY
Where MYTABLE.OBJ Intersects MYTABLE_COPY.OBJ
And MYTABLE.GROUP = "F"
And MYTABLE_COPY.GROUP = "E" 

Note that this will find all the F polygons that intersect a E polygon. You can change the "Intersects" operator to "Contains Entire" to only find those polygons that have another polygon entirely within.

0
0

In your case, you need:

Select * from F, E Where F.OBJ Intersects E.OBJ

In from-e, first put the table that you need

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.