Knowledge Base



KB10513 - Query for all shapes with a relation to a point defined by x,y coordinates?

The DK Locate method provides only the best-match shape. Therefore:

1) Use DK support for the DE-9IM model layer.FindFirst method to retrieve multiple shapes that have a relation to a selected point (or line or polygon shape), as follows:

Provide a point and the DE-9IM model parameter to specify the relation between a reference point (shape) and other shapes to be queried. Supported relations include: equality, disjoint, intersect, touch, overlap, cross within, and contains.

2) Iterate the loop
; Shp := layer.FindFirst( area_of_interest ) while assigned( shp ) to begin
; Find any relation between shp and selection point
; Shp := layer.Findnext
; End ;

Created: April 06, 2004, Modified: August 28, 2015