Knowledge Base Article
KB10513 - How can I query for all shapes that are located at a point defined by a set of x,y coordinates? Presently I am using the DK Locate method from TGIS_LayerVector to find a shape located at a point defined by a set of x,y coordinates, but this method returns only one shape even if more than one shape is located on the layer at that point.
The Locate method provides only the best-match shape.
1) Use the DE-9IM model layer.FindFirst method to retrieve multiple shapes that have a relation to a selected point, 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
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: 2004-04-06, Modified: 2005-09-14
|