I am trying to do an intersect query on two polygon layers in MapInfo. One is a buildings layer and the other are 2d mesh triangles. I want to get the max depth from any of the triangles that intersect the buildings layer. As multiple meshes intersect a single building polygon I end up with multiple entries of that building polygon in the background table, with each duplicate entry having a different depth corresponding to which triangle it intersects with.

Is there a way of automating the process so that I can have one buildings layer with the max depth for that building corresponding to the triangle (2d mesh) with the max depth?

  • Do you want to do this via a query and see the result in a query or do you want to update your buildings with the max depth value from the triangles? May 29, 2015 at 5:47

1 Answer 1


Sure you can. Add a column to your buildings table called MaxDepth (or whatever you want to call it) of the correct type, I assume Float. Then use Table > Update Column and use the below in the 'Update Column' dialog.

  • Table to update: Buildings
  • Column to update: MaxDepth
  • Get Value from Table: MeshTriangles
  • Click 'Join...' button and select 'Where object Intersects object...'
  • Calculate: Max
  • of: MaxDepth (or whatever the depth column is called in the mesh table)

You should now have the maximum depth from any of the intersecting triangles assigned to each building.

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.