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

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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