I'm looking for a Mapinfo SQL which can look at two tables and easily determine if a particular smaller bounded polygon has now moved into a different larger bounded polygon because there has been recent redistribution of particular boundaries of the larger.

The problem I have is that the smaller may in fact be intersected by more than one of the larger and the costs involved vary significantly. I have been able to table before and after, and determine any differences. I guess I am looking for a query that looks at the two tables and says OK for smaller polygon WXYZ before you intersected larger polygon 1, but now you intersect larger polygon 1, 2 and 3.

I have over 5000 smaller polygons whereas I only have 4 categorised larger polygons. How can I do this? Is it best, given that I have multiple listings for the same smaller polygons, that I actually add an ID# to both tables so any script I write understands that there can be multiples of the one location name?

  • Thanks for the edit Matt, writing a question while being frustrated with not only working on a day off and my dog constantly pressuring me to take her out for a walk! Btw I think I'm a dummy anyway, the script I'm looking for would simply be one that looks for the ID# where the smaller in table 2 equals that in table 1 but the larger table that it intersects does not equal the larger that is intersected in table 1. Dooh! – Jase Apr 27 at 10:47
  • You're most welcome. It was primarily to break up the wall of text a bit and make your problem easier to digest :-) It sounds like are well on your way to solving your issue. I don't have a lot of experience with SQL hence I didn't provide an answer, but good luck! – Matt Needle Apr 27 at 13:56
  • Yeah, same here, cheers. I'm trying to learn it more instead of relying a team member who is our expert – Jase Apr 28 at 2:24
  • Are you trying to do this with one query or would it be okay to do it in a small MapBasic script instead? – Peter Horsbøll Møller Apr 30 at 9:16
  • smaller scripts are fine – Jase May 3 at 1:57

Your Answer

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

Browse other questions tagged or ask your own question.