Problem: Performing spatial queries on 3D datasets using SearchShape


When using SearchShape to perform spatial queries on datasets that have z-values (elevations), the query results may include undesired features. Specifically, features may be returned whose x- and y-values meet the search criteria, but whose z-values fall outside the search criteria.


moExtentOverlap is the only SearchMethod constant that considers z-values when performing a selection. If you use SearchShape with any other SearchMethod constant, z-values will be ignored.

Solution or Workaround

  • Use the moExtentOverlap SearchMethod constant. Note that the extents of a Point and a Rectangle will only overlap if the Point's z-value lies between the values of the Rectangle's Ceiling and Floor properties.
  • The SearchByDistance method also considers z-values, if present. This method measures the shortest path in three-dimensional space between the two shapes.
    [O-Image] Euclidean Distance and Formula graphic