Using Geographic Operators in Expressions - MapInfo_Pro - 2023

MapInfo Pro Help

Product type
Software
Portfolio
Locate
Product family
MapInfo
Product
MapInfo > MapInfo Pro
Version
2023
Language
English
Product name
MapInfo Pro
Title
MapInfo Pro Help
First publish date
1985
Last updated
2023-09-12
Published on
2023-09-12T16:39:16.995549

MapInfo Pro has several geographic operators. Use them to select objects on the basis of their spatial relationship to some other object. MapInfo Pro has a special keyword you use with geographical operators: "obj" or "object". This keyword tells MapInfo Pro that it has to get values based on the graphical objects in the table rather than the tabular data.

The geographic operators go between the objects being specified. Select the geographic operators from the Operators menu. Here are the geographic operators:

Contains

Object A Contains object B if B's centroid is anywhere within A's boundary.

Contains Entire

Object A Contains Entire object B if B's boundary is entirely within A's boundary.

Contains Part

Object A Contains Part object B if B's boundary is partly within A's boundary.

Within

Object A is Within object B if its centroid is inside B's boundary.

Entirely Within

Object A is Entirely Within object B if A's boundary is entirely within B's boundary.

Partly Within

Object A is Partly Within object B if A's boundary is partly within B's boundary.

Intersects

Object A Intersects object B if they have at least one point in common.

"Contains Part" and "Partly Within" are exactly equivalent to "Intersects"-these are all treated the same way by MapInfo Pro, so the standard syntax "Intersects" is almost universally used.

"Contains" and "Within" are concerned only with objects' centroids.

"Contains Entire" and "Entirely Within" are concerned with the area covered by a region object; the location of the centroid does not matter.



M - Object Centroid

Thus, if A, B, C, and D are all regions:

  A B C D

Contains

Object A contains Object B

 

Object C contains Object D

Object C contains entire Object D

 

Intersects

Object A intersects Object B

Object B intersects Object A

Object B intersects Object C

Object C intersects Object D

 

Does Not Intersect

Object A does not intersect Object C

     

Does Not Contain

 

Object B does not contain Object A

 

Object D does not contain Object C

If A, B, C, and D are all polylines,

then the Contains and Within operators are not applicable, but:

  B C D

Intersects

Object B intersects Object A

Object B intersects Object C

   

Does Not Intersect

 

Object C does not intersect Object D

Object D does not intersect Object C

Similarly, a polyline can not contain a point, but it can intersect a point; a point can not be within a polyline, but it can intersect a polyline.

Note: MapInfo Pro can perform a simple Contains or Within comparison more rapidly than a Contains Entire or Entirely Within. Therefore, unless you must be absolutely sure that objects are completely inside other objects you should use Contains and Within rather than Contains Entire or Entirely Within.